mklappstuhl has quit [Remote host closed the connection]
yshh has quit [Remote host closed the connection]
tjbiddle_ has quit [Read error: Connection reset by peer]
tjbiddle has quit [Ping timeout: 256 seconds]
benlieb has quit [Client Quit]
takeru has quit [Remote host closed the connection]
keyvan is now known as lovclrtxt
pkh has joined #ruby
khushildep has quit [Ping timeout: 245 seconds]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
chrishough has quit [Quit: chrishough]
kf8a has quit [Ping timeout: 245 seconds]
cantonic has joined #ruby
cofin has joined #ruby
palantir has joined #ruby
jfelchner has quit [Ping timeout: 252 seconds]
johnrlive has joined #ruby
mrsolo has quit [Quit: Leaving]
tommyvyo has joined #ruby
cj3kim has quit [Remote host closed the connection]
awarner has quit [Remote host closed the connection]
mnewton has joined #ruby
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
mnewton has quit [Remote host closed the connection]
jgoss has joined #ruby
rismoney1 has joined #ruby
Cultofme_ has joined #ruby
Cultofmetatron has quit [Read error: Connection reset by peer]
<rismoney1>
here is the issue i need to work out, its driving me mad arr_of_hash = [{id:2, foo:'baz'},{id:33, foo:'bar'},{id:4, foo:'bah'}] ... I would like to return an array foo_arry=['baz','bar','bah']
ColKurtz has joined #ruby
kstephens has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Eaven has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 245 seconds]
tommyvyo has joined #ruby
soasme has quit [Client Quit]
chrishough has joined #ruby
ggordan has quit [Remote host closed the connection]
Cultofmetatron has quit [Remote host closed the connection]
awc737 has quit [Ping timeout: 256 seconds]
Mattx has quit [Remote host closed the connection]
crystalneth has joined #ruby
jcromartie has quit [Quit: Computer has gone to sleep.]
awc737 has joined #ruby
<ghanima>
hello all I was wondering if I can ask a question about the best approach so I am playing with classes and I have a few methods defined in the class. The thing is I want to be able to obstantiate a class and have a method always execute when obstantiated.
<ghanima>
Outside of defining this in the initialize function is there another way
momomomomo has quit [Quit: momomomomo]
<crystalneth>
If I store something in @@foo in a module method, then include that module in the Bar class, where is @@foo stored? What if I include the module in a second class Panda? Is it stored a singleton instance of the module for each class its included in?
pkrnj has joined #ruby
twoism has quit [Remote host closed the connection]
blandflakes_ has quit [Quit: Leaving]
pkrnj has quit [Client Quit]
baroquebobcat has joined #ruby
Cultofmetatron has joined #ruby
<crystalneth>
Hmm, after some testing seems there is only one module singleton
girija has joined #ruby
rakl has joined #ruby
ttt_ has quit [Ping timeout: 276 seconds]
shinobi_one_ has quit [Quit: shinobi_one_]
Cultofmetatron has quit [Remote host closed the connection]
Cultofmetatron has joined #ruby
<bnagy>
ghanima: initialize _is_ the method that is designed to always run on instantiation.
<bnagy>
it can call other methods, of course
banisterfiend is now known as banister`sleep
<bnagy>
crystalneth: I'd strongly advise against using @@clasvars at all, let alone in mixins
momomomomo has joined #ruby
tommyvyo has quit [Quit:]
<crystalneth>
bnagy: Thanks. I'm trying to cache a value specific to the class the module is included in. E.g. A and B both include F. F has a method #stuff. I want something like the @foo ||= something_expensive behavior but coming from a module. Any suggestion?
<bnagy>
modules can use @ivars
<bnagy>
but they're basically setting them in the class they're included in
nezumi has joined #ruby
Cultofmetatron has quit [Ping timeout: 256 seconds]
<crystalneth>
bnagy: so those are class vars not instance vars?
[[thufir]] has joined #ruby
<crystalneth>
i.e. @foo ||= … will only assign once?
toekutr has joined #ruby
pitzips has joined #ruby
<bnagy>
it will only assign if @foo is nontruthy
<bnagy>
nil or fakse
toekutr has left #ruby [#ruby]
<bnagy>
so the special thing about any @ivar is that an uninitialised @ivar will evaluate to nil
<bnagy>
which is how that ||= assign works
ehaliewicz has joined #ruby
<crystalneth>
bnagy: I just tested. An @ivar in a module seems more akin to an instance variable. If I assign it in one instance, it is not assigned in another instance.
<bnagy>
@ivars are instance variables - ivar is just short
<crystalneth>
but an instance variable in a module appears to not be shared between classes the module is included in
<bnagy>
I think you might want class ivars
rippa has joined #ruby
<crystalneth>
bnagy: I do want a class ivar, e.g. Foo.cached_stuff. But I don't know how to assign that on a class from an included module.
<crystalneth>
maybe I need some inclusion hook magic or something
<bnagy>
class << self; @foo = ... ; end
<bnagy>
I guess you don't want to modify the including class at all?
momomomomo has quit [Quit: momomomomo]
<crystalneth>
no, i can't modify the including class
girija has quit [Ping timeout: 276 seconds]
<crystalneth>
at least, not keeping the separation clean
jfelchner has joined #ruby
<crystalneth>
I've run into this issue a few times and hacked around it, but seems there should be a good solution
<bnagy>
well it's a dirty approach
djwonk has joined #ruby
<bnagy>
so the solutions are a bit grimy :)
<crystalneth>
I don't think it's a dirty approach… just trying to do the same standard ruby idiom, but included from a module.
<crystalneth>
def get; @foo ||= something_expensive; end
kil0byte has quit [Remote host closed the connection]
<bnagy>
modules shouldn't really be setting anything in classes that include them - that's the dirty part
<crystalneth>
common on classes. but don't seem to be able to add such behavior from a module
<bnagy>
anyway, like I said, class << self should work
<crystalneth>
but modules may need to store data...
<crystalneth>
class << self works from a module ?
kofno has quit [Remote host closed the connection]
<bnagy>
yeah, because self is always the class that has included it
<bnagy>
modules are just bags of code
kil0byte has joined #ruby
<bnagy>
I mean the instance of the class that has included it sry
falood has joined #ruby
kil0byte has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
<crystalneth>
so self.instance_variable_set or something maybe will work then...
<bnagy>
yeah but that would be at the instance level
banjara has joined #ruby
<jfelchner>
crystalneth: I agree with bnagy. Your module should not have state. Additionally, your module should never expect that the class that is including it has specific behavior on it.
<crystalneth>
ah, your second statement :)
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
<jfelchner>
There can be exceptions obviously, but I'd look hard at the implementation to see if you can do it a different way.
<crystalneth>
jfelchner: this is a custom module for caching, so it is inherently stateful
<jfelchner>
crystalneth: Okie :)
pierre1 has quit [Quit: Leaving]
codelurker has quit [Quit: Leaving]
<ghanima>
bnagy: that is what I thought ok let me give it a try to see if its what I was trying to do.
<ghanima>
thanks man
<crystalneth>
self.class.instance_variable_set('@foo', 'bar') does not seem to work :-/
guiocavalcanti has quit [Remote host closed the connection]
guiocavalcanti has joined #ruby
Eaven has joined #ruby
<crystalneth>
and classes should probably not have state either - depending who you ask. but that's a functional programming debate, so not going there :)
<jfelchner>
crystalneth: trololololol
<banister`sleep>
jfelchner: this seems weird: "Additionally, your module should never expect that the class that is including it has specific behavior on it."
<banister`sleep>
jfelchner: Enumerable/Comparable work on the basis that your class implements certain methods ;)
<RubyPanther>
that is no debate, it is a settled issue; in Ruby classes are regular objects. Except when they're not.
gorpon has joined #ruby
bdnchr has quit [Ping timeout: 256 seconds]
rburton- has joined #ruby
<jfelchner>
banister`sleep: It's good general practice, not an absolute. :) And the only method Enumerable needs is #each so you have high value for low coupling.
krombr has quit [Remote host closed the connection]
<jfelchner>
crystalneth: I *know* you can get access to the class by using def included(base); base.class; end I don't know your use case, but maybe that will help.
<jfelchner>
crystalneth: Sorry, `base` IS the class
guiocavalcanti has quit [Ping timeout: 256 seconds]
phipes has quit [Quit: phipes]
rippa has quit [Ping timeout: 240 seconds]
<bnagy>
crystalneth: :@foo
Kricir has quit [Remote host closed the connection]
skasio has quit [Remote host closed the connection]
<crystalneth>
bnagy: ?
skasio has joined #ruby
<bnagy>
use the symbolised version of @foo and it should work
<bnagy>
I was trying to avoid typing that whole damn thing out :)
twoism has joined #ruby
ariedler has quit [Remote host closed the connection]
<bnagy>
once you've done it once you'll find the class itself should respond to instance_variable_get for :@foo, so all new instances have access to it
reset_ has joined #ruby
<crystalneth>
module Foo; def set val; self.class.instance_variable_set(:@foo, val); end; def get; return @foo; end; end
<crystalneth>
class C; include Foo; end
<crystalneth>
C.new.set 'foo'
<crystalneth>
C.new.get
<crystalneth>
=> nil
<crystalneth>
:/
<bnagy>
sure
<bnagy>
your get is wrong
<crystalneth>
ahh
<bnagy>
you set a class ivar, you're getting an instance ivar
pitzips has quit [Quit: Leaving]
cj3kim has quit [Ping timeout: 248 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
reset has quit [Ping timeout: 256 seconds]
peteyg has joined #ruby
<bnagy>
you could have your module persist to a DB, it could persist to a PStore
ThePicard_ has joined #ruby
<bnagy>
your module could persist to a Singleton class it creates just to cache its stuff
BonSequitur has joined #ruby
<bnagy>
all of these would be clean implementations
Dummies_freelanc has quit [Ping timeout: 256 seconds]
reset_ has quit [Ping timeout: 256 seconds]
<crystalneth>
ok, got it. thanks!
sangwei has joined #ruby
breadthfirst has quit [Remote host closed the connection]
<crystalneth>
bnagy: but the singleton class would still need to be specific to each class it was included in, so require some sort of reference to the base class
breadthfirst has joined #ruby
Spaceghost|work has quit [Remote host closed the connection]
johnrlive has quit [Remote host closed the connection]
<bnagy>
you could just have a cache per class
twoism has quit [Remote host closed the connection]
<bnagy>
cache[Frob] => { stuff for Frob class ]
<bnagy>
module correct braces etc
Cultofmetatron has joined #ruby
twoism has joined #ruby
<crystalneth>
bnagy: that's slightly cleaner in some ways than the class instance variable, but more complex in others, and in this case it doesn't much matter
ThePicard_ has quit [Client Quit]
lewix has joined #ruby
cj3kim has joined #ruby
ThePicard_ has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
<crystalneth>
and I think that would require @@cache in the module
<bnagy>
no
<bnagy>
I would never suggest anything that required @@anything and call it clean :)
<crystalneth>
but @cache would be instance specific and not actually cache...
<bnagy>
no cause the cache would be a Singleton - there's only ever one instance
ttt has joined #ruby
alx- has quit [Quit: alx-]
<bnagy>
so all lookups on that cache would use the one and only cache for your Module
raz has quit [Ping timeout: 260 seconds]
ThePicard_ has quit [Client Quit]
raz has joined #ruby
raz has quit [Changing host]
raz has joined #ruby
ThePicard_ has joined #ruby
ghanima has quit [Quit: Leaving.]
freeayu has quit [Ping timeout: 248 seconds]
<bnagy>
anyway, whatever, I am not a decoupling salesperson
ThePicard_ has quit [Client Quit]
w|t has quit [Quit: Computer has gone to sleep.]
<crystalneth>
bnagy: you'd think, but not the case
<crystalneth>
module Foo; @foo = {}; def set x, y; @foo[x] = y; end; def get x; @foo[x]; end; end
<crystalneth>
class A; include Foo; end
<crystalneth>
A.new.get "x"
<crystalneth>
=> NoMethodError: undefined method `[]' for nil:NilClass
<bnagy>
no
<bnagy>
that's not what a singleton is at all
Loaft has quit [Ping timeout: 248 seconds]
<crystalneth>
If Foo is a singleton, there is one instance, and @foo should always be the same object, no?
<bnagy>
only classes can be Singleton, and you need to include Singleton when you write them
<bnagy>
and you use Klass.instance not new
<bnagy>
BUT it's a pretty rare pattern
akhet has quit [Remote host closed the connection]
HecAtic has joined #ruby
<bnagy>
anyway, Modules that act like classes ( have internal state ) - I'd just use a class, y'know
<crystalneth>
yeah, I think modules are a nightmare. ruby never fails to astound me in how it makes simple things complex, or rather makes making complex things simple so complex.
Silent__ has joined #ruby
<bnagy>
it's our secret plot to railroad people into good design
ThePicard_ has joined #ruby
ThePicard has quit [Quit: Engage]
ThePicard_ is now known as ThePicard
larissa has quit [Ping timeout: 260 seconds]
Takehiro_ has joined #ruby
jamesfung14 has quit [Quit: Leaving]
Hobogrammer_ has quit [Ping timeout: 240 seconds]
<crystalneth>
skeptical
r0bby_ has joined #ruby
graft has quit [Ping timeout: 260 seconds]
Cultofmetatron has joined #ruby
larissa has joined #ruby
Takehiro_ has quit [Remote host closed the connection]
<crystalneth>
yeah, I don't see the point of the module/class distinction and variable types and the rest of the mind numbing stuff. makes me long for the simplicity of java/coffeescript. :/
<banister`sleep>
crystalneth: coffeescript is largely inspired by ruby, just read through the documentation the word "ruby" occurs all over the place
<banister`sleep>
crystalneth: so there's something about ruby the author liked -- keep at it, and you might see it too
reset has quit [Ping timeout: 245 seconds]
<banister`sleep>
crystalneth: underscore.js is also basically just a port of ruby's core library to javascript
<crystalneth>
banister`sleep: indeed. ruby has lots of nice things, but lots of mess. coffeescript manages to copy those without the mess.
<banister`sleep>
crystalneth: No offense -- but you seem extremely new to ruby. I'm not sure yu're in a position to differentiate between "mess" and your own confusion at this point (and no, one does not imply the other, some ideas are just subtle :)
Cultofmetatron has quit [Remote host closed the connection]
<joonty>
so, I've managed to get this far in ruby without ever using an Enumerator
<joonty>
can anyone explain to me a good case for using it?
<bnagy>
so many
<joonty>
just one :)
<bnagy>
generators etc - any external iterator
<joonty>
the difficulty I've found in understanding it is that all the examples I've seen are totally abstract, or could be much simpler by just using an array
<bnagy>
the idea is that you have an object which will produce a stream of things, but you don't want to handle them all right this second for whatever reason
thomasle_ has quit [Remote host closed the connection]
<bnagy>
say you're sending test cases to an app ( an example dear to my heart )
<joonty>
so all enumerators are lazy?
<joonty>
yup
hogeo has joined #ruby
<bnagy>
not all
arya has joined #ruby
<joonty>
ok
<bnagy>
they put lazy in 2.0, otherwise you used to have to fake it with fibers and stuff
brain_shim has quit [Quit: Leaving]
<joonty>
ah gotcha
<tobiasvl>
in ruby, enumerators are used for everything
cj3kim has joined #ruby
<tobiasvl>
loops
<tobiasvl>
iterators
crystalneth has quit [Quit: crystalneth]
emergion has joined #ruby
<tobiasvl>
i find it hard to believe you've never used one, joonty :)
<bnagy>
joonty: anyway, so it's easier ( test cases ) to say give me a case, then do lots of stuff with that, which could involve who knows what error handling blah blah
<joonty>
so you would drop down from an enumerable (e.g. array) to an enumerator if you need to handle the loop in more than one place?
<bnagy>
then you finish up and explicitly say case_gen.next
<JohnWho>
I've created a class which it has some constant hashes. How can I create dynamic methods or something to get their values like: MyClass.myhash.hashkey (and show the value) instead of calling it like Myclass::MYHASH[:hashkey] which is the default?
<bnagy>
yeah or if you needed to pass it around between objects, say
<joonty>
tobiasvl: I'm talking specifically about the Enumerator class
<bnagy>
JohnWho: check OpenStruct
daniel_hinojosa has quit [Quit: Leaving.]
obs has quit [Quit: Konversation terminated!]
<joonty>
bnagy: but if you're handling those test cases in one place anyway, what's the benefit of using an enumerator over an array?
<bnagy>
joonty: eg I have stuff which build a generator ( just imagine I am saying Enumerator ) in one class, and then passes that to a class that runs through it and does the delivery and stuff
obs has joined #ruby
<bnagy>
so my build the thing code can be decoupled from the deliver the test code
mikecmpbll has joined #ruby
<joonty>
bnagy: so they would be working simultaneously?
<joonty>
bnagy: whereas with an array you would have to build the whole thing then pass the finished array?
<JohnWho>
yes I know the openstruct and I have implemented something similar, my main problem is that when I am calling the new method, the self is transfering to the new class so I can't catch it with method_missing or something else
<JohnWho>
I don't want only to add something like Myclass.amethod I'd like to add MyClass.amethod.another_method
sayan has joined #ruby
<joonty>
bnagy: thanks, this is really helpful
ferdev has joined #ruby
<bnagy>
JohnWho: create the OpenStruct, assign it to @amemthod, then attr_reader :amethod ?
greengriminal has joined #ruby
<bnagy>
joonty: that's witchcraft code, but it will lazily walk through the cartesian product of a collection of collections, but they can also be generators - so you can have truly lazy eval
<joonty>
so next will
<joonty>
sorry
<joonty>
so #next will evaluate the next value there an then
<JohnWho>
you mean attr_reader :another_method ?
Criztian has joined #ruby
<bnagy>
JohnWho: yeah, which would then return your Ostruct, and the method missing on the ostruct will get your value
<bnagy>
joonty: yep, and yield it, and then sit very still not eating CPU
<JohnWho>
maybe it is a solution even though I'd like to be a class method not an object method
<bnagy>
until you ask it to do other things
<joonty>
bnagy: that's great, thanks for the explanation
<bnagy>
JohnWho: then make it a class method :)
<JohnWho>
ok I'll try and come back :)
<joonty>
bnagy: I can think of some code I've written that could do with some optimisation :)
julianhu_ has quit [Remote host closed the connection]
<bnagy>
imho Enumerators or Generators or whatever are a fairly rare pattern until you need them, then you can't imagine anything else
<bnagy>
like how it took until now to get proper lazy enums is beyond me
julianhurley has joined #ruby
rdark has joined #ruby
mengu has joined #ruby
<joonty>
interesting
bionhart has quit [Remote host closed the connection]
Zai00 has joined #ruby
bartavelle has left #ruby ["couic"]
_KGBot_ has quit [Remote host closed the connection]
joonty has quit [Quit: leaving]
emergion has quit [Quit: Computer has gone to sleep.]
johnrlive has joined #ruby
Gooder``` has joined #ruby
<Psy-Q>
some years back there was a beautiful essay about why it's wise to write tests, and how not doing it will bite you in the arse years later. does anyone have a link to that?
granticus has joined #ruby
slainer68 has joined #ruby
<Psy-Q>
i can't seem to find it anymore
<Psy-Q>
it was written in a kind of "i once thought tests were a waste of time, but i learned the opposite the hard way" style
camilasan has joined #ruby
nmabry has quit [Read error: Connection reset by peer]
daniel_- has joined #ruby
nmabry has joined #ruby
johnrlive has quit [Ping timeout: 252 seconds]
corehook has joined #ruby
Gooder`` has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
dhruvasagar has quit [Quit: leaving]
dhruvasagar has joined #ruby
niklasb has joined #ruby
pyrac has joined #ruby
obs has quit [Quit: Konversation terminated!]
yacks has quit [Ping timeout: 264 seconds]
<whowantstolivefo>
hi, i am reading the book of Eloquent Ruby written by Russ Olsen and im at 117th. page... in book a part written by author so " If you continue to write static type style base classes, your code will continue to be much bulkier than it might be. <<< what does mean static type style base class ? different thing ?
obs has joined #ruby
Al_ has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
<whowantstolivefo>
bnagy: and Psy-Q : ~
patteh has quit [Quit: leaving]
monkegj__ has quit [Ping timeout: 264 seconds]
arya has quit [Ping timeout: 248 seconds]
rdark_ has joined #ruby
mahmoudimus has joined #ruby
timmow has joined #ruby
timmow has quit [Read error: Connection reset by peer]
isern has joined #ruby
ipalaus has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
isern is now known as ipalaus
ipalaus has quit [Changing host]
ipalaus has joined #ruby
timmow has joined #ruby
mafolz has quit [Remote host closed the connection]
keanehsiao has quit [Quit: keanehsiao]
yacks has joined #ruby
mafolz has joined #ruby
rdark has quit [Ping timeout: 276 seconds]
<bnagy>
whowantstolivefo: it's not good form to highlight people for no reason
Takehiro has quit [Remote host closed the connection]
<aganov>
Hi all, how can I sort hash by keys? ruby 1.9.3 (Rails 4), {"c" => "fee", "a" => "bar", "b" => "foo"} => {"a" => "bar", "b" => "foo", "c" => "fee"}
pcboy_ has quit [Read error: Operation timed out]
arya has joined #ruby
slightair has quit [Ping timeout: 256 seconds]
yshh_ has joined #ruby
stewart_ has joined #ruby
_KGBot_ has joined #ruby
<tobiasvl>
sort ?
<bnagy>
I thought hashes _did_ sort by keys by default?
fphilipe has quit [Remote host closed the connection]
postmodern has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
lukehold_ has joined #ruby
crystalneth has joined #ruby
monkegjinni has joined #ruby
megha has quit [Read error: Operation timed out]
monkegji_ has quit [Read error: Connection reset by peer]
w|t has quit [Quit: Computer has gone to sleep.]
<Spooner>
rajkosto, There is plenty about RubyOnRails (and #rubyonrails) if you want that route. Also consider Sinatra for lighter work.
w|t has joined #ruby
Takehiro has joined #ruby
arturaz has quit [Quit: Leaving]
zeeraw has quit [Quit: Computer has gone to sleep.]
khushildep has joined #ruby
brian`_ has quit [Read error: Operation timed out]
brian` has joined #ruby
nobitanobi has joined #ruby
Domon has quit [Remote host closed the connection]
BeegPeeg00 has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
johnrlive has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
skattyadz has joined #ruby
jgrevich has quit [Remote host closed the connection]
johnrlive has quit [Ping timeout: 252 seconds]
breadthfirst has quit [Ping timeout: 248 seconds]
falood has quit [Remote host closed the connection]
k13n has joined #ruby
<Psy-Q>
does anyone remember that article/essay about why testing is important? it went viral about three years ago, but i can't find it anymore
nari_ has quit [Ping timeout: 240 seconds]
daniel_- has joined #ruby
MrZYX is now known as MrZYX|off
nouh_ has quit [Remote host closed the connection]
thomasle_ has joined #ruby
krombr has quit [Remote host closed the connection]
arya has joined #ruby
Domon has joined #ruby
mstuefer has joined #ruby
mstuefer has left #ruby [#ruby]
niceguyjames has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
platzhirsch1 has joined #ruby
sayan has joined #ruby
evenix has joined #ruby
krz has quit [Ping timeout: 248 seconds]
niklasb has quit [Ping timeout: 248 seconds]
guiocavalcanti has joined #ruby
freeayu has joined #ruby
pcarrier_ has quit [Quit: Computer has gone to sleep.]
platzhirsch has quit [Ping timeout: 245 seconds]
Fisix_AIX has joined #ruby
daniel_- has quit [Ping timeout: 248 seconds]
krz has joined #ruby
<Fisix_AIX>
Hello, I am trying to find the best way to get sll certificate information for a given domain name, such as expiry date. What would be the best gem or way to do this?
kofno has joined #ruby
nkr has joined #ruby
platzhirsch1 has quit [Ping timeout: 248 seconds]
yashshah has quit [Read error: Connection reset by peer]
ParanoidSP has quit [Read error: Connection reset by peer]
sleetdrop has quit [Ping timeout: 248 seconds]
yashshah has joined #ruby
<jbw>
I'm trying to create a simple dsl on top of an activerecord model, i want to build up a list of id's which get specified via multiple dsl calls in the class, the catch is I want to enumerate the list of ids for an instance of the class.. any pointers?
k13n has quit [Ping timeout: 260 seconds]
Al_ has joined #ruby
bradhe has joined #ruby
ParanoidSP has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
fphilipe has joined #ruby
r0bby has joined #ruby
khushildep has quit [Ping timeout: 240 seconds]
<bnagy>
dsl-ception
renanoronfle has joined #ruby
Fisix_AIX has quit [Quit: Leaving]
<bnagy>
try one of the rails channels, they're a lot better with Active*
bradhe has quit [Ping timeout: 248 seconds]
<jbw>
will do, thanks
Domon has quit [Remote host closed the connection]
krandi has joined #ruby
S1kx has quit [Quit: Leaving]
andikr has quit [Ping timeout: 245 seconds]
ntus1017 has quit [Remote host closed the connection]
dangerousdave has quit [Read error: Connection reset by peer]
ttt has joined #ruby
dangerousdave has joined #ruby
Peej has quit [Read error: Operation timed out]
ldnunes has joined #ruby
jfelchner has quit [Ping timeout: 252 seconds]
julianhurley has quit [Remote host closed the connection]
ttt has quit [Remote host closed the connection]
gommo has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
sailias has quit [Ping timeout: 256 seconds]
arya has quit [Ping timeout: 248 seconds]
emergion has joined #ruby
postmodern has quit [Quit: Leaving]
lukehold_ has quit [Ping timeout: 256 seconds]
k13n has joined #ruby
breadthfirst has joined #ruby
sayan has quit [Ping timeout: 260 seconds]
devoldmx3 has joined #ruby
arya has joined #ruby
eka has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
m8 has joined #ruby
foohey has quit [Quit: leaving]
breadthfirst has quit [Ping timeout: 248 seconds]
maetthew has joined #ruby
Kar- has joined #ruby
kf8a has joined #ruby
threesome has quit [Ping timeout: 248 seconds]
mklappstuhl has quit [Ping timeout: 256 seconds]
pskosinski has joined #ruby
yshh has quit [Remote host closed the connection]
robertjpayne has joined #ruby
bugg has quit [Remote host closed the connection]
sailias has joined #ruby
LennyLinux has joined #ruby
persand has quit [Quit: persand]
bamdad has quit [Quit: bamdad]
devoldmx3 has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
persand has joined #ruby
crystalneth has quit [Ping timeout: 240 seconds]
krz has quit [Quit: krz]
nowthatsamatt has joined #ruby
jcromartie has joined #ruby
Alina-malina has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Quit: Computer has gone to sleep.]
falood has joined #ruby
jurbat has quit [Quit: Computer has gone to sleep.]
jetblack has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
bradhe has joined #ruby
dpollen has joined #ruby
MrZYX|off is now known as MrZYX
Dummies_freelanc has joined #ruby
mark_locklear has joined #ruby
mikecmpbll has joined #ruby
devoldmx has quit [Ping timeout: 245 seconds]
rouss has joined #ruby
dpollen has quit [Quit: dpollen]
workmad3 has joined #ruby
takeru has joined #ruby
takeru has quit [Remote host closed the connection]
iMadper has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
ttt has joined #ruby
guiocavalcanti has quit []
wu_lmao has joined #ruby
guiocavalcanti has joined #ruby
devoldmx has joined #ruby
osvico has joined #ruby
norm has quit [Quit: norm]
gasbakid has joined #ruby
krandi has quit [Quit: No Ping reply in 180 seconds.]
andikr has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
cleverma_ has quit [Remote host closed the connection]
cj3kim has joined #ruby
sayan has joined #ruby
ttt has quit [Ping timeout: 276 seconds]
cj3kim has quit [Ping timeout: 260 seconds]
IrishGringo has joined #ruby
tomzx_mac has joined #ruby
Hanmac has joined #ruby
ExxKA has joined #ruby
cantonic has quit [Quit: cantonic]
Peej has joined #ruby
sayan has quit [Ping timeout: 248 seconds]
<Hanmac>
looking for someone that wants to design an new RPG Maker, (we need more developer), needed skills & languages: Ruby/C++/XML ... there allready exist some stuff but we are still far away from the first alpha
platzhirsch has joined #ruby
devoldmx has joined #ruby
<platzhirsch>
I want to give my metric classes an additional name attribute, because I use it for identification in the database, etc. actually I could compute the name out of the class name, do you think I should just write a def name method?
cofin has quit [Quit: cofin]
niklasb has joined #ruby
<tobiasvl>
platzhirsch: i'm not sure i understand you, but just make a @name var and do attr_reader :name ?
ksmth has joined #ruby
pcarrier_ has joined #ruby
DestinyAwaits has joined #ruby
DestinyAwaits has quit [Changing host]
DestinyAwaits has joined #ruby
theRoUS has quit [Ping timeout: 276 seconds]
<platzhirsch>
tobiasvl: That would do, too. It's just about where I define the name, actually this is a class variable
<platzhirsch>
maybe I just hardcode it @@name = "my_blah_metric"
RiftyMcF3arless has quit [Ping timeout: 276 seconds]
megha has joined #ruby
jurbat has joined #ruby
supc0nt has quit [Quit: leaving]
staafl has joined #ruby
johnrlive has quit [Ping timeout: 252 seconds]
ferdev_ has quit [Ping timeout: 260 seconds]
nobitanobi has quit [Ping timeout: 256 seconds]
jurbat has quit [Quit: Computer has gone to sleep.]
monkegji_ has quit [Ping timeout: 252 seconds]
lockweel has joined #ruby
browndawg has quit [Quit: Leaving.]
workmad3 has quit [Ping timeout: 252 seconds]
k13n has quit [Ping timeout: 260 seconds]
browndawg has joined #ruby
virtuose has quit [Ping timeout: 240 seconds]
carloslopes has joined #ruby
ferdev has joined #ruby
MrZYX is now known as MrZYX|off
wmoxam has joined #ruby
zastaph has joined #ruby
zeeraw has joined #ruby
JDGuingao has joined #ruby
ferdev has quit [Ping timeout: 260 seconds]
ExxKA has quit [Ping timeout: 245 seconds]
platzhirsch has quit [Quit: Leaving.]
platzhirsch1 has joined #ruby
ferdev has joined #ruby
ntus1017 has quit [Remote host closed the connection]
XtraGas has joined #ruby
persand has quit [Quit: persand]
kf8a has quit [Quit: Computer has gone to sleep.]
bamdad has joined #ruby
lockweel has quit [Ping timeout: 252 seconds]
senayar has quit [Remote host closed the connection]
duncan_bayne has joined #ruby
Takehiro has quit [Remote host closed the connection]
splittingred has joined #ruby
tealmage has joined #ruby
volume has joined #ruby
<duncan_bayne>
Hi, I'm having some issues using SSL client certs and restclient. The code in https://gist.github.com/duncan-bayne/5635846 results in consistent 400 errors. Is there any good documentation on using client certs with restclient?
sambao21 has joined #ruby
<duncan_bayne>
I've found some docs but they've been ... spartan.
tealmage has quit [Remote host closed the connection]
freerobby has joined #ruby
krombr has joined #ruby
jlast has joined #ruby
lockweel has joined #ruby
rudisimo has joined #ruby
k13n has joined #ruby
virtuose has joined #ruby
camilasan has joined #ruby
zastaph has left #ruby [#ruby]
persand has joined #ruby
vlad_starkov has joined #ruby
dan2552 has joined #ruby
lockweel has quit [Quit: ChatZilla 0.9.90 [Firefox 21.0/20130511120803]]
daniel_- has joined #ruby
statarb3 has quit [Read error: Connection reset by peer]
breakingthings has joined #ruby
jlast has quit [Remote host closed the connection]
jlast has joined #ruby
crystalneth has joined #ruby
yshh has joined #ruby
bradhe has joined #ruby
tk_ has joined #ruby
tealmage has joined #ruby
breadthfirst has joined #ruby
k13n has quit [Ping timeout: 260 seconds]
bsdbandit has joined #ruby
arietis has joined #ruby
<bsdbandit>
good morning all i currently code in python just curious about ruby
mmitchell has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
jurbat has joined #ruby
freerobby has quit [Quit: Leaving.]
yshh has quit [Ping timeout: 256 seconds]
filipe has quit [Ping timeout: 248 seconds]
bradhe has quit [Ping timeout: 264 seconds]
TheDick has joined #ruby
devoldmx3 has joined #ruby
akhet has joined #ruby
akhet has joined #ruby
akhet has quit [Changing host]
krombr has quit [Remote host closed the connection]
ParanoidSP has quit [Remote host closed the connection]
alx- has joined #ruby
nobitanobi has joined #ruby
troessner has quit [Quit: Leaving]
fuzzyhorns has joined #ruby
ferdev has quit [Ping timeout: 256 seconds]
devoldmx has quit [Ping timeout: 256 seconds]
bugg has joined #ruby
cantonic has joined #ruby
ttt has joined #ruby
_nitti has joined #ruby
nari_ has joined #ruby
kpshek has joined #ruby
ferdev has joined #ruby
ravster has joined #ruby
tomzx_mac has quit [Ping timeout: 256 seconds]
gaahrdner has joined #ruby
<canton7>
bsdbandit, out of the people who know both well, some prefer ruby, some python, so I'm not going to claim one's better than the other. Main differences (as I see it) like in lambdas/blocks, list comprehensions, gloal functions, "everything's an object", idioms vs stdlib methods, and aliassing (toowtdi vs "pick the method that best describes your intention")
ttt has quit [Ping timeout: 276 seconds]
daniel_- has quit [Ping timeout: 245 seconds]
dustint has joined #ruby
v0n has joined #ruby
daniel_- has joined #ruby
sethetter has joined #ruby
arya_ has joined #ruby
arya has quit [Ping timeout: 248 seconds]
<sethetter>
I'm trying to run irb and getting "Illegal instruction 4", google is failing me, any hints?
yashshah has joined #ruby
arya_ is now known as arya
<canton7>
sethetter, it's failing when you try to run irb, or run something inside it?
megha has quit [Quit: WeeChat 0.4.0]
nezumi has quit [Ping timeout: 245 seconds]
<canton7>
also, OS/X?
cofin has joined #ruby
<sethetter>
Yes and yes
Takehiro has joined #ruby
<canton7>
there are lots of google results for "Illegal instruction 4". Seems to be a problem running an application compiled for newer OS/X on older OS/X?
filipe has joined #ruby
chxane has joined #ruby
kofno has quit [Remote host closed the connection]
yashshah_ has joined #ruby
yashshah has quit [Ping timeout: 245 seconds]
newUser1234 has joined #ruby
thomasle_ has quit [Remote host closed the connection]
jerius has joined #ruby
milestone has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
<sethetter>
Weird..
<sethetter>
Ok, well that gives me a starting point, Thanks for that :)
rdark_ has quit [Quit: leaving]
alexgordon has joined #ruby
<milestone>
hi folks … i am calling a subcommand from a ruby script using exec and then I detach from it using Process.detach() so i can go on with my script. but the subcommand prints on stderr and stdout. is there a way to have it print its output elsewhere?
wildcard0 has quit [Read error: Connection reset by peer]
wildcard0 has joined #ruby
clevermatt has joined #ruby
<hoelzro>
milestone: reopen its stdout/stderr
<canton7>
re-open $stdout and $stderr somewhere else?
<duncan_bayne>
Anyone know of some good docs for SSL client cert authentication with RestClient? I'm struggling ( stackoverflow.com/questions/16715479 ) :(
Kar- has quit [Remote host closed the connection]
cheese1756 has joined #ruby
UForgotten has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
pyrac has quit [Quit: pyrac]
workmad3 has quit [Ping timeout: 256 seconds]
monkegjinni has quit [Read error: Operation timed out]
bamdad has quit [Quit: bamdad]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx3 has joined #ruby
<milestone>
hoelzro: i need stdout to behave normally though
momomomomo has quit [Quit: momomomomo]
<hoelzro>
milestone: so don't redirect stdout?
akells` has joined #ruby
<UForgotten>
anyone have time to help a ruby noob parse a foreign struct?
bamdad has joined #ruby
jonathanwallace has joined #ruby
<milestone>
hoelzro: i need to redirect only the stdout and the stderr of the subcommand since i am still printing out instructions on the screen
akells` has quit [Remote host closed the connection]
* hoelzro
is confused
<hoelzro>
you need to redirect stdout and stderr, but you need stdout to behave normally?
<hoelzro>
that sounds contradictory
<milestone>
hoelzro: ok let me ask again
<milestone>
my script is forking
volume has quit [Quit: Computer has gone to sleep.]
clevermatt has quit [Remote host closed the connection]
<milestone>
a subcommand and then detaches from it
<milestone>
and prints stuff on stdout
<milestone>
but the subcommand that i detached from
osvico has quit [Ping timeout: 264 seconds]
<milestone>
prints stuff on stdout as well
<milestone>
i need to redirect that so it does not mess up my messages i am printing on stdout
<milestone>
does that make sense?
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
<hoelzro>
so both the parent and child need to print messages to stdout, but you need to make sure that they don't interfere with each other?
sethetter has quit [Ping timeout: 240 seconds]
<milestone>
hoelzro: i don't care about the messages of the child
<hoelzro>
ok, so you redirect the stdout of the child
johnnyfuchs has quit [Remote host closed the connection]
johnnyfuchs has joined #ruby
yshh has quit [Ping timeout: 256 seconds]
bradhe has quit [Ping timeout: 248 seconds]
kf8a has quit [Quit: Computer has gone to sleep.]
falood has quit [Remote host closed the connection]
viszu has joined #ruby
_nitti_ has joined #ruby
philcrissman has quit [Remote host closed the connection]
pitzips has joined #ruby
fermion has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<joshu>
any recommendations for converting .TIF to .PDF using ruby? At the moment I'm looking at calling tiff2pdf.
ttt has joined #ruby
gaahrdner has joined #ruby
gorpon has joined #ruby
_nitti has quit [Ping timeout: 252 seconds]
RORgasm_ has joined #ruby
RORgasm has quit [Read error: Connection reset by peer]
<hoelzro>
joshu: what's wrong with tiff2pdf?
Armon has quit [Ping timeout: 252 seconds]
randomlogin has quit [Quit: randomlogin]
<joshu>
hoelzro nothing just asking wait the community would use
<joshu>
*what
<hoelzro>
my 2c is that if tiff2pdf works, use it =)
myu has joined #ruby
ffranz has joined #ruby
ttt has quit [Ping timeout: 256 seconds]
l33 has joined #ruby
<mikewintermute>
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Any suggestions? https://gist.github.com/anonymous/5635345
mljsimone has joined #ruby
tagrudev has quit [Remote host closed the connection]
JDGuingao has quit [Quit: Leaving]
haxrbyte has quit [Remote host closed the connection]
alex__c2022 has quit [Ping timeout: 264 seconds]
haxrbyte has joined #ruby
alex__c2022_ has joined #ruby
Guest27861 has quit [Ping timeout: 248 seconds]
nobitanobi has quit [Ping timeout: 256 seconds]
wallerdev has joined #ruby
robertjpayne has quit [Remote host closed the connection]
zeeraw has joined #ruby
wesside has joined #ruby
artworx has joined #ruby
anonymuse has joined #ruby
bionhart has joined #ruby
kofno has joined #ruby
teclator has joined #ruby
cmarques has quit [Read error: Connection reset by peer]
cmarques has joined #ruby
Trynemjoel has quit [Quit: Trynemjoel]
rhys has joined #ruby
pyrac has quit [Quit: pyrac]
monkegjinni has quit [Read error: No route to host]
monkegjinni has joined #ruby
tomkad has joined #ruby
kofno has quit [Ping timeout: 245 seconds]
nouh has joined #ruby
momomomomo has joined #ruby
newUser1234 has quit [Write error: Connection reset by peer]
newUser1_ has joined #ruby
jamesaxl_ has quit [Ping timeout: 240 seconds]
generalissimo has joined #ruby
wallerdev has quit [Quit: wallerdev]
DanKnox_away is now known as DanKnox
Trynemjoel has joined #ruby
monkegjinni has quit [Remote host closed the connection]
breadthfirst has quit [Remote host closed the connection]
platzhirsch has left #ruby [#ruby]
jsaak has joined #ruby
arya has quit [Ping timeout: 256 seconds]
spider-mario has joined #ruby
_Amaan has joined #ruby
vlad_starkov has joined #ruby
mad_hatter_ has quit [Quit: Leaving.]
vlad_starkov has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<fragmachine>
mikewintermute: What do you expect and what happens?
<ArchBeOS>
maybe you guys might laugh at this. i just got a new box at work and needed to set up my .irbrc file (forgot to grab it from the old box) so i googled some examples for hirb (been a while since i even messed with it) when lo and behold there's my irbrc file as a gist on my github. completly forgot that i had that.
<tymat>
mikewintermute: can you unload pry?
<tymat>
err try in irb rather
<fragmachine>
ArchBeOS: problem solved
sam113101 has quit [Quit: WeeChat 0.4.0]
<ArchBeOS>
fragmachine: i tell you when i was reading the gist I said "wtf was this guy thinking!" then I saw who owned the gist....and i was the guy....
enebo has joined #ruby
<fragmachine>
ArchBeOS: That's kinda awesome...
<ArchBeOS>
yes it is
kil0byte has joined #ruby
<mikewintermute>
tymat: not sure how I'd do that. I'm running a Capistrano command like this: cap web_server:ls -s opt1=test
workmad3 has quit [Ping timeout: 245 seconds]
staafl has quit [Ping timeout: 256 seconds]
renanoronfle has joined #ruby
<fragmachine>
ArchBeOS: One day, people will try and use my code and get confused
<fragmachine>
ArchBeOS: On that day I will know I've made it haha
sam113101 has joined #ruby
<fragmachine>
Not that I write hard to understand code
<ArchBeOS>
lol
<fragmachine>
I try not to
<fragmachine>
haha
<tymat>
mikewintermute: can you gist your capistrano configuration?
<fragmachine>
really
<tymat>
mikewintermute: it looks like the cap command you are using isn't passing the command line argument properly
casheew has quit [Read error: Connection reset by peer]
<ArchBeOS>
as atwood says "if you gotta comment code a lot you're doing it wrong " (paraphrase)
casheew has joined #ruby
jprovazn is now known as jprovazn_afk
horrror has joined #ruby
zeade has joined #ruby
girija has quit [Remote host closed the connection]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<fragmachine>
ArchBeOS: I'm learning, so I comment my code hard. Just so I can remember why I did something!
<aedorn>
I comment code so the Java developers can understand it.
mark_locklear has quit [Ping timeout: 256 seconds]
<ArchBeOS>
i do it for .NET devs over here...
<ArchBeOS>
i use ruby mainly as a QA tool for .NET sites
<fragmachine>
2Does anyone seriously write in VB?
<fragmachine>
is that a thing?
<ArchBeOS>
yes
apalmblad has quit [Quit: apalmblad]
<aedorn>
Sure ... small Windows utilities mostly
<ArchBeOS>
there are whole shops based on VB.NET/ASP.NET
k13n has joined #ruby
volume has joined #ruby
<ArchBeOS>
i hate it, but i have seen stuff get built rather quickly
<fragmachine>
I dislike writing in it
<interactionjaxsn>
a lot of gov shops use VB.NET/ASP.NET
kil0byte has quit [Remote host closed the connection]
<fragmachine>
It's true, when learning, you should use C/C++ or C#, so when you hit Ruby or Python you're like that's amazing. When you start with Ruby all the other langages feel restrictive.
senayar has quit [Remote host closed the connection]
kil0byte has joined #ruby
<ArchBeOS>
yeah
<ArchBeOS>
i started with JAva
tealmage has joined #ruby
<fragmachine>
I don't mind Java
<fragmachine>
It's better then VB
vlad_sta_ has joined #ruby
chrisja has joined #ruby
danman has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
<mikewintermute>
e.g. cap web_server:ls -s "opt1='test'"
<pagios_>
hello, i am trying to replace the last line of a text file with some text i would like to input, in this case the last line is a "}" , this code is not working fine for it can you advise? http://pastie.org/7948750
newUser1_ has quit [Remote host closed the connection]
Shrink has quit [Ping timeout: 256 seconds]
DanKnox_away is now known as DanKnox
casheew has quit [Read error: Connection reset by peer]
bamdad has quit [Quit: bamdad]
dan2552 has quit [Remote host closed the connection]
jlast has joined #ruby
jlast has quit [Remote host closed the connection]
casheew has joined #ruby
LennyLinux has quit [Remote host closed the connection]
jlast has joined #ruby
nomenkun has quit [Ping timeout: 260 seconds]
graft has quit [Ping timeout: 256 seconds]
<mikewintermute>
pagios_: works for me
corridi has joined #ruby
pencil1 has left #ruby [#ruby]
<corridi>
is dis ruby on fails?
sailias has joined #ruby
Takehiro has quit [Remote host closed the connection]
xellht has quit [Remote host closed the connection]
<pagios_>
mikepack: try to read a file ending with a }
<wmoxam>
apeiros: ping
casheew has quit [Read error: Connection reset by peer]
<apeiros>
wmoxam: pong
obs has quit [Quit: Konversation terminated!]
<wmoxam>
apeiros: corridi is the same guy as yesterday
<pagios_>
mikepack: it is appending a line after the } , what i want is to remove the }
<wmoxam>
:p
<apeiros>
oh, our drug kiddy
jromine has joined #ruby
<r0bglees0n>
corridi: yes, it is, welcome!
corridi was kicked from #ruby by apeiros [good bye]
<wmoxam>
apeiros: thx
madb055 has joined #ruby
<apeiros>
thx wmoxam
sambao21 has joined #ruby
<apeiros>
did he first haunt rubyonrails?
s2013 has joined #ruby
<r0bglees0n>
those damn clojure programmers always trolling #ruby
rsimecek has quit [Remote host closed the connection]
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
slainer6_ has quit [Remote host closed the connection]
elaptics is now known as elaptics`away
tealmage has joined #ruby
tealmage has quit [Remote host closed the connection]
jgoss has joined #ruby
jgoss has quit [Changing host]
jgoss has joined #ruby
Mattix has quit [Quit: Leaving]
crystalneth has quit [Quit: crystalneth]
r0bglees0n has quit [Read error: Connection reset by peer]
palantir has quit [Ping timeout: 264 seconds]
r0bglees0n has joined #ruby
ttt has joined #ruby
robottinosino has quit [Quit: WeeChat 0.4.0]
krombr has joined #ruby
sambao21 has joined #ruby
ntus1017 has joined #ruby
gaahrdner has quit [Ping timeout: 256 seconds]
daniel_- has joined #ruby
emmanuelux has joined #ruby
mvangala_ has quit [Read error: Operation timed out]
rupee has joined #ruby
shevy has quit [Remote host closed the connection]
ttt has quit [Ping timeout: 256 seconds]
mvangala has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
JMcAfreak has joined #ruby
timmow has quit [Remote host closed the connection]
mark_locklear has joined #ruby
Xeago has joined #ruby
k3rn3lito has quit [Ping timeout: 252 seconds]
k3rn3lito has joined #ruby
daniel_- has quit [Ping timeout: 252 seconds]
Takehiro has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
horrror has quit [Quit: horrror]
brianpWins has joined #ruby
generalissimo has joined #ruby
volume has quit [Quit: Computer has gone to sleep.]
shevy has joined #ruby
<shevy>
test
druonysus has joined #ruby
druonysus has quit [Changing host]
druonysus has joined #ruby
nobitanobi has joined #ruby
banjara has joined #ruby
randomlogin has joined #ruby
dustint has quit [Quit: Leaving]
tomkad has quit [Ping timeout: 256 seconds]
druonysus has quit [Remote host closed the connection]
tjbiddle has joined #ruby
chorkpop has joined #ruby
Al_ has quit [Quit: Al_]
druonysus has joined #ruby
druonysus has quit [Changing host]
druonysus has joined #ruby
Armon has joined #ruby
jlwestsr has joined #ruby
cheese1756 has quit [Ping timeout: 256 seconds]
jeffreylevesque has joined #ruby
prk has joined #ruby
kpshek has quit []
banister`sleep has quit [Remote host closed the connection]
horrror has joined #ruby
horrror has quit [Client Quit]
<tjbiddle>
Is Pik still considered the best tool for something like RVM - but for Windows? Looks like the bulk of the repo hasn't been touched in 2 years
Takehiro has quit [Remote host closed the connection]
cheese1756 has joined #ruby
machuga|away is now known as machuga
codecop has joined #ruby
<yxhuvud>
tjbibble: virtualbox ;)
stkowski has joined #ruby
volume has joined #ruby
chorkpop has quit [Quit: leaving]
volume has quit [Max SendQ exceeded]
dangerousdave has quit [Read error: Connection reset by peer]
jlwestsr has quit [Quit: Ex-Chat]
dangerousdave has joined #ruby
daniel_- has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
madb055 has quit [Ping timeout: 252 seconds]
decentrality has quit [Quit: decentrality]
druonysus has quit [Remote host closed the connection]
<shevy>
tjbiddle: I think there are not many people using windows
<awc737>
does anyone use Debian linux? and knows the best way to install ruby
<bean__>
apt-get install ruby-1.9.1
<bean__>
?
chandankumar has joined #ruby
guillehorno has quit [Ping timeout: 248 seconds]
<awc737>
bean, supposedly debian and ruby have issues
<awc737>
at least , i have in the past, and was advised to use rvm
bean__ has quit [Client Quit]
travisjeffery has joined #ruby
clevermatt has joined #ruby
clevermatt has quit [Remote host closed the connection]
aedorn has joined #ruby
clevermatt has joined #ruby
<DanKnox>
awc737 you should always use rvm
<DanKnox>
the package managers never stay up to date with ruby releases
ananthakumaran1 has joined #ruby
<awc737>
and rvm does?
ananthakumaran has quit [Ping timeout: 264 seconds]
robscomputer has joined #ruby
<DanKnox>
yeah it pulls whichever version you want and compiles it for you
postmodern has joined #ruby
<DanKnox>
i guess it also looks for binaries available now as well
havenwood has quit [Remote host closed the connection]
akells` has joined #ruby
<DanKnox>
it also lets you switch between ruby versions
<DanKnox>
which is very handy depending on what you are doing
bean__ has joined #ruby
bean__ has quit [Max SendQ exceeded]
Cultofmetatron has joined #ruby
zommi has joined #ruby
bean__ has joined #ruby
<awc737>
building web2.5 cloudAjax webscale saas apps with ruby of course
<awc737>
what else does one do with ruby
ebouchut has joined #ruby
brtdv has joined #ruby
danslo has quit [Quit: danslo]
khismetix has joined #ruby
rudisimo has quit [Quit: Leaving.]
monkegjinni has quit [Remote host closed the connection]
gina_sorn has joined #ruby
<becom33>
is it bad programing if I use if else too much in a program ?
<awc737>
how much is too much
Takehiro has quit [Remote host closed the connection]
emmanuelux has quit [Quit: emmanuelux]
<gina_sorn>
Hi, i'm on a windows machine and have installed Ruby 2.0 through rubyinstaller.org. I have huge troubles installing gems. I have acquired the Devkit, yet I get errors: Error failed to build gem native extension.
<gina_sorn>
The gems im trying to install: sproutcore, eventmachine
<becom33>
like if inside a if and then again in the else there is a another if and another else
marr has joined #ruby
JZTech101 has joined #ruby
bionhart has quit [Remote host closed the connection]
v0n has joined #ruby
s2013 has quit [Ping timeout: 248 seconds]
brtdv has quit [Ping timeout: 260 seconds]
mityaz has joined #ruby
sam113101 has quit [Quit: WeeChat 0.4.0]
baba has joined #ruby
megha has quit [Ping timeout: 256 seconds]
chandankumar has quit [Quit: Leaving]
skattyadz has joined #ruby
<awc737>
is bundler similar to rvm
sam113101 has joined #ruby
blischalk has joined #ruby
DanWilson has joined #ruby
Eaven has quit [Read error: Connection reset by peer]
hydrozen has joined #ruby
<awc737>
should I go for 1.93 or 2.0?
Eaven has joined #ruby
<awc737>
I'm going to be trying Spree first
greengriminal has quit [Quit: Leaving]
<DanWilson>
Ruby Noob question. I have Ruby 1.93 installed and I can run a hello world statement in the interactive prompt. I need to now read in a CSV file and I saw this article http://ruby-doc.org/stdlib-1.9.2/libdoc/csv/rdoc/CSV.html which looks straight forward. The thing is CSV isn't defined, so I'm guessing I need to install something else... any pointers as to what that might be?
_nitti has joined #ruby
<DanWilson>
the specific error is: NameError: uninitialized constant CSV
<graft>
ooookay. so i have to parse this 5.1 GB xml file. What do I do?
end_guy is now known as endguy
waxjar has joined #ruby
colonolGron has joined #ruby
zerokarmaleft has left #ruby [#ruby]
_nitti_ has quit [Read error: Operation timed out]
akells` has quit [Remote host closed the connection]
kaneda^ has joined #ruby
danshultz has quit [Remote host closed the connection]
<kaneda^>
hey all, i have a Gemfile.lock that specifies foo (>= 2.3.14), and i have 3.2.13 installed, but i keep getting the same error telling me that it couldnt find 2.3.14
workmad3 has quit [Ping timeout: 248 seconds]
<graft>
tjbiddle: yeah, i'm familiar with nokogiri... but i can't just read in a 5.1GB document and try to parse it into xml, it'll take years and my computer will melt
<tjbiddle>
graft: AWS :)
akells` has joined #ruby
<tjbiddle>
Note: I have no idea how hard a 5.1gb file would be to parse
<tjbiddle>
But I have to assume if you throw enough resources at it you'd be alright, lol
rezzack has quit [Quit: Leaving.]
<tjbiddle>
kaneda^: Run bundle update
<kaneda^>
tjbiddle: k
<graft>
blargh... that seems indecorous
slash_nick has joined #ruby
<kaneda^>
tjbiddle: ty!
<tjbiddle>
kaneda^: Np :)
drewgle has left #ruby [#ruby]
timonv has joined #ruby
<tjbiddle>
graft: Well what are you trying to do with it?
Takehiro has joined #ruby
danbeck has joined #ruby
_nitti has quit [Remote host closed the connection]
guiocavalcanti has quit [Remote host closed the connection]
zero_coder has joined #ruby
Nisstyre-laptop has joined #ruby
<zero_coder>
hey.
dambler has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mikepack has quit [Remote host closed the connection]
choobie has quit [Remote host closed the connection]
<graft>
tjbiddle: that page contains almost no useful information
chris_ has joined #ruby
choobie has joined #ruby
choobie has quit [Changing host]
choobie has joined #ruby
RiftyMcF3arless has joined #ruby
nik_-_ has joined #ruby
rickruby has joined #ruby
kevinykchan has quit [Ping timeout: 260 seconds]
<bricker>
tjbiddle: thanks
dankest has joined #ruby
danshultz has joined #ruby
<graft>
and actually a sax parser looks like it's not useful
kaneda^ has quit [Quit: thanks!]
_nitti has quit [Remote host closed the connection]
ArchBeOS has joined #ruby
khismetix has joined #ruby
c0rn has joined #ruby
TheDick has quit [Quit: TheDick]
<ArchBeOS>
exit
_nitti has joined #ruby
ArchBeOS has quit [Quit: leaving]
ArchBeOS has joined #ruby
ArchBeOS has quit [Changing host]
ArchBeOS has joined #ruby
johnrlive has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
<tjbiddle>
Create a class to subclass http://nokogiri.org/Nokogiri/XML/SAX/Document.html . Write some methods to do whatever is necessary to reject your element (I guess go over all of them and right "good" elements to a new file and ignore the "bad" ones. Create a new parser object and pass it that class to start
kevinykchan has joined #ruby
jlast has quit [Remote host closed the connection]
jfelchne_ has joined #ruby
k13n has quit [Ping timeout: 260 seconds]
sayan has quit [Ping timeout: 245 seconds]
zeeraw has quit [Quit: Computer has gone to sleep.]
tomkad has joined #ruby
agent_white has joined #ruby
mando has quit [Remote host closed the connection]
pcarrier_ has quit [Quit: Computer has gone to sleep.]
jlast has joined #ruby
chipotle_ has joined #ruby
chipotle_ has joined #ruby
chipotle_ has quit [Changing host]
peteyg has quit [Ping timeout: 240 seconds]
<ArchBeOS>
Hey Guys, I have a real dumb question. I want to do something like this, select(:id => 1, :user => 'foo', :city => 'bar') but when i set a splat 'select(*opts)' it treats it like an array. Am I doing something wrong?
<joshmyers>
but how can I end up being able to do something like foo_channel = json.channels[:foo]
<joshmyers>
where foo would be an example channel name?
* kaneda^
pokes tjbiddle
<MrZYX>
kaneda^: 1) do it in ruby or 2) do a shell script, don't do a shell script in ruby
<tjbiddle>
What's up?
kf8a has quit [Client Quit]
* tjbiddle
reads
<kaneda^>
MrZYX: that's not the use-case i asked for, your answer is invalid, please try again
<tjbiddle>
kaneda^: What MyZYX said. If you're really forced to run a shell script in ruby then wrap it in system('commandhere') or back tickets ``. And make sure the shebang is properly set in your script to your ruby installation.
jlast_ has joined #ruby
alx- has quit [Quit: alx-]
<kaneda^>
sed is a single-line command, vs loading the file into ruby and running gsub or something
<tjbiddle>
And make sure it's not referencing /usr/bin/ruby or something - Or it won't use rbenv/rvm
<tjbiddle>
kaneda^:
<tjbiddle>
`which irb` && `which ruby`
<MrZYX>
kaneda^: it's not faster, it still needs to open the file, read it, parse the command, do the operation, write it back
<tjbiddle>
make sure they're both using the same ruby
<MrZYX>
wrapping it in ruby adds spawning a shell to process (and reading from some pipes)
<kaneda^>
i could do system "sed","-i","s/\t/,/g",path
<MrZYX>
s/to//
<kaneda^>
again, why would this be different?
devoldmx3 has joined #ruby
_nitti_ has joined #ruby
<kaneda^>
tjbiddle: both are using ruby 1.9.3
huoxito has joined #ruby
jlast has quit [Ping timeout: 276 seconds]
aeontech has joined #ruby
v0n has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
emmanuelux has joined #ruby
travisjeffery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
johnrlive has joined #ruby
_nitti has quit [Ping timeout: 256 seconds]
k13n has joined #ruby
undersc0re97 has quit [Quit: WeeChat 0.4.1]
travisjeffery has joined #ruby
breadthfirst has quit [Remote host closed the connection]
epta_ is now known as epta
breadthfirst has joined #ruby
BSaboia has joined #ruby
apeiros has joined #ruby
tomzx has joined #ruby
breadthfirst has quit [Remote host closed the connection]
tiagok has joined #ruby
sodalitumpianum_ has quit [Ping timeout: 264 seconds]
breadthfirst has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
tomzx has quit [Read error: Connection reset by peer]
carloslopes has quit [Remote host closed the connection]
tomzx has joined #ruby
druonysuse has quit [Ping timeout: 245 seconds]
johnrlive has quit [Read error: Operation timed out]
pcarrier_ has joined #ruby
mark_locklear has quit [Remote host closed the connection]
rouss has quit [Quit: Computer has gone to sleep.]
sodalitumpianum_ has joined #ruby
ttt has joined #ruby
niklasb has joined #ruby
<awc737>
is "gem install spree" supposed to just hang forevers?
BSaboia has quit [Ping timeout: 248 seconds]
evenix has quit [Ping timeout: 256 seconds]
<joshmyers>
MrZYX: sorry not explaining myself very well :/
<ldnunes>
joshmyers, I added a comment to your gist, check it again
<joshmyers>
want to be able to do something like this:
evenix_ has quit [Ping timeout: 260 seconds]
<joshmyers>
[25] pry(main)> channels.each do |channel|
<joshmyers>
[25] pry(main)* fill = channel.attribute("ChannelFillPercentage")
<joshmyers>
[25] pry(main)* puts fill
<joshmyers>
[25] pry(main)* end
<ldnunes>
not pretty, but I guess it works
<joshmyers>
whats better?
<joshmyers>
thanks for help by the way
<MrZYX>
just parse it into structs
<joshmyers>
new to ruby
<MrZYX>
and group them by type
<joshmyers>
not used structs before :o
danbeck has quit [Quit: danbeck]
<kaneda^>
as it turns out, the problem was the contents of the file itself
<kaneda^>
i must be asleep
<joshmyers>
but i want to be able to call individual channels too
<joshmyers>
not just grouped by
tommyvyo has quit [Quit:]
<ldnunes>
joshmyers, like this? => json["CHANNEL"]["syslog_s3_channel"]
<joshmyers>
ah ok
<ldnunes>
joshmyers, my comment has the code to do that, have a look
DomKM_ has joined #ruby
<joshmyers>
ah will do
<joshmyers>
sorry didn't see comment
chorkpop has joined #ruby
<ldnunes>
joshmyers, no problem
DomKM_ has quit [Client Quit]
kaneda^ has quit [Quit: thanks]
DomKM has joined #ruby
huoxito has quit [Quit: Leaving]
rburton- has joined #ruby
<joshmyers>
excellent, thanks guys
travisjeffery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ldnunes>
:)
ArchBeOS has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Operation timed out]
krz has joined #ruby
DomKM has quit [Client Quit]
ttt has quit [Ping timeout: 256 seconds]
macmartine has joined #ruby
khismetix has quit [Ping timeout: 264 seconds]
druonysuse has quit [Quit: Konversation terminated!]
druonysuse has joined #ruby
druonysuse has quit [Changing host]
druonysuse has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
breadthfirst has quit [Remote host closed the connection]
breadthfirst has joined #ruby
AlbireoX has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 240 seconds]
daniel_- has joined #ruby
kobain has quit [Ping timeout: 248 seconds]
khismetix has joined #ruby
ner0x has quit [Quit: Leaving]
agjacome has joined #ruby
khismetix has quit [Client Quit]
tomkad has quit [Ping timeout: 248 seconds]
nobitanobi has quit [Remote host closed the connection]
fragmachine has quit [Remote host closed the connection]
sambao21 has joined #ruby
<joshmyers>
ldnunes: man, trying to figure out how that bloody works!
<joshmyers>
:P
jonathanwallace has quit [Ping timeout: 248 seconds]
lkba has quit [Ping timeout: 252 seconds]
<ldnunes>
joshmyers, heh, I'm not really proud of it... :P
arya has quit [Ping timeout: 252 seconds]
<joshmyers>
:o
<RiftyMcF3arless>
maybe somebody has a simple answer to this: using `git show`, am i "showing" something from my local repo, or is it pulling from the origin
<ldnunes>
joshmyers, basically, I split the key into "type" and "name", and use those to build the new "json" hash
DanWilson has left #ruby [#ruby]
<RiftyMcF3arless>
i'm trying to automate a git pull to a private github server and can't figure out how to automate the username/password entry.
<joshmyers>
so it gets all the keys in the hash, going through the keys, splitting on "." and calling the first part the type
<joshmyers>
so I can do json[type]
<joshmyers>
?
<joshmyers>
what does ||= {} do ?
daniel_- has quit [Ping timeout: 252 seconds]
<Eiam>
joshmyers: assigns the value on the left or makes it an empty hash
krz has quit [Quit: krz]
ivanoats has quit [Remote host closed the connection]
machuga is now known as machuga|away
r0bby has joined #ruby
eldariof has quit [Read error: Operation timed out]
Cultofmetatron has quit [Remote host closed the connection]
<joshmyers>
haha
<joshmyers>
like it
<Eiam>
joshmyers: you should read up on "enumerable" http://ruby-doc.org/core-2.0/Enumerable.html and make sure to pay particular attention to "each" "map" "reduce" "select" and maybe "each_with_index" and "each_with_object"
kpshek has joined #ruby
<Eiam>
these are like bread & butter for me in the Ruby I write
<joshmyers>
so how could I find the say the start time for all channels like that?
<joshmyers>
man, new to dev from an ops background
slainer68 has quit [Ping timeout: 248 seconds]
monkegjinni has joined #ruby
machuga|away is now known as machuga
<Eiam>
blah.map { |x| x["StartTime] }
<Eiam>
array of start times from blah, assuming blah is an array of something with a starttime attribute
<joshmyers>
blah.map { |x| x["StartTime"].to_i } giving me a couldnt convert string to integer
<joshmyers>
grrr
<joshmyers>
ja, np :)
<joshmyers>
help is appreciated :)
brtdv has joined #ruby
blischalk has quit [Quit: blischalk]
chris_ is now known as codesoda
lkba has joined #ruby
druonysuse has quit [Quit: Konversation terminated!]
druonysuse has joined #ruby
druonysuse has quit [Changing host]
druonysuse has joined #ruby
ivanoats has quit [Remote host closed the connection]
nateberkopec has joined #ruby
<nateberkopec>
after profiling some code, my number one culprit is a weird anonymous module : #<Module:0x007ff92e040478>#__temp__ any idea how to identify what this is exactly?
robscomputer has quit [Read error: Connection reset by peer]
djwonk has quit [Quit: djwonk]
robscomputer has joined #ruby
pagios_ has joined #ruby
<pagios_>
hello
<pagios_>
anyone tried running wpa_supplicant command from inside ruby ?
akhet has quit [Ping timeout: 252 seconds]
<atmosx>
pagios_: no why? what will happen?
ivanoats has joined #ruby
<pagios_>
i ma noticing weird symptoms, if i execute from the command line: wpa_supplicant -iwlan3 -c/etc/wpa_supplicant.conf -Dwext & it works fine, if i execute from ruby using `wpa_supplicant -iwlan3 -c/etc/wpa_supplicant.conf -Dwext &` it just hangs and does nothing
<pagios_>
running both as root user
<becom33>
http://pastebin.com/s5TUGXhe can anyone tell me when I press Ctrl+C I wasnt to stop whatever the script is runing without having to kill the process. I was able to capture Ctrl+C and made print come for wait a second when u press Ctrl+c
devoldmx has joined #ruby
<becom33>
for a exmaple in this script I just want to stop the while loop without killing the script process . So i will be turned back to realine loop
robscomputer has quit [Read error: Connection reset by peer]
robscomputer_ has joined #ruby
<becom33>
readline loop*
rickruby has quit [Remote host closed the connection]
danshultz has quit [Remote host closed the connection]
<becom33>
alright I just read what I just said doesnt make any sense .
<interactionjaxsn>
becom33: it seems like you are doing it on purpose now
<becom33>
http://pastebin.com/s5TUGXhe < in this script I want to stop the while loop without killing the script process . I was able to capture Ctrl+C and made a message print when u press Ctrl+C. need help
<becom33>
interactionjaxsn, I wasnt doing that on purpose
Al_ has quit [Read error: Connection reset by peer]
Al_ has joined #ruby
brtdv has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<interactionjaxsn>
becom33: 'twas but a joke, sir. the line i responded to didn't make much sense either
evenix___ has quit [Remote host closed the connection]
evenix__ has quit [Remote host closed the connection]
frem has joined #ruby
<interactionjaxsn>
becom33: you are trying to stop it with a interrupt or within the loop programmatically ?
<joshmyers>
ahhhh
frem has quit [Max SendQ exceeded]
wolcanus_ has joined #ruby
evenix has joined #ruby
evenix_ has joined #ruby
Cultofmetatron has joined #ruby
wolcanus has quit [Ping timeout: 245 seconds]
devoldmx has quit [Ping timeout: 248 seconds]
rickruby has joined #ruby
codecop has quit [Quit: Išeinu]
devoldmx has joined #ruby
cmarques has quit [Ping timeout: 252 seconds]
Z_Mass has joined #ruby
<pagios_>
any ideas guys?
<Zelest>
what was the question?
splittingred has joined #ruby
graft has quit [Ping timeout: 260 seconds]
cmarques has joined #ruby
evenix has quit [Ping timeout: 256 seconds]
evenix_ has quit [Ping timeout: 252 seconds]
dsabanin has quit [Quit: Leaving...]
<pagios_>
i ma noticing weird symptoms, if i execute from the command line: wpa_supplicant -iwlan3 -c/etc/wpa_supplicant.conf -Dwext & it works fine, if i execute from ruby using `wpa_supplicant -iwlan3 -c/etc/wpa_supplicant.conf -Dwext &` it just hangs and does nothing
woolite64__ has quit [Read error: Connection reset by peer]
<interactionjaxsn>
becom33: umm.... i want to help but you aren't giving me much to go on here
breadthfirst has quit [Remote host closed the connection]
miskander has joined #ruby
breadthfirst has joined #ruby
pcarrier_ has quit [Ping timeout: 256 seconds]
rburton- has quit [Read error: Connection reset by peer]
rburton- has joined #ruby
jamesaxl has quit [Ping timeout: 256 seconds]
<becom33>
interactionjaxsn, just run the scipt . when u run it it goes to the realine loop and when u type "run" it will goto demo_process() method and start looping . when u press Ctrl+C while ur runing a script normally the script stops . but in here I want the while loop proccess to stop
robscomputer_ has quit [Read error: Connection reset by peer]
Al_ has quit [Quit: Al_]
robscomputer has joined #ruby
kjellski has quit [Ping timeout: 252 seconds]
ttt has joined #ruby
aces1up has joined #ruby
jonathanwallace has quit [Ping timeout: 276 seconds]
<aces1up>
what would a regex look like to strip all numbers from the END of a string?
johnmilton has quit [Remote host closed the connection]
Cultofmetatron has quit [Remote host closed the connection]
pcarrier_ has joined #ruby
<kenneth>
aces1up: s/\d+$//
Ontolog has joined #ruby
Cultofmetatron has joined #ruby
kpshek has quit []
yann_ck has joined #ruby
druonysuse has quit [Ping timeout: 248 seconds]
jslowe has joined #ruby
tommyvyo has quit [Quit:]
yann_ck has quit [Client Quit]
robscomputer has quit [Ping timeout: 252 seconds]
vivab0rg has joined #ruby
ttt has quit [Ping timeout: 256 seconds]
robscomputer has joined #ruby
<aces1up>
kenneth why is there 2 // ?
eregon has quit [Quit: No Ping reply in 180 seconds.]
eregon_ has joined #ruby
<kenneth>
this is just sed syntax
nazty has quit [Ping timeout: 248 seconds]
<becom33>
:/
<pagios_>
i am including a ruby script in a @reboot crontab job do i have to include some variables that are needed by ruby to run correctly?
DanKnox_away is now known as DanKnox
Cultofmetatron has quit [Ping timeout: 260 seconds]
devoldmx3 has joined #ruby
tommyvyo has joined #ruby
jlast_ has joined #ruby
druonysuse has joined #ruby
druonysuse has quit [Changing host]
druonysuse has joined #ruby
devoldmx has quit [Read error: No route to host]
machuga is now known as machuga|away
devoldmx has joined #ruby
vivab0rg has quit [Quit: WeeChat 0.3.8]
devoldmx3 has quit [Read error: Connection reset by peer]
kil0byte has quit [Remote host closed the connection]
mele- has joined #ruby
rburton- has quit [Read error: Connection reset by peer]
jlast has quit [Ping timeout: 260 seconds]
djwonk has joined #ruby
s0ber_ has joined #ruby
ArchBeOS has joined #ruby
ArchBeOS has joined #ruby
<joshmyers>
pagios what kind of ruby script?
<joshmyers>
does it need to load up a rails env?
<ravster>
how do I change the geocoder plugin to use bing?
<joshmyers>
just make sure if has requirements you bundle exec the script
s0ber has quit [Ping timeout: 246 seconds]
s0ber_ is now known as s0ber
mityaz has quit [Quit: See ya!]
<joshmyers>
ruby installed systemwide?
danshultz has joined #ruby
jonathanwallace has joined #ruby
bionhart has quit [Remote host closed the connection]
krainboltgreene has quit [Quit: krainboltgreene]
wesside has quit [Quit: Computer has gone to sleep.]
havenwood has joined #ruby
ivanoats has quit [Remote host closed the connection]
maetthew has joined #ruby
danshultz has quit [Remote host closed the connection]
cj3kim has joined #ruby
_solomon has joined #ruby
Ontolog has quit [Remote host closed the connection]
nazty has joined #ruby
mmitchell has quit [Ping timeout: 256 seconds]
miskander has quit [Quit: miskander]
cluelesscoder has joined #ruby
miskander has joined #ruby
fuzzyhorns has quit [Remote host closed the connection]
fermion has quit [Read error: Operation timed out]
chorkpop has quit [Remote host closed the connection]
palantir has joined #ruby
ArchBeOS has quit [Ping timeout: 264 seconds]
breakingthings has quit [Write error: Broken pipe]
enebo has quit [Quit: enebo]
failshell has quit [Remote host closed the connection]
<pagios_>
is there a way to read the log of a ruby script loaded in the background?
solidoodlesuppor has quit [Remote host closed the connection]
gaahrdner has quit [Remote host closed the connection]
<interactionjaxsn>
becom33: you'd benefit from a rescue block? rescue Interrupt
johnrlive has joined #ruby
Spooner has joined #ruby
RORgasm has quit [Read error: Connection reset by peer]
RORgasm_ has joined #ruby
fgro has joined #ruby
<interactionjaxsn>
becom33: or trap them like you already are
<becom33>
interactionjaxsn, Im gonna little more
Eaven has quit [Read error: Connection reset by peer]
LennyLinux has quit [Remote host closed the connection]
RORgasm_ has quit [Remote host closed the connection]
miskander has quit [Quit: miskander]
Eaven has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
tbrock has quit [Quit: Computer has gone to sleep.]
monkegjinni has quit [Remote host closed the connection]
miskander has joined #ruby
bean__ has quit [Quit: Computer has gone to sleep.]
miskander has quit [Client Quit]
kirun has quit [Quit: Client exiting]
r0bby has quit [Ping timeout: 240 seconds]
joshmyers has quit [Remote host closed the connection]
ariedler has quit [Remote host closed the connection]
kobain has joined #ruby
nfk has quit [Quit: yawn]
m8 has quit [Quit: Sto andando via]
johnrlive has quit [Remote host closed the connection]
jcarouth has joined #ruby
nomenkun_ has quit [Remote host closed the connection]
ArchBeOS has joined #ruby
_Amaan has quit [Quit: _Amaan]
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
akhet has joined #ruby
akhet has quit [Changing host]
akhet has joined #ruby
maetthew has quit [Quit: Computer has gone to sleep.]
devoldmx3 has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
xardas has quit [Ping timeout: 276 seconds]
whowantstolivefo has quit [Ping timeout: 256 seconds]
Bleah has quit [Ping timeout: 256 seconds]
jtharris has quit [Quit: WeeChat 0.4.0]
Dummies_freelanc has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 248 seconds]
r0bby has joined #ruby
umren has quit [Ping timeout: 276 seconds]
_seanc_ has joined #ruby
mikewintermute has quit [Quit: mikewintermute]
splittingred has quit [Quit: splittingred]
alex__c2022_ has quit [Quit: alex__c2022_]
c0rn has joined #ruby
Cultofmetatron has joined #ruby
momomomomo has quit [Quit: momomomomo]
k13n has quit [Ping timeout: 260 seconds]
snearch has joined #ruby
arya has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
brotatos has joined #ruby
undersc0re97 has quit [Read error: Connection reset by peer]
breadthfirst has quit [Remote host closed the connection]
breadthfirst has joined #ruby
arya has joined #ruby
reset has quit [Quit: Leaving...]
jromine is now known as Guest43213
theRoUS has quit [Ping timeout: 256 seconds]
johnnyfuchs has quit [Ping timeout: 252 seconds]
ttt has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
ivanoats has joined #ruby
wolcanus_ has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
rupee has joined #ruby
Solnse has quit []
arya has quit [Client Quit]
namesake has joined #ruby
bamdad has joined #ruby
momomomomo has quit [Quit: momomomomo]
enriclluelles has joined #ruby
kf8a has quit [Quit: Computer has gone to sleep.]
rhys has quit [Quit: Leaving]
ariedler has joined #ruby
<namesake>
Hi, N00b question here. I want to join some strings in a block but I am not sure how to do it.
_solomon has quit [Quit: _solomon]
atno__ has joined #ruby
<namesake>
5.times do |y| x = "hello" puts x end
jslowe has quit [Read error: Connection reset by peer]
kf8a has joined #ruby
<namesake>
how do i get it so that x = "hellohellohellohellohello"
Ontolog has joined #ruby
nomenkun has joined #ruby
anonymuse has quit [Quit: Leaving...]
pcarrier_ has quit [Ping timeout: 256 seconds]
wyhaines has quit [Remote host closed the connection]
<_seanc_>
x = "hello" * 5
_nitti has joined #ruby
Xeago has joined #ruby
marcdel has joined #ruby
nomenkun has quit [Read error: Operation timed out]
pcarrier_ has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
_nitti has quit [Remote host closed the connection]
wsterling has quit [Remote host closed the connection]
slainer68 has joined #ruby
vlad_starkov has joined #ruby
brianpWins has quit [Quit: brianpWins]
<namesake>
thanks seanc. What if the value changes each time it goes through the block?
<namesake>
so, it would be something like hello1hello2hello3hello4hello5 ?
cj3kim has quit [Remote host closed the connection]
mad_hatter_ has quit [Quit: Leaving.]
viszu has quit [Quit: Leaving.]
johnrlive has quit [Remote host closed the connection]
johnnyfuchs has joined #ruby
kf8a has quit [Quit: Computer has gone to sleep.]
ttt has joined #ruby
vlad_starkov has quit [Ping timeout: 248 seconds]
<_seanc_>
namesake: can you be a bit more specific about your needs?
<_seanc_>
You could potentially use something like Enumerable.inject
chriskk has joined #ruby
sailias has joined #ruby
fgro_ has quit [Ping timeout: 248 seconds]
<namesake>
sure, sec seanc - I am just trying to learn how to do this for fun
<namesake>
let me write it out brb
<_seanc_>
It's cool
<_seanc_>
How about something like this:
<_seanc_>
5.times { |y| x << "hello#{y}" }
<_seanc_>
You'll need to define the x variable before that block though
<_seanc_>
Like: x = ''; 5.times { |y| x << "hello#{y}" }; puts x
DrShoggoth has joined #ruby
Xeago_ has joined #ruby
<namesake>
aah cool. That is what I was looking for. the << part is concatenation i assume
<_seanc_>
That should leave you with "hello0hello1hello2hello3hello4"
<namesake>
perfect. Thank you!
emergion has joined #ruby
<_seanc_>
Yes, that's concatenation
hogeo has quit [Remote host closed the connection]
<_seanc_>
You could also use the .concat(value) method
ttt has quit [Ping timeout: 276 seconds]
Xeago has quit [Ping timeout: 252 seconds]
<namesake>
cool. Thanks
<_seanc_>
You're very welcome
mando has quit [Remote host closed the connection]
predator217 has joined #ruby
s2013 has joined #ruby
Cultofmetatron has quit [Read error: Connection reset by peer]
chrisja has quit [Quit: leaving]
Cultofmetatron has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
s2013 has joined #ruby
akhet has joined #ruby
akhet has quit [Changing host]
akhet has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
justsee has joined #ruby
justsee has joined #ruby
s2013 has joined #ruby
predator117 has quit [Ping timeout: 252 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
JimmyNeutron has joined #ruby
Chat9191 has joined #ruby
Chat9191 has quit [Client Quit]
kyle__ has joined #ruby
ixti has joined #ruby
cantonic has quit [Ping timeout: 256 seconds]
instinkt has joined #ruby
<kyle__>
Is there a way to choose which DBM implementation to use when you use YAML::DBM? On one box it's using GDBM, and on another it's using Berkleys DBM.... I just wanna make it consistant.
sepp2k has quit [Remote host closed the connection]
tommyvyo has quit [Quit:]
theRoUS has joined #ruby
theRoUS has joined #ruby
alx- has quit [Quit: alx-]
reset has joined #ruby
crystalneth has joined #ruby
icole has quit [Remote host closed the connection]
cantonic has joined #ruby
alx- has joined #ruby
DanKnox is now known as DanKnox_away
rangle has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
emergion has quit [Quit: Computer has gone to sleep.]
dambler has joined #ruby
randomlogin has quit [Read error: Operation timed out]
<kyle__>
Anyone? Anyone? Bheuler?
failshell has joined #ruby
Guedes0 has joined #ruby
pinpin404 has quit [Remote host closed the connection]