apeiros_ changed the topic of #ruby to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
akashj87 has quit [Ping timeout: 256 seconds]
SCommette has joined #ruby
logix812 has quit [Quit: Computer has gone to sleep.]
Nimsical has quit [Quit: Computer has gone to sleep.]
casheew has joined #ruby
nezumi has quit [Ping timeout: 255 seconds]
matayam has quit [Remote host closed the connection]
jdolitsky has quit [Quit: Leaving]
casheew has quit [Read error: Connection reset by peer]
jamescarr has quit [Quit: jamescarr]
mikepack has quit [Remote host closed the connection]
mengu has quit [Quit: This computer has gone to sleep]
mercwithamouth has joined #ruby
BSaboia__ has quit [Read error: Connection reset by peer]
casheew has joined #ruby
casheew has quit [Read error: Connection reset by peer]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
maes has quit [Ping timeout: 276 seconds]
casheew has joined #ruby
pioz has joined #ruby
pskosinski has quit [Quit: Red Eclipse, game of racist admins/devs: http://pawelk.pl/racist-red-eclipse-quin-zeroknight-gingerbear/]
nari has joined #ruby
nga4 has joined #ruby
blf has quit [Quit: Page closed]
havenwood has quit [Ping timeout: 264 seconds]
nathanl has joined #ruby
SCommette has quit [Quit: SCommette]
pioz has quit [Client Quit]
johnnygoodmancp1 has joined #ruby
awestroke has quit [Remote host closed the connection]
joofsh has quit [Remote host closed the connection]
randomau_ has quit [Ping timeout: 260 seconds]
crimezone20xx has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
w400z has quit [Quit: Computer has gone to sleep.]
johnnygoodmancp1 has quit [Ping timeout: 276 seconds]
pw3 has quit [Quit: Page closed]
w400z has joined #ruby
arya has quit [Ping timeout: 264 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
daniel_- has quit [Quit: WeeChat 0.4.0]
agarie has joined #ruby
mlue has joined #ruby
emocakes has quit [Quit: emocakes]
emmanuelux has joined #ruby
arya has joined #ruby
mahmoudimus has joined #ruby
angusiguess has quit [Ping timeout: 264 seconds]
millerti has joined #ruby
JayLeon_ has joined #ruby
hogeo has joined #ruby
JayLeon_ has quit [Client Quit]
mikurubeam has quit [Quit: +1 (Yes). -1 (No). i (What I have been trying to tell you all along).]
wallerdev has joined #ruby
newUser1234 has joined #ruby
mikurubeam has joined #ruby
crimezone20xx has quit [Ping timeout: 264 seconds]
Heero has joined #ruby
Heero has quit [Changing host]
Heero has joined #ruby
havenwood has joined #ruby
Sicp has quit [Ping timeout: 248 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
yshh has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
arya has quit [Read error: Connection reset by peer]
skattyadz has left #ruby [#ruby]
mockra has quit [Remote host closed the connection]
ckrailo has quit [Quit: Computer has gone to sleep.]
emocakes has joined #ruby
predator117 has joined #ruby
<wallerdev> <3 ruby
xardas has quit [Ping timeout: 255 seconds]
zetaspartan2552 has joined #ruby
nezumi has joined #ruby
casheew has quit [Read error: Connection reset by peer]
arya has joined #ruby
hadees has quit [Ping timeout: 240 seconds]
predator217 has quit [Ping timeout: 252 seconds]
casheew has joined #ruby
w400z has quit [Quit: Computer has gone to sleep.]
arya has quit [Client Quit]
bigoldrock has quit [Ping timeout: 240 seconds]
generali_ has joined #ruby
joofsh has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
generalissimo has quit [Ping timeout: 248 seconds]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
Heero has quit [Ping timeout: 248 seconds]
casheew has quit [Read error: Connection reset by peer]
nfisher has quit [Ping timeout: 248 seconds]
kristofers has quit []
brianherman has joined #ruby
emmanuelux has quit [Remote host closed the connection]
ner0x has joined #ruby
hashmal has quit [Quit: Computer has gone to sleep.]
ChronocityLC has quit [Ping timeout: 264 seconds]
casheew has joined #ruby
bubblehead has quit [Remote host closed the connection]
daed has quit [Ping timeout: 255 seconds]
markalanevans has quit [Ping timeout: 240 seconds]
casheew has quit [Read error: Connection reset by peer]
cantonic has quit [Quit: cantonic]
lkba has quit [Ping timeout: 260 seconds]
casheew has joined #ruby
hmarr has joined #ruby
momomomomo has quit [Ping timeout: 264 seconds]
casheew has quit [Read error: Connection reset by peer]
winux has joined #ruby
<winux> is there a way to hook into a window or process with ruby ?
ndch has quit [Remote host closed the connection]
generali_ has quit [Read error: Connection reset by peer]
love_color_text has quit [Remote host closed the connection]
<waxjar> i think that process will have to provide some kind of interface
daed has joined #ruby
casheew has joined #ruby
<winux> waxjar: yeah.. i was hoping there was a way to capture output from another terminal like window
<winux> waxjar: it isn't a shell or terminal though
generalissimo has joined #ruby
<waxjar> you can send signals to processes or pipe your process (e.g. ls -a | ruby mytool.rb) but i don't think you can interact with UIs
subbyyy has joined #ruby
cobragoat has quit [Remote host closed the connection]
mephux has quit [Excess Flood]
<ukd1> is there a good way of using things from ENV which are integers; they're all returned as strings?
mephux has joined #ruby
casheew has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
casheew has joined #ruby
<Inside> this driving me slightly bonkers.
emergion has quit [Quit: Computer has gone to sleep.]
<Inside> irb(main):075:0* class A; def B; puts "Hello"; end; end
<Inside> => nil
<Inside> NoMethodError: undefined method `B' for A:Class
<Inside> irb(main):077:0> A.B
<welandB> ukd1: .to_i ?
lkba has joined #ruby
nari has quit [Ping timeout: 255 seconds]
<welandB> Inside: self.B
<havenwood> Inside: method names should be lowercase
<waxjar> you need to instantiate the class first Inside
<Inside> WELL THEN
<shevy> THEN WHAT
<Inside> that makes sense, @havenwood :p
<ukd1> welandB, which seems to suck as it's per time you use it - is that really he best way?
<waxjar> A.new.B # => "Hello"
* Inside shakes a fist at ruby.
<shevy> we have a few sneaky methods
<shevy> like Integer() or String()
<shevy> String(2) # => "2"
<waxjar> they can be uppercase i think, capitalised I know for sure
<welandB> ukd1: I have no idea. If you're concerned about the time cost of to_i, I'd look for something other than ruby...
<havenwood> waxjar: can be but ought not be :P
<shevy> the best way is to use C
yxhuvud has quit [Quit: Nettalk6 - www.ntalk.de]
<shevy> and mruby in the future
<ukd1> welandB, it's not really the cost, it's just ugly :)
<Inside> I still don't quite understand where self comes into play
<Inside> in python it's easy since A.b(foo) is actualy B(A,foo) where self is A
<waxjar> Inside, you defined an instance method for the class A, so you need an instance of A to call it
forced_request has joined #ruby
<havenwood> Inside: That doesn't seem easier than self being the current namespace, just different.
nathancahill has joined #ruby
<waxjar> you can also define a class method with def self.method_name, which you can then call with A.method_name
<Inside> havenwood: it's not easier, but it's at least explicit :P
icole has quit [Remote host closed the connection]
squidBits has joined #ruby
djwonk has joined #ruby
<shevy> it is explicit because there is no other way in python
casheew has quit [Read error: Connection reset by peer]
yshh has joined #ruby
casheew has joined #ruby
squidBits has quit [Client Quit]
<shevy> Inside, I think the difficult first step is to try to understand how the ruby parser "thinks", when it sees ruby code
<shevy> it tries to be clever :\
<Inside> I'm so used to C++ and python that ruby is just throwing a wrench into everything
<shevy> the python parser is lazier and tries to be dumber, so it wants you to be very explicit
platzhirsch has joined #ruby
<Inside> shevy: yeaaah the whole 'return is optional' and 'scopes are optional too' thing is wonky
<platzhirsch> Any suggestions for a nice tree structure library? No fancy stuff, only the pure data structure
<shevy> or cat.meow vs. cat.meow() Inside
* Inside shakes a fist.
Voodoofish430 has quit [Quit: Leaving.]
<shevy> Inside well, you can write ruby code with mandatory return on your own
<shevy> def foo
<shevy> return 'bla'
<shevy> end
<shevy> ruby programmers just become lazy
<Inside> yeah, I know.. I'm just saying it's all optional!
<shevy> in the above, they tend to prefer
<shevy> def foo
gregor3005 has left #ruby [#ruby]
<shevy> 'bla'
<shevy> end
<Inside> and how !0 is false D:
JayLeon has joined #ruby
Tricon has quit [Quit: Leaving...]
<waxjar> that's not weird is it?
<shevy> !1 is also false
stevechiagozie has joined #ruby
emocakes has quit [Quit: emocakes]
<shevy> !1000 is also false
<waxjar> 0 is a truthy value, ! just negates that
<shevy> puts 'hi' if 3
<shevy> Inside, it just seems consistent
<shevy> puts 'hi' if !3
<Inside> waxjar: it's weird in nearly every other language
<shevy> but that's how if/else checks work
<shevy> the ternary operator feels false to me hahaha
robscomputer has quit [Remote host closed the connection]
<shevy> I cant even figure out how you do !1 with ternary
agarie has quit [Ping timeout: 260 seconds]
winux has quit [Quit: Leaving.]
<waxjar> !1 ? 'true' : 'false' ?
newUser1234 has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 248 seconds]
RORgasm has joined #ruby
casheew has quit [Read error: Connection reset by peer]
Goles has joined #ruby
casheew has joined #ruby
Goles has quit [Remote host closed the connection]
markalanevans has joined #ruby
tylersmith has quit [Quit: tylersmith]
nilved has quit [Quit: leaving]
adamjleonard has quit [Quit: Leaving...]
Tricon has joined #ruby
<shevy> hmmm
<shevy> yes
<shevy> I hate ternary...
winux has joined #ruby
winux has quit [Changing host]
winux has joined #ruby
<shevy> it's like alien code
emocakes has joined #ruby
<shevy> if true
<shevy> 1
<shevy> else
<shevy> !1
<shevy> # and it would be cool to omit end in ruby
<shevy> no wait
<shevy> if 1
<shevy> true
<shevy> hahaha :D
RORgasm has quit [Ping timeout: 264 seconds]
xpen has joined #ruby
ephemerian has quit [Quit: Leaving.]
xpen has quit [Remote host closed the connection]
DonRichie has quit [Quit: Verlassend]
<shevy> Inside, you confused me with your !0
w400z has joined #ruby
Tricon has quit [Client Quit]
<Inside> shevy: in pretty much every other language false is represented by the number 0 internally so !0 is 1~
nickzh has joined #ruby
MehLaptop has joined #ruby
mahmoudimus has joined #ruby
anirudh24seven has joined #ruby
<canton7> Inside, even in python? I thought everything was a class there too...
emocakes has quit [Client Quit]
<Inside> <Inside> .py print not 0
<Inside> <walnut> Inside: True
<canton7> that doesn't mean that false is represented by 0 internally
<canton7> print not []
<canton7> [] definitely isn't represented by 0 internally
<shevy> I only thought only perl does that... because it is psychopathic
<canton7> and C-like stuff of course, where there is no true bool
<shevy> perl is like george orwell 1984
<shevy> true is false
<shevy> true = false #SyntaxError: compile error (irb):1: Can't assign to true
<shevy> hahaha :D
<shevy> never saw that one before
<canton7> not bad...
rupee has quit [Quit: Leaving]
mahmoudimus has quit [Client Quit]
newUser1234 has joined #ruby
<shevy> cool... true, false and nil can not be assigned to anything else hmm
zetaspartan2552 has quit [Quit: zetaspartan2552]
<canton7> FalseClass = TrueClass
jbueza has quit [Quit: Leaving.]
<canton7> trying to see what implications that has
<shevy> I understand true and false... but nil as well?
wfht has joined #ruby
<shevy> whoa, FalseClass = TrueClass works
<shevy> but it is perhaps only used in comparisons?
<canton7> yeah, doesn't seem to have done much
angusiguess has joined #ruby
casheew has quit [Read error: Connection reset by peer]
slainer68 has joined #ruby
casheew has joined #ruby
mouse-_ has quit [Ping timeout: 252 seconds]
Heero has joined #ruby
Heero has quit [Changing host]
Heero has joined #ruby
<shevy> odd
<shevy> I wanna do nil = false and see how things break :D
MrZYX is now known as MrZYX|off
dhruvasagar has joined #ruby
<canton7> re-open NilClass and go to town
angusiguess has quit [Ping timeout: 264 seconds]
mknox has joined #ruby
<Inside> another huge difference between ruby and python is that lots of things are treated as false!
<canton7> it only defines a handful of methods
mknox has left #ruby [#ruby]
<canton7> Inside, you come to love how few things are treated as false
hamakn has joined #ruby
Ontolog has quit [Remote host closed the connection]
sambio has joined #ruby
jasonkuhrt has joined #ruby
ndch has joined #ruby
digital-ghost has quit [Ping timeout: 245 seconds]
cobragoat has joined #ruby
wfht has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
Guedes00 is now known as Guedes
Guedes has quit [Changing host]
Guedes has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
elaptics is now known as elaptics`away
sleetdrop has joined #ruby
nari has joined #ruby
crimezone20xx has joined #ruby
raycloud has quit [Read error: Connection reset by peer]
raycloud has joined #ruby
Domon has joined #ruby
<shevy> Inside where are lots of things treated as false?
<canton7> python
<Inside> >>> foo = []
<Inside> >>> if not foo:
<Inside> Empty!
<Inside> print "Empty!"
<Inside> for example
XxBlakeFailxX has quit [Read error: Connection reset by peer]
<canton7> ruby: if foo.empty?
pavilionXP has joined #ruby
peteyg has quit [Ping timeout: 264 seconds]
XxBlakeFailxX has joined #ruby
kofno has joined #ruby
icole has joined #ruby
banjara has quit [Quit: Leaving.]
jimeh has quit [Quit: Computer has gone to sleep.]
<shevy> Inside that was a bad example ;D
casheew has quit [Read error: Connection reset by peer]
etcetera has quit []
casheew has joined #ruby
<shevy> what values do not evaluate to true in ruby?
<shevy> false and nil, or?
hadees has joined #ruby
johnnygoodmancpa has joined #ruby
nga4 has quit []
<canton7> any empty collection, 0, false, nil, and probably some others in python
<canton7> false and nil in ruby
icole has quit [Ping timeout: 260 seconds]
<canton7> well s/nil/None in python iirc
MehLaptop has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
ttt has joined #ruby
slainer68 has quit [Remote host closed the connection]
casheew has joined #ruby
charliesome has joined #ruby
nickzh has left #ruby [#ruby]
tcopp has joined #ruby
casheew has quit [Read error: Connection reset by peer]
anirudh24seven has quit [Read error: Connection reset by peer]
anirudh24seven_ has joined #ruby
anirudh24seven_ is now known as anirudh24seven
wallerdev has quit [Quit: wallerdev]
wfht has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
<shevy> Inside hah, ruby is simpler!
johnnygoodmancpa has quit [Quit: Leaving.]
casheew has joined #ruby
agarie has joined #ruby
ckrailo has joined #ruby
casheew has quit [Read error: Connection reset by peer]
Hanmac1 has joined #ruby
wfht has left #ruby [#ruby]
casheew has joined #ruby
newUser1234 has quit [Remote host closed the connection]
emergion has joined #ruby
casheew has quit [Read error: Connection reset by peer]
wfht has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
newUser1234 has joined #ruby
hmarr has quit []
c0rn has quit [Quit: Computer has gone to sleep.]
shevy has quit [Ping timeout: 258 seconds]
bricker`LA has joined #ruby
casheew has joined #ruby
adrianF has quit [Quit: bye]
nathanl has quit [Ping timeout: 260 seconds]
casheew has quit [Read error: Connection reset by peer]
agarie has quit [Remote host closed the connection]
agarie has joined #ruby
averiso has joined #ruby
millerti has quit [Quit: millerti]
casheew has joined #ruby
agarie has quit [Ping timeout: 260 seconds]
casheew has quit [Read error: Connection reset by peer]
mattbl has joined #ruby
momomomomo has joined #ruby
etcetera has joined #ruby
casheew has joined #ruby
etcetera has quit [Client Quit]
jim_r0x has joined #ruby
shevy has joined #ruby
brian_000_ has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
dekronin1 has quit [Read error: Connection reset by peer]
casheew has quit [Read error: Connection reset by peer]
wfht has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
dekroning has joined #ruby
freerobby has joined #ruby
slainer68 has joined #ruby
bricker`1A has joined #ruby
casheew has joined #ruby
tylersmith has joined #ruby
chrishough has joined #ruby
brianherman has quit [Ping timeout: 260 seconds]
agarie has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
casheew has quit [Read error: Connection reset by peer]
bricker`LA has quit [Ping timeout: 255 seconds]
brianherman has joined #ruby
tylersmith has quit [Ping timeout: 255 seconds]
casheew has joined #ruby
kofno has quit [Remote host closed the connection]
alanp has joined #ruby
casheew has quit [Read error: Connection reset by peer]
sayan has joined #ruby
havenwood has quit [Remote host closed the connection]
etcetera has joined #ruby
slainer68 has quit [Ping timeout: 248 seconds]
casheew has joined #ruby
matayam has joined #ruby
heliumsocket has joined #ruby
tsion has quit [Quit: Leaving]
casheew has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
casheew has joined #ruby
io_syl has quit [Ping timeout: 264 seconds]
rh1n0 has joined #ruby
casheew has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
osvico has joined #ruby
bordicon has quit [Ping timeout: 240 seconds]
newUser1234 has quit [Remote host closed the connection]
ahokaomaeha has joined #ruby
nathanl has joined #ruby
mikurubeam has quit [Read error: Connection reset by peer]
ahokaomaeha is now known as mikurubeam
alanp has quit [Read error: Connection reset by peer]
alanp has joined #ruby
casheew has joined #ruby
rh1n0 has quit [Client Quit]
robbyoconnor has quit [Read error: Connection reset by peer]
casheew has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
joofsh has quit [Remote host closed the connection]
jerius has joined #ruby
alanp_ has joined #ruby
agarie has quit [Remote host closed the connection]
alanp has quit [Read error: No route to host]
casheew has joined #ruby
tomsthumb has quit [Quit: Leaving.]
agarie has joined #ruby
JayLeon has left #ruby ["Linkinus - http://linkinus.com"]
markalanevans has quit [Quit: markalanevans]
jgrevich has quit [Ping timeout: 240 seconds]
markalanevans has joined #ruby
jgrevich has joined #ruby
rickmasta has joined #ruby
winux has quit [Quit: Leaving.]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
agarie has quit [Ping timeout: 264 seconds]
marcdel has joined #ruby
crimezone20xx has quit [Ping timeout: 264 seconds]
newUser1234 has joined #ruby
casheew has quit [Read error: Connection reset by peer]
wfht has joined #ruby
daed has quit [Ping timeout: 264 seconds]
Es0teric has quit [Remote host closed the connection]
casheew has joined #ruby
agarie has joined #ruby
forced_request has quit [Read error: Connection reset by peer]
etcetera has quit []
daed has joined #ruby
hakunin_ is now known as hakunin
etcetera has joined #ruby
casheew has quit [Read error: Connection reset by peer]
jerius has quit [Quit: Computer has gone to sleep.]
mattbl has joined #ruby
casheew has joined #ruby
sayan has quit [Read error: Connection reset by peer]
LennyLinux has quit [Remote host closed the connection]
bricker`1A is now known as bricker`LA
jasonkuhrt has quit [Quit: Linkinus - http://linkinus.com]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
wmoxam has joined #ruby
dallasm has quit [Remote host closed the connection]
brian_000_ has quit [Quit: Leaving]
brianherman has quit [Quit: Leaving]
<welandB> Can I not have a hash key that is an integer?
anirudh24seven has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307122853]]
wfht has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<welandB> Oh I wonder if this is a JSON anomoly.
RORgasm has joined #ruby
<welandB> I'm using the json lib to save nested custom objects and all of my hash keys are turning from ints into strings.
alanp_ has quit [Remote host closed the connection]
<waxjar> you can use anything as a key. everything is an object :D
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
alanp has joined #ruby
jonathanwallace has joined #ruby
casheew has quit [Read error: Connection reset by peer]
w400z has quit []
RORgasm has quit [Ping timeout: 264 seconds]
dallasm has joined #ruby
Es0teric has joined #ruby
jamescarr has joined #ruby
casheew has joined #ruby
<bnagy> welandB: roundtripping stuff through a serialisation is not guaranteed to keep your Ruby classes intact
<bnagy> although turning numbers into strings surprises me, but maybe their concept of a dict only allows string keys
nathanl has quit [Ping timeout: 248 seconds]
Nisstyre-laptop has joined #ruby
wallclockbuilder has joined #ruby
casheew has quit [Read error: Connection reset by peer]
Guedes has quit [Ping timeout: 248 seconds]
BadQuanta has quit [Ping timeout: 258 seconds]
<ryanf> yeah, json keys can only be strings
<ryanf> see http://json.org/
casheew has joined #ruby
security has joined #ruby
wmoxam has quit [Ping timeout: 264 seconds]
megha has quit [Ping timeout: 248 seconds]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
<bnagy> welandB: to be completely honest, serialising custom objects freaks me out, but common practice is to have something like MyThing#to_json ( instance method ) and MyThing.from_json ( class method )
<bnagy> and in your to_json you have code that takes your object properties and stores them in some nice, standard jsonable format
casheew has quit [Read error: Connection reset by peer]
moos3 has joined #ruby
nathanl has joined #ruby
casheew has joined #ruby
becom33 has joined #ruby
casheew has quit [Read error: Connection reset by peer]
BadQuanta has joined #ruby
sweet_kid has joined #ruby
casheew has joined #ruby
etcetera has quit []
lewix has joined #ruby
ahokaomaeha has joined #ruby
casheew has quit [Read error: Connection reset by peer]
HecAtic has joined #ruby
mikurubeam is now known as Guest83442
Guest83442 has quit [Read error: Connection reset by peer]
ahokaomaeha is now known as mikurubeam
tomsthumb has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
casheew has joined #ruby
pavilionXP has quit [Ping timeout: 248 seconds]
nathanl has quit [Ping timeout: 260 seconds]
jbueza has joined #ruby
pavilionXP has joined #ruby
yacks has joined #ruby
casheew has quit [Read error: Connection reset by peer]
bordicon has joined #ruby
casheew has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
ckrailo has joined #ruby
ner0x has quit [Quit: Leaving]
io_syl has joined #ruby
juarlex has joined #ruby
juarlex_ has quit [Read error: Connection reset by peer]
casheew has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
hogeo has quit [Remote host closed the connection]
casheew has joined #ruby
hogeo has joined #ruby
ryanf has quit [Quit: leaving]
nateberkopec has quit [Client Quit]
emocakes has joined #ruby
casheew has quit [Read error: Connection reset by peer]
s00pcan has quit [Quit: Lost terminal]
toekutr has joined #ruby
s00pcan has joined #ruby
pcarrier_ has quit [Quit: Computer has gone to sleep.]
brhelwig has quit [Remote host closed the connection]
brhelwig has joined #ruby
mikurubeam has quit [Quit: brb]
casheew has joined #ruby
mikurubeam has joined #ruby
sayan has joined #ruby
casheew has quit [Read error: Connection reset by peer]
huoxito has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
nfk has quit [Quit: yawn]
zeade has joined #ruby
feedbackloop_ has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
brhelwig has quit [Ping timeout: 260 seconds]
daed has quit [Ping timeout: 255 seconds]
casheew has joined #ruby
SCommette has joined #ruby
Inside has quit [Ping timeout: 255 seconds]
guilleiguaran_ has quit [Ping timeout: 256 seconds]
platzhirsch has quit [Ping timeout: 256 seconds]
platzhirsch has joined #ruby
prime has quit [Read error: Connection reset by peer]
prime has joined #ruby
guilleiguaran_ has joined #ruby
Boohbah has quit [Ping timeout: 256 seconds]
Boohbah has joined #ruby
Boohbah is now known as Guest91682
daed has joined #ruby
etcetera has joined #ruby
feedbackloop_ has joined #ruby
ffranz has quit [Quit: Leaving]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
danneu has joined #ruby
superninkendo has joined #ruby
superninkendo1 has joined #ruby
casheew has quit [Read error: Connection reset by peer]
sayan_ has joined #ruby
sambio has quit []
sambio has joined #ruby
sayan has quit [Read error: Connection reset by peer]
sayan_ is now known as sayan
daed has quit [Ping timeout: 260 seconds]
sayan has quit [Changing host]
sayan has joined #ruby
casheew has joined #ruby
superninkendo has quit [Ping timeout: 258 seconds]
daed has joined #ruby
browndawg has joined #ruby
ebobby has quit [Quit: Lost terminal]
lewix has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
FrostyAcres has joined #ruby
uris has quit [Quit: Leaving]
FrostyAcres has quit [Client Quit]
bruschill has joined #ruby
benlieb has quit [Quit: benlieb]
dhruvasagar has quit [Ping timeout: 264 seconds]
reset has quit [Ping timeout: 248 seconds]
casheew has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
ocnam has joined #ruby
casheew has quit [Read error: Connection reset by peer]
finishingmove has quit [Quit: Nettalk6 - www.ntalk.de]
daed has quit [Ping timeout: 264 seconds]
daed has joined #ruby
mattbl has joined #ruby
casheew has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
lewix has joined #ruby
brhelwig has joined #ruby
raycloud_ has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
banjara has joined #ruby
HecAtic has quit [Quit: HecAtic]
raycloud has quit [Ping timeout: 248 seconds]
Kirotan has quit [Ping timeout: 246 seconds]
Matip has quit [Read error: Connection reset by peer]
sandGorgon has joined #ruby
brhelwig has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
brhelwig has joined #ruby
casheew has joined #ruby
freerobby has quit [Quit: Leaving.]
jekotia has quit [Quit: sleeeeeeeeeeeeeeeeeep]
Will_Tampa has joined #ruby
dhruvasagar has joined #ruby
ryanf has joined #ruby
moos3 has joined #ruby
kofno has joined #ruby
jim_r0x has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
huoxito has quit [Ping timeout: 258 seconds]
akashj87_ has quit [Quit: leaving]
raycloud has joined #ruby
raycloud_ has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
kofno has quit [Ping timeout: 258 seconds]
lewix has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
browndawg has quit [Quit: Leaving.]
pkrnj has joined #ruby
casheew has joined #ruby
momomomomo has left #ruby [#ruby]
casheew has quit [Read error: Connection reset by peer]
mmitchell has joined #ruby
browndawg has joined #ruby
marwinism has quit [Ping timeout: 240 seconds]
robustus has quit [Ping timeout: 248 seconds]
SCommette has quit [Quit: SCommette]
superninkendo1 has quit [Quit: Leaving.]
pavilionXP has quit [Remote host closed the connection]
divout has joined #ruby
security is now known as fire
raycloud has quit [Read error: Connection reset by peer]
casheew has joined #ruby
raycloud has joined #ruby
robustus has joined #ruby
emocakes has quit [Quit: emocakes]
etcetera has quit []
adjen has joined #ruby
<adjen> hi
<adjen> i discover a new great exploit to get root take a look http://ro0t.dyndns-server.com/
w400z has joined #ruby
adjen has quit [Killed (idoru (Spam is off topic on freenode.))]
Loaft has joined #ruby
etcetera has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
SCommette has joined #ruby
cloud|nix has joined #ruby
huoxito has joined #ruby
sandGorgon has quit [Ping timeout: 246 seconds]
daed has quit [Ping timeout: 264 seconds]
casheew has quit [Read error: Connection reset by peer]
sandGorgon has joined #ruby
casheew has joined #ruby
marwinism has joined #ruby
daed has joined #ruby
jonathanwallace has quit [Ping timeout: 248 seconds]
bruschill has quit [Quit: Textual IRC Client: www.textualapp.com]
jurassic_ has quit [Quit: jurassic_]
platzhirsch has quit [Read error: Connection reset by peer]
RORgasm has joined #ruby
sayan has quit [Read error: Connection reset by peer]
casheew has quit [Read error: Connection reset by peer]
cloud|nix has quit [Ping timeout: 264 seconds]
shevy has quit [Ping timeout: 264 seconds]
casheew has joined #ruby
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
marwinism has quit [Ping timeout: 260 seconds]
bigoldrock has joined #ruby
RORgasm has quit [Ping timeout: 258 seconds]
marwinism has joined #ruby
eliasp has quit [Read error: Connection reset by peer]
FunkySayu has quit [Ping timeout: 256 seconds]
FunkySayu has joined #ruby
lewix has joined #ruby
eliasp has joined #ruby
kornnflake has quit [Ping timeout: 252 seconds]
casheew has quit [Read error: Connection reset by peer]
winux has joined #ruby
winux has quit [Changing host]
winux has joined #ruby
crimezone20xx has joined #ruby
casheew has joined #ruby
superninkendo has joined #ruby
superninkendo has quit [Client Quit]
kornnflake has joined #ruby
winux has left #ruby [#ruby]
rickmasta has quit [Quit: Leaving...]
marwinism has quit [Ping timeout: 255 seconds]
marwinism has joined #ruby
hogeo has quit [Ping timeout: 240 seconds]
wallclockbuilder has quit [Remote host closed the connection]
mmitchell has quit [Remote host closed the connection]
tomzx_mac has quit [Ping timeout: 256 seconds]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
brianpWins has joined #ruby
coaster has quit [Ping timeout: 240 seconds]
jdunck has joined #ruby
agarie has quit [Remote host closed the connection]
shevy has joined #ruby
mockra has joined #ruby
coaster has joined #ruby
marwinism has quit [Ping timeout: 264 seconds]
cutaway has joined #ruby
mockra has quit [Remote host closed the connection]
rickmasta has joined #ruby
jurassic_ has joined #ruby
emocakes has joined #ruby
SCommette has quit [Quit: SCommette]
Davey has quit [Quit: Computer has gone to sleep.]
andrew12 has quit [Ping timeout: 245 seconds]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
<emergion> I'm extending a a gem, capistrano. Would it be best practice to name the gem "capistrano-foo" or "foo-capistrano" ?
subbyyy has quit [Ping timeout: 264 seconds]
<banister`sleep> emergion: foo-capistrano
<banister`sleep> capitrano-foo is the naming scheme for plugins
<banister`sleep> so unless you're building a plugin
<banister`sleep> dont name itthat way
<ryanf> banister`sleep: what else does "extending a gem" mean?
<ryanf> I was about to say capistrano-foo :)
<ryanf> btw hi
<banister`sleep> ryanf: personal extensions for a specific use case i guess
<banister`sleep> i didnt think he meant plugin for some reason
<banister`sleep> but i could be wrong
Edder has joined #ruby
<emergion> Well, I'm right here ;)
agarie has joined #ruby
<TTilus> emergion: "extend" as in fork and hack?
<emergion> When I say extending I mean, I'm want to extend capistrano to read some extra configuration from YAML files and talk to statsd
Edder has left #ruby [#ruby]
<ryanf> that sounds like capistrano-foo to me
<emergion> Yeah, not planning to touch the main codebase at all
<emergion> just want to use require 'capistrano/foo' in my cap script
<TTilus> emergion: just make it a plugin
<TTilus> emergion: ah, or just wrap capistrano with niceties
<emergion> TTilus, that's esentially what I'm doing
rippa has joined #ruby
<emergion> I think I'll go with capistrano-foo.
<TTilus> emergion: id call it foopistrano, capifu or foo-capistrano
ocnam has quit [Quit: Quit: Textual IRC Client: http://www.textualapp.com/]
<emergion> Ok fair enough, if you do that, what should the containing class inside look like, Camelcase ? FooCapistrano?
andrew12 has joined #ruby
kofno has joined #ruby
marwinism has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
<ryanf> emergion: it's kind of traditional to do capistrano-foo -> capistrano/foo -> Capistrano::Foo
<TTilus> the late would be the path of least surprise i guess
<ryanf> but I don't really like that for this use case
<ryanf> because you could easily accidentally collide with capistrano internals (depending on what foo is obvs)
<ryanf> so I guess that would imply CapistranoFoo and maybe capistrano_foo as the gem name
Davey has joined #ruby
Davey has quit [Client Quit]
<emergion> ok cheers
ananthakumaran has joined #ruby
matayam has quit [Remote host closed the connection]
<TTilus> we didnt make this complicated, didnt we? :)
casheew has quit [Read error: Connection reset by peer]
kofno has quit [Ping timeout: 258 seconds]
<emergion> TTilus, sure did hehe But I appreciate the feedback nevertheless
Bosox20051 has joined #ruby
casheew has joined #ruby
Davey has joined #ruby
dkannan has joined #ruby
worstadmin has quit [Ping timeout: 260 seconds]
Davey has quit [Client Quit]
marwinism has quit [Ping timeout: 255 seconds]
marwinism has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
Hanmac1 is now known as Hanmac
chandankumar has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
casheew has quit [Read error: Connection reset by peer]
cutaway has quit [Ping timeout: 255 seconds]
worstadmin has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
<shevy> Hanmac baby!
bigoldrock has quit [Ping timeout: 256 seconds]
wallclockbuilder has joined #ruby
dhruvasagar has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
casheew has joined #ruby
marwinism has quit [Ping timeout: 255 seconds]
marwinism has joined #ruby
casheew has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby
pencilcheck has joined #ruby
pen has quit [Ping timeout: 256 seconds]
sayan has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
akashj87 has joined #ruby
maxmande_ has joined #ruby
casheew has joined #ruby
chrishough has quit [Quit: chrishough]
dallasm has quit [Remote host closed the connection]
generalissimo has quit [Remote host closed the connection]
xrq` has joined #ruby
maxmanders has quit [Ping timeout: 260 seconds]
marwinism has quit [Ping timeout: 264 seconds]
emdub_ has quit [Ping timeout: 245 seconds]
emdub has joined #ruby
xrq has quit [Read error: Connection reset by peer]
_br_ has quit [Ping timeout: 260 seconds]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
etcetera has quit []
maxmande_ has quit [Quit: Computer has gone to sleep.]
w400z has quit []
marwinism has joined #ruby
tvw has joined #ruby
jamescarr has quit [Quit: jamescarr]
ezkl has joined #ruby
marwinism has quit [Ping timeout: 256 seconds]
Bosox20051 has quit [Quit: Leaving]
marwinism has joined #ruby
sleetdrop has quit [Ping timeout: 264 seconds]
ckrailo has quit [Read error: Connection reset by peer]
ckrailo_ has joined #ruby
sleetdrop has joined #ruby
Mon_Ouie has joined #ruby
sleetdrop has quit [Client Quit]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
marwinism has quit [Ping timeout: 264 seconds]
etcetera has joined #ruby
marwinism has joined #ruby
apok has quit [Quit: apok]
browndawg has quit [Ping timeout: 256 seconds]
hogeo has joined #ruby
mmitchell has joined #ruby
dekroning has quit [Read error: Connection reset by peer]
dekroning has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
_br_ has joined #ruby
aganov has joined #ruby
sambio has quit []
marwinism has quit [Ping timeout: 264 seconds]
agarie has quit [Remote host closed the connection]
mmitchell has quit [Ping timeout: 264 seconds]
marwinism has joined #ruby
apeiros_ has joined #ruby
mikurubeam has quit [Ping timeout: 240 seconds]
yacks has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
browndawg has joined #ruby
luckyruby has joined #ruby
a_a_g has joined #ruby
etcetera has quit []
yashshah has joined #ruby
Rioji has quit [Remote host closed the connection]
agarie has joined #ruby
c0rn has joined #ruby
ryanf has quit [Quit: leaving]
sleetdrop has joined #ruby
mikurubeam has joined #ruby
tagrudev has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
nari has quit [Ping timeout: 264 seconds]
casheew has quit [Read error: Connection reset by peer]
lewix has quit [Remote host closed the connection]
ckrailo_ has quit [Ping timeout: 276 seconds]
tcopp has quit [Ping timeout: 248 seconds]
davetherat has quit [Remote host closed the connection]
answer_42 has joined #ruby
davetherat has joined #ruby
casheew has joined #ruby
huoxito has quit [Quit: Leaving]
chandankumar has quit [Ping timeout: 264 seconds]
casheew has quit [Read error: Connection reset by peer]
sleetdrop has quit [Quit: Computer has gone to sleep.]
ndch has quit [Remote host closed the connection]
girija_ has joined #ruby
casheew has joined #ruby
timonv has joined #ruby
sleetdrop has joined #ruby
casheew has quit [Read error: Connection reset by peer]
angusiguess has joined #ruby
RORgasm has joined #ruby
ukd1 has quit [Remote host closed the connection]
brhelwig has quit [Remote host closed the connection]
nari has joined #ruby
casheew has joined #ruby
answer_42 has quit [Remote host closed the connection]
RORgasm has quit [Read error: Operation timed out]
answer_42 has joined #ruby
matayam has joined #ruby
newUser1234 has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
matayam has quit [Ping timeout: 240 seconds]
Morkel has joined #ruby
Neandre has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
gregorg has quit [Quit: Quitte]
sandGorgon has quit [Ping timeout: 258 seconds]
vlad_sta_ has joined #ruby
sandGorgon has joined #ruby
yashshah has quit [Ping timeout: 240 seconds]
vlad_sta_ has quit [Remote host closed the connection]
echevemaster has joined #ruby
vlad_starkov has quit [Ping timeout: 246 seconds]
a_a_g has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
timonv has quit [Remote host closed the connection]
ndngvr has joined #ruby
matayam has joined #ruby
agarie has quit [Remote host closed the connection]
timonv has joined #ruby
yashshah_ has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
puppeh has joined #ruby
toekutr has quit [Remote host closed the connection]
filipe has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
echevemaster has quit [Quit: Saliendo]
girija_ has quit [Ping timeout: 256 seconds]
angusiguess has quit [Ping timeout: 240 seconds]
casheew has quit [Read error: Connection reset by peer]
io_syl has quit [Quit: Computer has gone to sleep.]
casheew_ has joined #ruby
yashshah- has joined #ruby
yashshah_ has quit [Ping timeout: 258 seconds]
brianpWins has quit [Quit: brianpWins]
yxhuvud has joined #ruby
wallclockbuilder has quit [Remote host closed the connection]
arturaz has joined #ruby
casheew_ has quit [Read error: Connection reset by peer]
casheew has joined #ruby
newUser1234 has joined #ruby
yashshah- has quit [Ping timeout: 260 seconds]
dhruvasagar has quit [Ping timeout: 256 seconds]
pduin has joined #ruby
dhruvasagar has joined #ruby
awestroke has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
pencilcheck has quit [Remote host closed the connection]
banjara has quit [Quit: Leaving.]
yacks has joined #ruby
casheew has quit [Read error: Connection reset by peer]
lessless has quit [Read error: Connection reset by peer]
wallclockbuilder has joined #ruby
fire has quit [Quit: WeeChat 0.4.0]
timonv has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
hamed_r has joined #ruby
lukeholder has joined #ruby
casheew has joined #ruby
bondar has joined #ruby
<lukeholder> anyone know how i can reference $3 here? https://gist.github.com/lukeholder/5264877
arturaz_ has joined #ruby
a_a_g has joined #ruby
arturaz_ has quit [Client Quit]
<lukeholder> noone?
<apeiros_> your patience is limited to 1min? wow…
chandankumar has joined #ruby
<apeiros_> '\3' or "\\3"
<Hanmac> apeiros_: no, its only 30sec :D
dhruvasagar has quit [Ping timeout: 256 seconds]
becom33 has quit [Ping timeout: 264 seconds]
<jsaak> do you think it is possible to save the state of a running ruby program, then reload and continue it?
<apeiros_> also, there's no point in using Regexp.new there over a regex literal
newUser1234 has quit [Remote host closed the connection]
<apeiros_> jsaak: there's nothing to just store the whole state, you'll have to come up with a way yourself. serializers like e.g. marshal help you with getting it to a file and loading it again.
<lukeholder> apeiros_ could you explain where the \3 would go ?
dhruvasagar has joined #ruby
<injekt> where $3 is?
<injekt> you didn't just try it?
<apeiros_> lukeholder: obviously where you wrote "I WANT TO REFERENCE $3 here"
<apeiros_> otherwise I wouldn't have answered your question, would I?
<Hanmac> lukeholder: why is no one reading the docs?
eldariof has joined #ruby
<charliesome> jsaak: fork, send SIGSTOP to the child
<charliesome> jsaak: when you want to start it up against, send SIGCONT
<apeiros_> charliesome: what's up with eval-in?
<lukeholder> Hanmac: been reading the docs for 1 hour
timonv has joined #ruby
<charliesome> apeiros_: i accidentally networking
<Hanmac> lukeholder: http://www.ruby-doc.org/core-2.0/String.html#method-i-gsub << "It may contain back-references to the pattern’s capture groups of the form \\d, where d is a group number, or \\k<n>, where n is a group name. "
<charliesome> apeiros_: i've been working for the past 3 days to get my server online
<apeiros_> lukeholder: and you haven't seen ` "hello".gsub(/([aeiou])/, '<\1>') #=> "h<e>ll<o>" ` in the docs?
<apeiros_> charliesome: oh
<jsaak> charliesome: not bad, but i want to store the state to the hdd
<charliesome> jsaak: if you want to do that, you'll have to use scary operating system specific hacks
<charliesome> jsaak: look into process checkpointing
<lukeholder> Hanmac thats gsub… not how to reference a match
<Quadlex> charliesome: Did you just finish Tomb Raider by any chance?
<apeiros_> lukeholder: um, you use gsub in your example, and you want to reference the match in gsub
<charliesome> Quadlex: nope?
<jsaak> basically i want to embed ruby into a c program, and save the ruby program state on savegames
<apeiros_> lukeholder: so this *is* the answer to your question. if it doesn't solve your problem, then you need to amend your question.
<Quadlex> charliesome: Ahh, K. Thought you were someone I know offline
<jsaak> there must be a better way :)
<charliesome> jsaak: dumping state manually :p
<apeiros_> jsaak: as said, marshal and co are your friends
<lukeholder> Hanmac ah ok i see it… "If replacement is a String it will be substituted for the matched text. It may contain back-references to the pattern’s capture groups of the form \\d"
<lukeholder> Hanmac: so this: body = body.gsub(captionregex, \\3)
<Hanmac> i know thats what i quoted to you
<jsaak> not a bad idea, but if i do not know the program itself which is running, it is not trivial to marshal the state
<Hanmac> you forgot the ''
<injekt> '\3'
<lukeholder> Hanmac injekt yep thanks
lewix has joined #ruby
<lukeholder> thanks guys appreciate your patience… was looking for the match ref on the regex class
<Hanmac> charliesome: do you also add some ruby-trunk to the possible rubies? :P
<jsaak> for example how to jump inside a loop
<charliesome> Hanmac: yeah i can
<charliesome> Hanmac: i'll need to get a cronjob going to download and build latest versions of stuff
<apeiros_> awesome how he gets the correct answer, doesn't bother to try it and in turn just keeps a channel occupied…
<charliesome> Hanmac i already have two other head/trunk ones there but its a manual process to update them
thebastl has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
<Hanmac> for sample the required key arguments seems to be only available in ruby-trunk
thebastl has quit [Remote host closed the connection]
lukeholder has quit [Quit: Computer has gone to sleep.]
awestroke has quit [Remote host closed the connection]
mengu has joined #ruby
lewix has quit [Ping timeout: 264 seconds]
becom33 has joined #ruby
bondar has quit []
lessless has joined #ruby
lukeholder has joined #ruby
alup has joined #ruby
<lessless> Guys! Help me initialize instance variable in module inclusion hook - https://gist.github.com/dirty-hippie/5269482
lukeholder has quit [Client Quit]
browndawg has quit [Ping timeout: 258 seconds]
<injekt> instance_variable_set
<injekt> actually that's silly
<lessless> what do you mean?
<injekt> lessless: why are you trying to do this?
<injekt> is probably a better question
<apeiros_> lessless: you can't
<apeiros_> base is the class
<apeiros_> setting an ivar in the class is not setting it in instances of that class
<lessless> ivar ?
<apeiros_> ivar is short for instance variable
mpfundstein has joined #ruby
<injekt> use a method on your module instead
mengu has quit [Quit: Konversation terminated!]
casheew has quit [Read error: Connection reset by peer]
mengu has joined #ruby
casheew has joined #ruby
Gonzih has joined #ruby
<TTilus> jsaak: what kind of game you are saving the state from?
JohnBat26 has joined #ruby
<TTilus> jsaak: you might want to simplify your problem
razibog has joined #ruby
casheew has quit [Read error: Connection reset by peer]
<jsaak> a 3d game where the aim is to write programs in ruby, and to learn it
<TTilus> jsaak: you need to identify (and possibly do a bit restructuring to separate) the local state of your "game world"
<TTilus> jsaak: think of it as a datastructure
* apeiros_ thinks it'd be nice if Class.new's implementation changed a bit
<TTilus> jsaak: walk the structure and serialize/deserialize it
<Quadlex> You know what's not fun to test?
<lessless> is it right to have attr_accessor :global and def global @global ||= 'asdasd' end... there should be no name clash because of ivar uses @?
<Quadlex> Things that monkeypatch test frameworks
<injekt> lessless: do you know what attr_accessor does?
<TTilus> Quadlex: i was about to suggest mock/stub libs
<apeiros_> class Class; def new(*args, &block); obj = obj.allocate; obj.initialize(*args, &block); obj.initializers.each(&:call); obj; end; end
<apeiros_> lessless: attr_accessor just defines 2 methods
<Quadlex> TTilus: My library does things with the number of times tests run and such
<Quadlex> It's kind of hard to test them
<apeiros_> attr_accessor :foo defines `foo; @foo; end` and `foo=(val); @foo = val; end`
<TTilus> Quadlex: confusing at the least, been (roughly) there, feel for you
browndawg has joined #ruby
jurassic_ has quit [Quit: jurassic_]
xbob has quit [Quit: Leaving]
casheew has joined #ruby
<lessless> I read about it, but always comes a time to rethink readed ;)
Sargun_ is now known as Sargun
<jsaak> TTilus: since the running program state is a part of the "game" state i find it hard to restructure it
Sargun has quit [Changing host]
Sargun has joined #ruby
<TTilus> jsaak: it is definitely more complicated and less portable to try to achieve "save game" feature by "suspending" os process
<apeiros_> jsaak: isolate all state in single objects
<Quadlex> TTilus: TY. I'm thinking about trying to pull the MP out and make the thing an Rspec formatter
<TTilus> jsaak: thats what i mean
<apeiros_> serializing those is in turn easy (again, marshal)
codecop has joined #ruby
<TTilus> jsaak: you need to restructure and isolate "game world" from the "program in general"
<jsaak> yup i do not want to save os processes
<TTilus> jsaak: and listen to apeiros_, really :)
<jsaak> yeah i try
marcdel has quit []
<jsaak> it is the only doable way it seems, i just do not know how to do it
hashmal has joined #ruby
<TTilus> jsaak: start from concepts, give them names
<TTilus> jsaak: what "things" do you have in your "game world"
<TTilus> jsaak: try not to think too much about the implementation you currently have
razibog has quit [Ping timeout: 264 seconds]
<apeiros_> those objects don't need to be flat either btw., you can perfectly nest and even recurse objects. marshal has no problem with that.
<apeiros_> just make sure that their boundaries are clear, i.e. that they don't reference non-game-state objects
<TTilus> jsaak: from your description i gather your game world consists of simulated physical objects in 3d eucleidian space and program code
slainer68 has joined #ruby
<jsaak> i give you an example: i have a robot in the game and the user wrote a program something like this: "do_something(); while true; do_something_else(); sleep(1); end
vlad_sta_ has joined #ruby
<jsaak> and the robot is in the loop at the moment i want to save the state
<jsaak> apeiros_: i hear you and i mostly agree with you, i am just dumb and can not solve this problem for example
casheew has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Read error: Connection reset by peer]
casheew has joined #ruby
timonv has quit [Remote host closed the connection]
razibog has joined #ruby
<TTilus> jsaak: why would one want to save the state in the middle of loop?
timonv has joined #ruby
<jsaak> for this example i need the object_space which can be dumped, the stack, and the position where the program is at
xbob has joined #ruby
<apeiros_> jsaak: you mean your program is somewhere deep down in an arbitrary method and you want to stop it right there
daed has quit [Ping timeout: 264 seconds]
pi3r has joined #ruby
<jsaak> TTilus: i do not see any other way
<apeiros_> that'll be hard. you'll probably have to reorganize the flow of your program, so it has discreete exit points where you can reenter
angusiguess has joined #ruby
<apeiros_> *discrete
<TTilus> jsaak: lemme rephrase
daed has joined #ruby
<TTilus> jsaak: whats the value of that feature to the player of the game?
<jsaak> apeiros_: yes
<jsaak> the robot is doing something useful at the moment of the save
<jsaak> and by reloading i can not allow it to start its program again
<jsaak> i need it to continue
pioz has joined #ruby
casheew has quit [Read error: Connection reset by peer]
<TTilus> the program code and the state of the game space when the program starts determine the result fully
casheew has joined #ruby
<TTilus> doesn't it?
<jsaak> i do not think it is enough
casheew has quit [Read error: Connection reset by peer]
<TTilus> why
angusiguess has quit [Ping timeout: 255 seconds]
<jsaak> or
nomenkun_ has joined #ruby
<jsaak> it is enough _when_ the program starts
* TTilus is trying to understand
maxmanders has joined #ruby
<jsaak> not at the moment when the program is in the middle of something
<TTilus> whats the value to the player?
thebastl has joined #ruby
<TTilus> ..of that saving in the middle of run
Loaft has quit [Read error: Connection reset by peer]
kofno has joined #ruby
<jsaak> well i can disable save-game functionality :)
techlife has quit [Ping timeout: 256 seconds]
<TTilus> that feels to me like savegame in the middle of "run" in The Incredible Machine
<jsaak> these programs run forver usually
casheew has joined #ruby
<TTilus> why they run forever?
jurassic_ has joined #ruby
<TTilus> jsaak: im not being an ass, i just want to understand the value of the savegame feature as you described you wanted it to be done
<jsaak> for example there is an AI of an enemy: while true; go(random_place); shoot(random_direction); end
<TTilus> is it like robot wars?
<jsaak> i can not wait to finish these programs
<TTilus> "i"
<jsaak> something like that
<TTilus> theres the game and the player
<TTilus> who's "i"
<jsaak> i == player
<TTilus> ok
casheew has quit [Read error: Connection reset by peer]
<jsaak> but since these programs run forever, it does not really matter i think
<TTilus> :)
kofno has quit [Ping timeout: 240 seconds]
<TTilus> does this game have goals?
<TTilus> or achievements or anything that sort?
<jsaak> yup
casheew has joined #ruby
dekroning has quit [Quit: leaving]
<TTilus> so
<jsaak> i think i just have to disable saving :(
<jsaak> i can save between missions, no problem
techlife has joined #ruby
cobragoat has quit [Remote host closed the connection]
<TTilus> if player plays the game by writing a program and then seeing if it achieves the goal or not, then it would seem to me like saving between runs would be the obvious way of going about
casheew has quit [Read error: Connection reset by peer]
<TTilus> there's no point in savin g on times where there's no variation point
<TTilus> think of it from the perspective of player
<TTilus> if you load game and it deterministicly heads (pretty much) to the same result every time there's very little point in loading
MrZYX|off is now known as MrZYX
<TTilus> natural point of variation is when user alters the code
<jsaak> there are multiple programs running at the sam time, and human iteractions are possible too
<TTilus> so taken the starting states are predetermined, actually saving the programs is enough
casheew has joined #ruby
<TTilus> how do players interact with the run?
<TTilus> is it "real time", repl-style
nathancahill has quit [Quit: nathancahill]
<TTilus> $ shoot :missile
<TTilus> $ turn -15.23
<TTilus> $ accelerate
jgrevich has quit [Remote host closed the connection]
<jsaak> -> going pm
casheew has quit [Read error: Connection reset by peer]
Sicp has joined #ruby
<jsaak> think of a FirstPersonShooter, you have an avatar, you can shoot and move
fire has joined #ruby
casheew has joined #ruby
<jsaak> and you have 5 robots which helps you, you program them and the let them loose
<jsaak> and there are 15 enemies which are ruby programs too
akemrir has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
<jsaak> and the aim is to kill all enemies
Astralum has quit [Ping timeout: 264 seconds]
jerius has joined #ruby
casheew has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 264 seconds]
<TTilus> now i see the point
Sicp has quit [Ping timeout: 264 seconds]
<TTilus> you might want to make the robots event driven
Bry8Star has quit [Ping timeout: 276 seconds]
miso1337 has joined #ruby
dhruvasagar has joined #ruby
casheew has joined #ruby
Astralum has joined #ruby
<jsaak> thats not a bad idea
<TTilus> organizing the robots that way gives you natural exit points (every cycle in event loop) where you can just serialize the state of "game world" and save program code and re-enter eventloop upon loading the state and code
casheew has quit [Read error: Connection reset by peer]
<TTilus> exactly the exit/re-enter point strategy apeiros_ was describing earlier
RORgasm has joined #ruby
<TTilus> programming event driven robots for real time environment builds proper mindset for node programming =D
vlad_starkov has joined #ruby
vlad_st__ has joined #ruby
<jsaak> while true; do_something(); sleep 1; end is so 20th century, you are right :)
cobragoat has joined #ruby
casheew has joined #ruby
vlad_sta_ has quit [Ping timeout: 258 seconds]
RORgasm has quit [Ping timeout: 258 seconds]
casheew has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 240 seconds]
a_a_g has quit [Quit: Leaving.]
mikurubeam has quit [Ping timeout: 260 seconds]
drale2k has quit [Quit: Leaving...]
casheew has joined #ruby
Nahra has quit [Remote host closed the connection]
Skofo has quit [Quit: Leaving]
Nahra has joined #ruby
cantonic has joined #ruby
vlad_st__ has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
nari has quit [Ping timeout: 264 seconds]
tsion has joined #ruby
zigomir has joined #ruby
sheerun has joined #ruby
casheew has quit [Read error: Connection reset by peer]
hmarr has joined #ruby
casheew has joined #ruby
casheew has quit [Read error: Connection reset by peer]
jerius has quit [Quit: Computer has gone to sleep.]
pskosinski has joined #ruby
chandankumar has quit [Ping timeout: 258 seconds]
casheew has joined #ruby
tsion has left #ruby ["Leaving"]
Bry8Star has joined #ruby
alexwh has quit [Ping timeout: 252 seconds]
casheew has quit [Read error: Connection reset by peer]
pi3r has quit [Quit: Leaving]
pi3r has joined #ruby
justsee_ has joined #ruby
justsee has quit [Ping timeout: 255 seconds]
<shevy> jsaak loop { do_something; sleep 1 }
<shevy> looks nicer
Zai00 has joined #ruby
vlad_sta_ has joined #ruby
casheew has joined #ruby
lkba has quit [Ping timeout: 248 seconds]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
whitedawg has joined #ruby
BizarreCake has joined #ruby
yashshah- has joined #ruby
colonolGron has joined #ruby
rickmasta has quit [Quit: Leaving...]
sweet_kid has quit [Ping timeout: 246 seconds]
angusiguess has joined #ruby
yannis has joined #ruby
emocakes has quit [Quit: emocakes]
hamed_r has quit [Remote host closed the connection]
mhn23 has joined #ruby
browndawg has quit [Ping timeout: 255 seconds]
sweet_kid has joined #ruby
sebastianb has quit [Ping timeout: 246 seconds]
eliasp has quit [Ping timeout: 246 seconds]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
Sicp has joined #ruby
nomenkun has joined #ruby
casheew has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
nomenkun_ has quit [Ping timeout: 258 seconds]
mpfundstein_ has joined #ruby
freeayu has joined #ruby
br4ndon has joined #ruby
_veer has quit [Ping timeout: 248 seconds]
bordicon has quit [Ping timeout: 258 seconds]
angusiguess has quit [Ping timeout: 246 seconds]
browndawg has joined #ruby
mpfundstein has quit [Ping timeout: 246 seconds]
casheew has joined #ruby
sweet_kid has quit [Ping timeout: 246 seconds]
sebastianb has joined #ruby
cobragoat has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
sweet_kid has joined #ruby
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
casheew has joined #ruby
angusiguess has joined #ruby
browndawg has quit [Ping timeout: 258 seconds]
browndawg has joined #ruby
casheew has quit [Read error: Connection reset by peer]
sebastianb has quit [Ping timeout: 246 seconds]
nari has joined #ruby
sebastianb has joined #ruby
backjlack_ has joined #ruby
RottenMuffin has joined #ruby
casheew has joined #ruby
Gonzih has quit [Quit: IRC is just multiplayer vim.]
elaptics`away is now known as elaptics
cantonic has quit [Quit: cantonic]
Catbuntu has joined #ruby
emergion has joined #ruby
burgestrand has joined #ruby
cobragoat has joined #ruby
backjlack has quit [Ping timeout: 264 seconds]
rickmasta has joined #ruby
tenmilestereo has joined #ruby
browndawg has quit [Ping timeout: 256 seconds]
nari has quit [Ping timeout: 255 seconds]
yashshah- has quit [Ping timeout: 258 seconds]
browndawg has joined #ruby
angusiguess has quit [Ping timeout: 246 seconds]
jdunck has quit [Quit: Computer has gone to sleep.]
rickmasta has quit [Ping timeout: 240 seconds]
LennyLinux has joined #ruby
bakingbread has quit [Excess Flood]
<dawkirst> hi, why can't I do 'foo'.downcase!.strip! ?
icedp has joined #ruby
<MrZYX> because most bang methods return nil if they didn't change anything
icedp is now known as Guest88525
xardas has joined #ruby
cantonic has joined #ruby
<dawkirst> MrZYX, that's it. Thanks.
danneu has quit [Ping timeout: 264 seconds]
Guest88525 is now known as bakingbread
bakingbread has quit [Changing host]
bakingbread has joined #ruby
freeayu has quit [Ping timeout: 256 seconds]
backjlack_ has quit [Remote host closed the connection]
backjlack has joined #ruby
sepp2k has joined #ruby
mhn23 has quit [Quit: Goodbye.]
webwarlock has joined #ruby
freeayu has joined #ruby
ananthakumaran1 has joined #ruby
nari has joined #ruby
timonv has quit [Remote host closed the connection]
maria has joined #ruby
<maria> hi
<maria> anybody here
<maria> help
<maria> plz
ananthakumaran2 has joined #ruby
<maria> guyz
ananthakumaran has quit [Ping timeout: 264 seconds]
chandankumar has joined #ruby
backjlack has quit [Remote host closed the connection]
<maria> i need help
<MrZYX> maria: you can't get answers without asking questions
<maria> in vb
<maria> plz
bakingbread has quit [Quit: ZNC - https://PanicBNC.net]
<maria> in visual basic
timonv has joined #ruby
<MrZYX> lol, wrong channel
<maria> no body know in programming
icedp- has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<maria> no body can help
Heero has quit [Read error: Connection reset by peer]
slainer68 has quit [Read error: Connection reset by peer]
chichou has quit [Read error: Connection reset by peer]
Heero has joined #ruby
Heero has quit [Changing host]
Heero has joined #ruby
akhet has joined #ruby
icedp- is now known as bakingbread
bakingbread has quit [Changing host]
pac1 has quit [Ping timeout: 248 seconds]
bakingbread has joined #ruby
slainer68 has joined #ruby
miso1337 has quit [Quit: afk]
<maria> i want help in vb
chichou has joined #ruby
ananthakumaran1 has quit [Ping timeout: 264 seconds]
pi3r has quit [Quit: Leaving]
justsee_ has quit [Ping timeout: 260 seconds]
pi3r has joined #ruby
hmarr has quit []
<maria> guyz
m8 has joined #ruby
<akhet> wut
<maria> hi
<maria> any body here
Heero has quit [Read error: Connection reset by peer]
<maria> i need help in vb
<maria> plz
Heero has joined #ruby
Heero has quit [Changing host]
Heero has joined #ruby
<maria> any one can help me
<akhet> this is #ruby
<maria> give me a programming channel
<pduin> #vb #vb.net
<akhet> try #vb
br4ndon_ has joined #ruby
k610 has joined #ruby
maria has left #ruby [#ruby]
JohnBat26 has quit [Read error: Connection reset by peer]
<k610> what's the proper way to start some ruby app like bluepill on boot from e.g. /etc/rc.local
<MrZYX> I like daemontools
sonda has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
vlad_sta_ has quit [Ping timeout: 246 seconds]
whitedawg1 has joined #ruby
<k610> MrZYX, with daemontools : will i have to prefix my commands with source #{rvmpath} || #{full_rvm bin path} do bluepill ... or can i simply call bluepill ...
br4ndon_ has quit [Client Quit]
br4ndon has joined #ruby
RottenMuffin has quit [Read error: Connection reset by peer]
rtnmfn has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
<MrZYX> environment wise it's pretty much the same as putting it into rc.local or an init script
<MrZYX> but daemontools keeps it running in case it dies
whitedawg has quit [Ping timeout: 240 seconds]
wargasm has joined #ruby
atno has quit [Read error: Connection reset by peer]
<MrZYX> and provides tools for logging stdout, switching the user etc
cantonic has quit [Ping timeout: 260 seconds]
hashmal has quit [Ping timeout: 264 seconds]
danneu has joined #ruby
cobragoat has quit [Remote host closed the connection]
araujo has quit [Ping timeout: 264 seconds]
cantonic has joined #ruby
tcopp has joined #ruby
Nisstyre-laptop has quit [Ping timeout: 264 seconds]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
<k610> MrZYX, seems great for more advandced usage but at the moment i fail to correctly setup the environment something to do with rvm global gem set & co. my command works fine on a shell but throws unexpected errors when run on reboot in /etc/rc.local
vlad_starkov has joined #ruby
Raboo has quit [Ping timeout: 245 seconds]
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
araujo has joined #ruby
jonathanwallace has joined #ruby
danneu has quit [Ping timeout: 264 seconds]
eldariof has quit [Read error: No route to host]
browndawg has quit [Ping timeout: 240 seconds]
slainer68 has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
m8 has quit [Quit: Sto andando via]
emergion has joined #ruby
dallasm has joined #ruby
vlad_starkov has quit [Ping timeout: 258 seconds]
vlad_starkov has joined #ruby
mhn23 has joined #ruby
cantonic has quit [Quit: cantonic]
Catbuntu has quit [Quit: Leaving]
<e-dard> Hi, is the stub method part of RSpec or do I need rspec-mock ?
<quazimodo> /j #lisp
<quazimodo> grr
drale2k has joined #ruby
ArchBeOS has joined #ruby
hashmal has joined #ruby
mhn23_ has joined #ruby
tcopp has quit [Ping timeout: 255 seconds]
mhn23 has quit [Ping timeout: 264 seconds]
Raboo has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
postmodern has quit [Quit: Leaving]
dhruvasagar has joined #ruby
matayam has quit [Remote host closed the connection]
<e-dard> If you were testing methods that read and process a file would it be better to create the file during the tests, or keep a file under the spec folder?
mhn23_ has quit [Read error: Connection reset by peer]
lukeholder has joined #ruby
dangerousdave has joined #ruby
sebastianb has quit [Ping timeout: 246 seconds]
thone has joined #ruby
rtnmfn has quit [Quit: Bye]
Layke has joined #ruby
thone_ has quit [Ping timeout: 258 seconds]
Domon has quit [Remote host closed the connection]
webwarlock has quit [Ping timeout: 246 seconds]
sweet_kid has quit [Ping timeout: 246 seconds]
<Layke> Hey. Day off work.. PHP dev for 10+ years~ fed up. Want a change... figured I'd shoot towards Ruby for some upcoming side projects. I'm just looking for speed of development at the moment. Never touched a line of Ruby... thoughts on getting started?..
timonv has joined #ruby
<Layke> Also, is it ill advised to learn/use rails simutaneously as jumping in to Ruby for the first time?
Domon has joined #ruby
<apeiros_> Layke: rails is huge, personally I'd learn ruby before rails. but it's certainly possible to do both at once.
<apeiros_> it'll just be a bit difficult to understand what's really going on with rails heads first. there's a couple of "magical" being done there
backjlack has joined #ruby
<Layke> Yeah okay thanks. I'll just stick to Ruby to start with today.
Domon has quit [Ping timeout: 255 seconds]
<lukeholder> apeiros_ can you shed any light on my this is not working? https://gist.github.com/5270331
answer_42 has quit [Quit: WeeChat 0.4.0]
sweet_kid has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
baba has joined #ruby
<Layke> apeiros_, Any useful links/resources?
<MrZYX> Layke: tryruby.org if you really never saw a line before ;)
fire has quit [Ping timeout: 264 seconds]
<Layke> Thanks. I'm also keen to know about how Ruby is actually ran on a web server. I'm used to running nginx, and passing off requests to a running fast-cgi process.. I can't actually follow how my "web server" works with Ruby
bakingbread has quit [Ping timeout: 246 seconds]
TMM has quit [Remote host closed the connection]
<pi3r> Layke: what about using unicorn ?
<MrZYX> typically you have a "appserver" which provides a unix socket and nginx or apache reverse proxying to that
sebastianb has joined #ruby
tomzx_mac has joined #ruby
<MrZYX> there's also passenger which is sort off mod_php for ruby
yannis has quit [Ping timeout: 240 seconds]
Upasna has joined #ruby
BeLucid_ has quit [Remote host closed the connection]
sweet_kid has quit [Ping timeout: 246 seconds]
cantonic has joined #ruby
includex has joined #ruby
sebastianb has quit [Ping timeout: 246 seconds]
akashj87_ has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
Upasna has quit [Max SendQ exceeded]
icedp has joined #ruby
DonRichie has joined #ruby
RORgasm has joined #ruby
icedp is now known as Guest8673
freeayu__ has joined #ruby
includex has quit [Quit: Leaving...]
chandankumar has quit [Ping timeout: 255 seconds]
browndawg has joined #ruby
browndawg has left #ruby [#ruby]
akashj87 has quit [Ping timeout: 258 seconds]
yashshah- has joined #ruby
sayan has quit [Ping timeout: 258 seconds]
BeLucid has joined #ruby
Xeago has joined #ruby
browndawg has joined #ruby
Raboo has quit [Ping timeout: 264 seconds]
freeayu has quit [Ping timeout: 264 seconds]
Raboo has joined #ruby
jnoob22 has joined #ruby
RORgasm has quit [Ping timeout: 240 seconds]
sheerun has quit []
Guest8673 is now known as bakingbread
bakingbread has quit [Changing host]
bakingbread has joined #ruby
dhruvasagar has joined #ruby
browndawg has quit [Ping timeout: 258 seconds]
sheerun has joined #ruby
<quazimodo> hey everybody
jurassic_ has quit [Quit: jurassic_]
TMM has joined #ruby
TMM has quit [Changing host]
TMM has joined #ruby
<sam113101> hey quazimodo
emergion has quit [Quit: Computer has gone to sleep.]
yashshah- has quit [Ping timeout: 255 seconds]
rudisimo has joined #ruby
browndawg has joined #ruby
wallclockbuilder has quit [Remote host closed the connection]
wallclockbuilder has joined #ruby
yashshah- has joined #ruby
akashj87_ has quit [Quit: leaving]
akashj87 has joined #ruby
skattyadz has joined #ruby
<quazimodo> sam113101: get a rock melon, scoop out flesh, add sugar and crushed ice anda tiny pinch of salt. Best programming break EVER
bluOxigen has joined #ruby
cobragoat has joined #ruby
<quazimodo> Layke: i learnt ruby with rails. its easy... theres very little to learn about ruby
<quazimodo> i found it to be a profoundly intuitive language
vlad_sta_ has joined #ruby
vlad_starkov has quit [Ping timeout: 246 seconds]
blueOxigen has joined #ruby
Layke has quit [Ping timeout: 258 seconds]
lukeholder has quit [Quit: Computer has gone to sleep.]
wfht has joined #ruby
cobragoat has quit [Ping timeout: 258 seconds]
ttt has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 255 seconds]
subbyyy has joined #ruby
freerobby has joined #ruby
akashj87_ has joined #ruby
wallclockbuilder has quit [Remote host closed the connection]
sleetdrop has quit [Ping timeout: 240 seconds]
NiteRain has joined #ruby
tommyvyo has quit [Quit:]
yashshah- has quit [Ping timeout: 240 seconds]
Fallacy has joined #ruby
anirudh24seven has joined #ruby
akashj87 has quit [Ping timeout: 264 seconds]
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
cantonic has quit [Quit: cantonic]
v0n has joined #ruby
Whoop has quit [Remote host closed the connection]
yashshah- has joined #ruby
Fallacy has quit [Read error: Connection reset by peer]
JohnBat26 has joined #ruby
wfht has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
Whoop has joined #ruby
nfk has joined #ruby
moos3 has joined #ruby
jamescarr has joined #ruby
devoper has joined #ruby
Layke has joined #ruby
freerobby has quit [Quit: Leaving.]
Fallacy has joined #ruby
niklasb has joined #ruby
sebastianb has joined #ruby
yshh has quit [Remote host closed the connection]
divout has left #ruby ["PART #rails :PART #coffeescript :PART #documentcloud :PART #jquery :PART #jquery-dev :PART #jquerymobile-dev :PART #emberjs :QUIT :Leaving."]
sandGorgon has quit [Ping timeout: 258 seconds]
dkannan has quit [Quit: dkannan]
tubbo has joined #ruby
<Fallacy> Is $* an ARGV?
kirun has joined #ruby
<injekt> Fallacy: yes
v0n has quit [Ping timeout: 246 seconds]
m8 has joined #ruby
blueOxigen has quit [Ping timeout: 264 seconds]
tommyvyo has joined #ruby
cantonic has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
Neandre has quit [Remote host closed the connection]
nomenkun has quit [Read error: Connection reset by peer]
nezumi has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
chandankumar has joined #ruby
worstadmin has quit [Ping timeout: 246 seconds]
nomenkun has joined #ruby
ArchBeOS has quit [Remote host closed the connection]
jerius has joined #ruby
bubblehead has joined #ruby
<jnoob22> Getting an ArgumentError here -> http://pastie.org/private/8ijw6yzooss5idnuvky6da am I missing something possibly?
sandGorgon has joined #ruby
mpfundstein has joined #ruby
<apeiros_> jnoob22: the code you gave does not give that error
<apeiros_> so yes, you're missing something
<jnoob22> apeiros_: what could it possibly be? ive double-checked to make sure my editor is not playing games with me.
angusiguess has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
Fallacy has quit [Read error: Connection reset by peer]
worstadmin has joined #ruby
<jnoob22> possibly there is something clashing with Agent class
<jnoob22> my own Agent class
nomenkun has joined #ruby
<apeiros_> it sounds like you had 2 definitions of initialize
buibex has joined #ruby
<apeiros_> i.e. of Agent#initialize
<apeiros_> or you're having namespace issues
<jnoob22> only one definition if you see my class
<jnoob22> that's it.. namespace
<jnoob22> seems there's already another Agent defined elsewhere... thanks much for helping me track it down apeiros_
<jnoob22> no wonder my unit tests didn't pick it up earlier :-\
freerobby has joined #ruby
freerobby has quit [Client Quit]
<becom33> http://pastebin.com/YBat8SHX why do I get false from respond_to?('shell_'+cmd_split[0]) when I do "cd .."
whitedawg1 has quit [Ping timeout: 255 seconds]
TooTubular has joined #ruby
stevechiagozie has joined #ruby
<apeiros_> jnoob22: if you're on 1.9, you can do: Agent.instance_method(:initialize).source_location
<jnoob22> awesome... thanks!
yashshah- has quit [Ping timeout: 256 seconds]
chandankumar has quit [Ping timeout: 264 seconds]
TheFuzzball has quit [Quit: Leaving...]
<apeiros_> becom33: because top level methods are private
akashj87_ has quit [Quit: leaving]
subbyyy has quit [Ping timeout: 258 seconds]
akashj87 has joined #ruby
<becom33> apeiros_, how do i get it right ?
vlad_sta_ has quit [Ping timeout: 264 seconds]
<apeiros_> respond_to?(name, true) includes private methods
sailias has joined #ruby
vlad_starkov has joined #ruby
sebastianb has quit [Ping timeout: 246 seconds]
tomzx_mac has quit [Read error: Operation timed out]
<becom33> thanks apeiros_ got it :)
millerti has joined #ruby
breakingthings has joined #ruby
brianherman has joined #ruby
stevechiagozie has quit [Quit: Computer has gone to sleep.]
kofno has joined #ruby
jamescarr has quit [Quit: jamescarr]
slainer68 has joined #ruby
bigoldrock has joined #ruby
jamescarr has joined #ruby
bakingbread has quit [Excess Flood]
stevechiagozie has joined #ruby
icedp has joined #ruby
icedp is now known as Guest84960
stevechiagozie has quit [Client Quit]
xoyo_ has joined #ruby
uris has joined #ruby
Guest84960 is now known as bakingbread
BizarreCake has quit [Read error: Connection reset by peer]
bakingbread has quit [Changing host]
bakingbread has joined #ruby
joofsh has joined #ruby
dyogenez has joined #ruby
statarb3 has joined #ruby
xoyo_ has quit [Client Quit]
end_guy has joined #ruby
dyogenez has quit [Client Quit]
hogeo has quit [Remote host closed the connection]
whitedawg has joined #ruby
jamescarr has quit [Quit: jamescarr]
tenmilestereo has quit [Quit: Leaving]
sayan has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
rudisimo has quit [Remote host closed the connection]
nomenkun has joined #ruby
whitedawg has quit [Client Quit]
atno has joined #ruby
rudisimo has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
hogeo has joined #ruby
bakingbread has quit [Quit: ZNC - https://PanicBNC.net]
akemrir has quit [Remote host closed the connection]
arya has joined #ruby
akemrir has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
cantonic has quit [Quit: cantonic]
<Fraeon> /win 45
jpfuentes2 has joined #ruby
tagrudev has quit [Remote host closed the connection]
drale2k has quit [Quit: Leaving...]
brianherman has quit [Read error: Connection reset by peer]
nathanl has joined #ruby
cantonic has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
lewix has joined #ruby
solidoodlesuppor has joined #ruby
<lewix> hi
icedp- has joined #ruby
icedp- is now known as bakingbread
bakingbread has quit [Changing host]
bakingbread has joined #ruby
<rob_> win c
rob_ has left #ruby [#ruby]
jonathanwallace has quit [Ping timeout: 240 seconds]
hiyakashi has joined #ruby
royalty has joined #ruby
bradleyprice has joined #ruby
pioz has quit [Quit: This computer has gone to sleep]
freerobby has joined #ruby
kofno has quit [Remote host closed the connection]
hogeo has quit [Remote host closed the connection]
v0n has joined #ruby
Guest55604 is now known as thomas`
angusiguess has quit [Ping timeout: 264 seconds]
adamjleonard has joined #ruby
yshh has joined #ruby
stevechiagozie has joined #ruby
sebastianb has joined #ruby
wfht has joined #ruby
k610 has quit [Quit: Leaving]
puppeh has quit [Remote host closed the connection]
yshh has quit [Ping timeout: 246 seconds]
puppeh has joined #ruby
finishingmove has joined #ruby
nomenkun has joined #ruby
RORgasm has joined #ruby
jamescarr has joined #ruby
freeayu__ has quit [Read error: Connection reset by peer]
freeayu__ has joined #ruby
Davey has joined #ruby
slainer68 has quit [Read error: Connection reset by peer]
nfisher has joined #ruby
yfeldblum has joined #ruby
RORgasm has quit [Ping timeout: 258 seconds]
brianherman has joined #ruby
slainer68 has joined #ruby
yashshah__ has joined #ruby
codecop has quit [Remote host closed the connection]
TeckniX has joined #ruby
wfht has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
Rhy0lite has joined #ruby
brianherman has quit [Ping timeout: 258 seconds]
yashshah__ has quit [Ping timeout: 258 seconds]
jlast has joined #ruby
_nitti has joined #ruby
pioz has joined #ruby
sambao21 has joined #ruby
_nitti has quit [Read error: Connection reset by peer]
_nitti has joined #ruby
nathanl has quit [Quit: Lost terminal]
mvangala_ has quit [Ping timeout: 264 seconds]
noop has quit [Quit: Leaving]
mvangala has joined #ruby
picca has joined #ruby
osvico has quit [Ping timeout: 260 seconds]
s__dana has quit [Quit: s__dana]
xardas has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931]]
mikurubeam has joined #ruby
slainer6_ has joined #ruby
joofsh has quit [Remote host closed the connection]
atmosx has joined #ruby
<Layke> Are thre any useful resources for learning ruby... ie.. Trying to work my way through but keep getting stumped on symbols.. When to use ? when to use @, Why do you have %i at the beginning of some blocks etc. I'm happy to work my way through bit by bit.
statarb3 has quit [Ping timeout: 255 seconds]
<atmosx> Layke: google
slainer68 has quit [Ping timeout: 258 seconds]
<atmosx> Layke: there are plenty, the best way as always is buying a book and reading it, guides you step by step.
<atmosx> Symbols are class-wide variables
freeayu__ has quit [Remote host closed the connection]
Rhy0lite has left #ruby ["Leaving"]
sambao21 has quit [Quit: Quitter]
<atmosx> for example @db = Sequel::Connect("sqlite://#{sqlite}") at the initialize class function, will allo me to use @db through my class.
<atmosx> Layke: write a couple of classes you'll figure it out, it's not a hard grasp as a concept.
<Layke> Got the day off work, so just trying to pick up some Ruby.. as I'm fed up of a decade of PHP. :)
<atmosx> ah I know nothing about PHP :-) I'm just an amateur
SCommette has joined #ruby
<atmosx> there are ex-PHPers here for sure that could help you
mercwithamouth has quit [Ping timeout: 255 seconds]
<Layke> Nah, it's more just what's a good resource to dril through code.
<Layke> A lot of the itme, it's hard to know what I need to know, without knowing what I don't know.
<Layke> (Spoken like a true confucius)
brianherman has joined #ruby
<MrZYX> Layke: %{} isn't a block, it's syntax like quotes are, %{this is a string}, %w{this is an array of strings} %i{this is an array of symbols}
patjoh has quit [Ping timeout: 248 seconds]
<MrZYX> I hope you found irb already?
<Layke> I actually just found this link.. Which looks good. http://ruby.learncodethehardway.org/book/
<Layke> Yeah, I've found irb :)
<Layke> Trying to find an package for Sublime that lets me run snippets quickly
<Layke> Through irb.
justsee has quit [Ping timeout: 256 seconds]
picca has quit [Remote host closed the connection]
k610 has joined #ruby
<MrZYX> hm good idea
joofsh has joined #ruby
<Layke> I saw that one. Didn't have a clue what it did
<Layke> lol :)
idkazuma has joined #ruby
tvw has quit []
<atmosx> Layke: true men do it on console! :-P
alex__c2022 has joined #ruby
Quebert has joined #ruby
stef_204 has joined #ruby
<Layke> I'm sure, but I'd like to learn by quickly changing and seeing output, sothis will naturally, I assume be quicker.
sleetdrop has joined #ruby
<atmosx> Layke: just kidding
adkron has joined #ruby
bean has joined #ruby
<atmosx> I'm off to bed and killing my neighbours for playing the most idiotic possible music so fucking loud every noon.
<atmosx> bb
atmosx has quit [Quit: And so the story goes…]
nezumi has joined #ruby
yashshah__ has joined #ruby
rippa has joined #ruby
doodlehaus has joined #ruby
averiso has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 258 seconds]
Davey has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Davey has joined #ruby
etcetera has joined #ruby
kpshek has joined #ruby
averiso has joined #ruby
motto has joined #ruby
jonathanwallace has joined #ruby
m8 has quit [Ping timeout: 256 seconds]
sebastianb has quit [Ping timeout: 246 seconds]
<Layke> Incidentally, this has probably been the most useful thing I've seen since starting to learn.. https://github.com/bbatsov/ruby-style-guide
puppeh has quit [Remote host closed the connection]
<becom33> i wanna see if the if split_command[1] has dots .. would this work ? split_command[1].match/'..'/
angusiguess has joined #ruby
WilfredTheGreat has joined #ruby
zeade has quit [Quit: Leaving.]
yashshah has joined #ruby
doodlehaus has quit [Remote host closed the connection]
arturaz has quit [Remote host closed the connection]
yashshah__ has quit [Ping timeout: 264 seconds]
divout has joined #ruby
<bnagy> that style guide is chick full of crap
etcetera has quit []
<bnagy> *chock
tomsthumb has quit [Quit: Leaving.]
<royalty> why 2 spaces instead of atab
<royalty> tab
<royalty> isn't it easier to just hit tab
<royalty> than bother making things 2 spaces in
angusiguess has quit [Ping timeout: 246 seconds]
yshh has joined #ruby
<GeekOnCoffee> !troll
<royalty> lol
<Hanmac> tap does make more sense for me
jerius has quit [Quit: Computer has gone to sleep.]
<Hanmac> 1 tab = 1 indent ... i use it for every language
<apeiros_> royalty: while I prefer tab, 2 spaces is what is commonly used in the ruby world
<royalty> I mean it isn't a big deal
<apeiros_> going with the flow has value on its own
<royalty> I was just wondering why
<hashmal> are we seriously have that tab vs spaces talk ??!
chrishough has joined #ruby
io_syl has joined #ruby
<apeiros_> are we?
<bnagy> royalty: your editor will do what you tell it when you hit tab
<apeiros_> we're also plenking, as it seems :-p
<bnagy> which may include inserting two spaces
<royalty> I can't wait until I get ROR set up on my test machine
averiso has quit [Ping timeout: 258 seconds]
<royalty> but that will probably take a while
<bnagy> personally I don't really give a crap about indents
<royalty> due to internet issues
<nezumi> Shall we talk about the one true editor while we are at it?
<royalty> nezumi: vim?
cutaway has joined #ruby
<Hanmac> cat ?
<apeiros_> ed
* apeiros_ waits for magnetized needle + steady hand
fcatojo has joined #ruby
nateberkopec has joined #ruby
<bnagy> ugh I can't read any more
<tubbo> i write my code with quill penzzzzzzzzzzzzzzzzzz
<tubbo> #oldskool
<royalty> awesome
<royalty> I write code with my feet
hmarr has joined #ruby
<royalty> keyboard on the floor
<royalty> it is like playing DDR
d3vic3 has joined #ruby
motto has quit [Quit: Sto andando via]
<becom33> i wanna see if the if split_command[1] has dots .. would this work ? split_command[1].match/'..'/
<apeiros_> hands free coding? sounds awesome
<becom33> nvm got it
<becom33> sorry
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
<royalty> imagine a program that can let you see through white t shirts with ease
<royalty> can you imagine it
<bnagy> becom33: just use include? '..'
krawchyk has joined #ruby
fcatojo has quit [Client Quit]
d3vic3 has quit [Client Quit]
<apeiros_> since it's probably meant to be '..' only, I'd even use == '..'
<Hanmac> apeiros_: http://xkcd.com/378/
<royalty> if (match/'white t-?shirt'/)
averiso has joined #ruby
<royalty> shirt.xray
<royalty> end
<royalty> is that even a valid regex
<royalty> in ruby
<apeiros_> the regex is valid, the rest - not sure
<royalty> lol
<apeiros_> match/ # <- might get misinterpreted
<apeiros_> you want either a space between match and //, or have explicit parens
<royalty> what are explicit parens
<apeiros_> match(/…/)
RORgasm has joined #ruby
<becom33> bnagy, http://pastebin.com/p3yJJdpe check if you could help me with this ? my head hurts . I have mentioned what I want to do in the end of the script since its to long
<becom33> apeiros_, ^ please check
<royalty> oh
hmarr has quit [Ping timeout: 264 seconds]
<royalty> becom33: is this ROR?
<becom33> royalty, no
<becom33> CLI
<royalty> oh ok
dallasm has quit [Remote host closed the connection]
<royalty> in regex
girija_ has joined #ruby
<royalty> don't you have to escape the periods
hmarr has joined #ruby
<royalty> ?
<becom33> royalty, what do u mean ?
averiso has quit [Quit: Quit.]
<royalty> becom33: is this part of your code a regex? if split_command[1] =~ /../
<royalty> probably not
<royalty> I haven't seen =~ before
Xeago has quit [Read error: Connection reset by peer]
sebastianb has joined #ruby
<becom33> royalty, well yea . it works
<royalty> oh weird
Xeago has joined #ruby
randomautomator has joined #ruby
<becom33> problem is with the logic and my crappy coding
geekbri has joined #ruby
<Hanmac> becom33: /../ does not work, you need /\.\./
<becom33> :/ weired it works in my script . well I'll change anyway
<becom33> btw Hanmac I want to detect if it has ".." not "/../"
<royalty> yeah that looked weird
crimezone20xx has quit [Ping timeout: 258 seconds]
<royalty> lol do you know what a period means in regex?
<breakingthings> becom33: . is a special character in regex though.
slainer68 has joined #ruby
<Hanmac> becom33: split_command[1][".."]
<breakingthings> your regex will match literally everything besides single characters.
<royalty> why don't you just do a string match
<royalty> instead of a regex
<royalty> I mean I assume ruby has those lol
mmitchell has joined #ruby
aganov has quit [Remote host closed the connection]
jerius has joined #ruby
<royalty> if split_command[1] == ".."
<royalty> i assume that would be it...
<Hanmac> royalty: nope does not work
<royalty> oh
<becom33> Hanmac, ok now thats done .
newUser1234 has joined #ruby
<royalty> well I will learn as I go along
Elhu has joined #ruby
<royalty> but good to know
<becom33> what about the ../ and join part ? its pretty confusing
<royalty> lol you wrote it
slainer__ has joined #ruby
WilfredTheGreat has quit [Quit: leaving]
slainer6_ has quit [Ping timeout: 246 seconds]
johnmilton has joined #ruby
anonymuse has joined #ruby
sambio has joined #ruby
<royalty> becom33: so shell_cd commands is function and path is a parameter? I wish I have had used ruby more lol
ChewieBeardy has joined #ruby
<becom33> what ?
mikurubeam has quit [Quit: +1 (Yes). -1 (No). i (What I have been trying to tell you all along).]
<mpfundstein> if i use active support outside of rails. how can i start testing? I subclassed from TestCase
sandGorgon has quit [Ping timeout: 260 seconds]
slainer68 has quit [Ping timeout: 258 seconds]
<royalty> i dunno i just don't know what your code does bc i don't use ruby enough I was asking if shell_cd commands was a function
<royalty> I actually just started learning
<royalty> like yesterday
doodlehaus has joined #ruby
cantonic_ has joined #ruby
cantonic has quit [Ping timeout: 258 seconds]
cantonic_ is now known as cantonic
yashshah has quit [Ping timeout: 240 seconds]
Hanmac has quit [Ping timeout: 248 seconds]
browndawg has quit [Quit: Leaving.]
cyberarm has joined #ruby
Hanmac has joined #ruby
Nanuq has quit [Ping timeout: 252 seconds]
browndawg has joined #ruby
robbyoconnor has quit [Ping timeout: 264 seconds]
eval-in has joined #ruby
adam12_ has quit [Ping timeout: 240 seconds]
mikurubeam has joined #ruby
browndawg has quit [Client Quit]
colonolGron has quit [Ping timeout: 256 seconds]
tylersmith has joined #ruby
browndawg has joined #ruby
ndch has joined #ruby
mlue has quit [Quit: leaving]
etcetera has joined #ruby
yashshah has joined #ruby
akemrir has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
Sicp has quit [Ping timeout: 240 seconds]
<mpfundstein> does anyone know what i have to pass to MiniTest::Unit::TestCase#run ? They doc says a runner object but doesnt mention what that shall be
puppeh has joined #ruby
havenwood has joined #ruby
anonymuse has quit [Quit: Leaving...]
nomenkun has quit [Remote host closed the connection]
<nezumi> Gah! I just started writing Perl in a Ruby script!!
adam12 has joined #ruby
ananthakumaran2 has quit [Quit: Leaving.]
Nanuq has joined #ruby
royalty has quit [Quit: This computer has gone to sleep]
Ripp__ has joined #ruby
linoespinoza has joined #ruby
idkazuma has quit [Remote host closed the connection]
<puppeh> how can I retrieve whatever key is pressed globally from ruby?/
finishingmove has quit [Quit: Nettalk6 - www.ntalk.de]
emocakes has joined #ruby
arya has quit [Ping timeout: 248 seconds]
finishingmove has joined #ruby
thinkdevcode has joined #ruby
m8 has joined #ruby
bigoldrock has quit [Ping timeout: 240 seconds]
<linoespinoza> hey <puppeh> try googling STDIN ruby
<puppeh> linoespinoza: but i want this to be a daemon process
<puppeh> linoespinoza: that logs whatever the users input everywhere
hmarr has quit []
finishingmove has quit [Client Quit]
girija_ has quit [Ping timeout: 246 seconds]
jacobw has quit [Quit: WeeChat 0.4.0]
etcetera has quit []
Davey has quit [Quit: Computer has gone to sleep.]
yshh_ has joined #ruby
yshh has quit [Read error: Connection reset by peer]
ndch has quit [Remote host closed the connection]
wallclockbuilder has joined #ruby
arya has joined #ruby
<linoespinoza> there is something called "daemons" at deamons.rubyforge.org
zyrex has joined #ruby
geekbri has quit [Remote host closed the connection]
<linoespinoza> give it a try :)
tomsthumb has joined #ruby
Davey has joined #ruby
emocakes has quit [Quit: emocakes]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
freerobby has quit [Quit: Leaving.]
yashshah has quit [Ping timeout: 264 seconds]
<ChewieBeardy> hey guys, I have a quick question regarding concurrency in ruby
<ChewieBeardy> I need to develop a server that will interact with an active record database
<ChewieBeardy> I first thought of eventmachine, but they don't seem to play nice together
<ChewieBeardy> should I try to adapt my ORM to be non blocking, or try another concurrency route altogether?
wyhaines has joined #ruby
<ChewieBeardy> I've read good things about celluloid, but I don't know if it can help me
royalty has joined #ruby
royalty has quit [Client Quit]
bakingbread is now known as icedp
arya has quit [Ping timeout: 248 seconds]
Xeago has quit [Remote host closed the connection]
icedp is now known as bakingbread
yashshah has joined #ruby
royalty has joined #ruby
yashshah_ has joined #ruby
Xeago has joined #ruby
royalty has quit [Client Quit]
angusiguess has joined #ruby
freerobby has joined #ruby
akemrir has joined #ruby
etcetera has joined #ruby
yashshah- has joined #ruby
royalty has joined #ruby
maletor has joined #ruby
brianpWins has joined #ruby
yashshah has quit [Ping timeout: 264 seconds]
benlieb has joined #ruby
wmoxam has joined #ruby
yashshah_ has quit [Ping timeout: 264 seconds]
geggam_wk has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
sheerun has quit [Read error: Connection reset by peer]
chrisbolton has joined #ruby
shock_one has joined #ruby
ndboost has joined #ruby
havenwood has quit [Remote host closed the connection]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
Xeago has quit [Remote host closed the connection]
yashshah- has quit [Ping timeout: 264 seconds]
tylersmith has quit [Quit: tylersmith]
buibex has quit [Remote host closed the connection]
yashshah- has joined #ruby
pi3r has quit [Quit: Leaving]
razibog has quit [Ping timeout: 264 seconds]
buibex has joined #ruby
sheerun has joined #ruby
<puppeh> linoespinoza: i mean, is there a way to read "every" keystroke that a user inputs? something like a keylogger?
mmitchell has quit [Remote host closed the connection]
bricker`1A has joined #ruby
maycon has joined #ruby
carraroj has quit [Ping timeout: 256 seconds]
ssvo has quit [Remote host closed the connection]
<shock_one> puppeh, which OS?
<puppeh> os x
_veer has quit [Ping timeout: 246 seconds]
ssvo has joined #ruby
_veer has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
buibex has quit [Ping timeout: 256 seconds]
mlr has joined #ruby
bricker`LA has quit [Ping timeout: 264 seconds]
frem has joined #ruby
codecop has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
robscomputer has joined #ruby
angusiguess has quit [Ping timeout: 260 seconds]
buibex has joined #ruby
mlr has left #ruby [#ruby]
joofsh has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 258 seconds]
yashshah- has quit [Ping timeout: 240 seconds]
yashshah- has joined #ruby
<puppeh> shock_one: osx mountain lion
maozai has joined #ruby
<shock_one> puppeh, Gotcha. What is the ObjectiveC way to listen to key pressed event? keyDown?
ckrailo has joined #ruby
havenwood has joined #ruby
ezkl has quit [Quit: Textual IRC Client: www.textualapp.com]
<jamescarr> hmmmm… what is a simple one liner to get a value from a hash and provide a default if it is not there?
<puppeh> shock_one: could it be possible that the OS didn't provide a standard API for doing this?
<jamescarr> like in python: foo.get('bar', 'Default Value')
<puppeh> jamescarr: #fetch
anonymuse has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
robbyoconnor has joined #ruby
joofsh has joined #ruby
<shock_one> puppeh, apps like alfred do intercept keystrokes, so I think there is an API.
yashshah__ has joined #ruby
maozai has left #ruby [#ruby]
<puppeh> shock_one: possibly it would involve using ObjC libraries right?
<shock_one> puppeh, sure.
ckrailo has quit [Read error: Connection reset by peer]
<shock_one> puppeh, this can help you http://stackoverflow.com/questions/1683604/intercepting-keystrokes-in-osx . Use MacRuby to access ObjC libraries.
<puppeh> hey thx!
Yu\2 has joined #ruby
<shock_one> Yes.
cheez0r_ is now known as cheez0r
browndawg has quit [Ping timeout: 255 seconds]
zigomir has quit [Quit: zigomir]
yashshah- has quit [Ping timeout: 264 seconds]
ckrailo has joined #ruby
mockra has joined #ruby
<shock_one> jamescarr, hash[key] || default
<puppeh> hm so is the macruby the only way to use objC libraries?
<shock_one> puppeh, no idea. Maybe there are some wrappers or something.
mva3212 has joined #ruby
devbox_ has joined #ruby
royalty has quit [Quit: This computer has gone to sleep]
devbox_ has quit [Client Quit]
internet_user has joined #ruby
becom33 has quit [Quit: Leaving]
<burgestrand> You can write C extensions in ObjectiveC for Ruby.
<shock_one> burgestrand, ☺
<burgestrand> I also believe that since you could use the ObjC functions from a regular C program by setting up the ObjC runtime (it’s not too much code), you could probably do it with regular FFI as well.
zeade has joined #ruby
<shock_one> burgestrand, you can't call Cocoa libraries from C.
maletor has joined #ruby
etcetera has quit []
<puppeh> how would u go about logging all keystrokes from a ruby program?
zeade has quit [Client Quit]
<puppeh> i'm not sure how many ways there are and which is the easiest
<shock_one> puppeh, I would write it in Objective C.
nfisher has quit [Ping timeout: 256 seconds]
zeade has joined #ruby
royalty has joined #ruby
jgrevich has joined #ruby
ananthakumaran has joined #ruby
Spooner has joined #ruby
* Hanmac prefers C++ gems :P
sweeper has joined #ruby
brianpWins has quit [Quit: brianpWins]
yashshah__ has quit [Ping timeout: 264 seconds]
chrisbolton has quit [Quit: chrisbolton]
<sweeper> hey folks. anyone use gir_ffi?
yashshah__ has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
_emptymag00 has quit [Ping timeout: 260 seconds]
verysoftoiletppr has joined #ruby
sayan has quit [Read error: Connection reset by peer]
jamie_ca_ has joined #ruby
endzyme has joined #ruby
sleetdrop has quit [Quit: Computer has gone to sleep.]
chrishough has quit [Quit: chrishough]
arya has joined #ruby
jurassic_ has joined #ruby
browndawg has joined #ruby
ToApolytoXaos has joined #ruby
Xeago has joined #ruby
shock_one has quit [Ping timeout: 264 seconds]
buibex has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
<Mon_Ouie> shock_one: You can call every Obj-C method, etc. in pure C using the functions from the runtime.
jerius has joined #ruby
sayan has joined #ruby
_veer has quit [Ping timeout: 258 seconds]
mengu has quit [Ping timeout: 258 seconds]
fourq is now known as krylon
rubarLion has joined #ruby
arya has quit [Ping timeout: 248 seconds]
k610 has quit [Ping timeout: 240 seconds]
krylon is now known as fourq
hiyakashi has quit [Ping timeout: 246 seconds]
<lewix> anybody played with rubymotion ?
_emptymag00 has joined #ruby
ryanjh has joined #ruby
finnomenon has joined #ruby
wmoxam has quit [Ping timeout: 264 seconds]
chrishough has joined #ruby
markalanevans has quit [Quit: markalanevans]
randomautomator has quit [Remote host closed the connection]
classix has quit [Ping timeout: 256 seconds]
randomautomator has joined #ruby
asm has joined #ruby
asm has left #ruby [#ruby]
pduin has quit [Remote host closed the connection]
akashj87 has quit [Ping timeout: 264 seconds]
motto has joined #ruby
arya has joined #ruby
rubarLion has quit [Ping timeout: 255 seconds]
timonv has quit [Remote host closed the connection]
tomzx_mac has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
cobragoat has joined #ruby
havenwood has joined #ruby
angusiguess has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
motto has quit [Client Quit]
ryanjh has quit [Quit: Textual IRC Client: www.textualapp.com]
Spooner has quit [Read error: Connection reset by peer]
jekotia has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
banjara has joined #ruby
timonv has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
nfisher has joined #ruby
Voodoofish430 has joined #ruby
_veer has joined #ruby
rubarLion has joined #ruby
jamescarr has left #ruby [#ruby]
freerobby has quit [Quit: Leaving.]
m8 has quit [Quit: Sto andando via]
peteyg_ has joined #ruby
tylersmith has joined #ruby
chandankumar has joined #ruby
alup has quit [Quit: Leaving]
daed has quit [Ping timeout: 258 seconds]
rubarLion has quit [Ping timeout: 258 seconds]
mengu has joined #ruby
teddyp1cker has left #ruby ["Konversation terminated!"]
nfisher has quit [Ping timeout: 255 seconds]
pioz_ has joined #ruby
joofsh has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 240 seconds]
mercwithamouth has joined #ruby
peta_ has joined #ruby
<peta_> hi guys
apok has joined #ruby
pioz_ has quit [Client Quit]
<peta_> I have a string X. Now I want to create an array with th
rippa has joined #ruby
akashj87 has joined #ruby
motto has joined #ruby
rippa has quit [Client Quit]
<peta_> ree elements by calling a block three times and always passing in string X as arg
<peta_> is there a ruby'esque way for doing that
pioz has quit [Ping timeout: 260 seconds]
<peta_> ?
<peta_> some fancy syntactical sugar foo?
daed has joined #ruby
rippa has joined #ruby
jgarvey has joined #ruby
puppeh has quit [Remote host closed the connection]
<bean> peta_: can you give an example of what you have, and what you expect back?
rubarLion has joined #ruby
<peta_> bean: ['-contexts.db', '-po2s.db', '-so2p.db', '-sp2o.db'].inject(123) do { |a,b| a+b }
arya has quit []
notwen_ has quit [Changing host]
notwen_ has joined #ruby
notwen_ is now known as notwen
nfisher has joined #ruby
<peta_> given that the number 123 (used it for testing only) would be a variable x
<peta_> I expect that that the array will have 123 prefixed to each string
<bean> mk
<peta_> ['-contexts.db', '-po2s.db', '-so2p.db', '-sp2o.db'].inject(123) { |a,b| a+b }
<peta_> sorry
kuzushi has joined #ruby
<lewix> '123'
<waxjar> array.map { |element| "123-#{element}" }
browndawg has quit [Quit: Leaving.]
daed has quit [Ping timeout: 256 seconds]
<peta_> aaah
tommyvyo has quit [Quit:]
<waxjar> inject is used in situation where you want to process an array into one value, sum all values for examples
<peta_> :)
<waxjar> *situations
<peta_> thx
<waxjar> np :)
brianherman has quit [Quit: Leaving]
<peta_> have a nice easter weekend
filipe has quit [Read error: Connection reset by peer]
quazimodo has joined #ruby
kuzushi_ has quit [Ping timeout: 255 seconds]
malkomalko has joined #ruby
<bean> [8] pry(main)> thing = "123"
<bean> [9] pry(main)> ['-contexts.db', '-po2s.db', '-so2p.db', '-sp2o.db'].map{|a| "#{thing}"+a }
<bean> => ["123-contexts.db", "123-po2s.db", "123-so2p.db", "123-sp2o.db"]
<bean> if you want it externally defined
peta_ has quit [Quit: peta_]
rupee has joined #ruby
daed has joined #ruby
razibog has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rippa has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
freerobby has joined #ruby
browndawg has joined #ruby
rippa has quit [Client Quit]
banjara has quit [Quit: Leaving.]
mpfundstein_ has quit [Remote host closed the connection]
<lewix> why the extra step thing = '123'
nfisher has quit [Ping timeout: 256 seconds]
rubarLion has quit [Ping timeout: 256 seconds]
slash_nick has joined #ruby
<lewix> 09:53 peta_: is there a ruby'esque way for doing that
m8 has joined #ruby
devoper has quit [Ping timeout: 260 seconds]
beiter has joined #ruby
<lewix> bean: one line was fine =)
apod has joined #ruby
royalty has quit [Quit: Leaving]
jerius has joined #ruby
browndawg has quit [Client Quit]
ndboost has quit [Remote host closed the connection]
motto has quit [Ping timeout: 255 seconds]
amh345 has joined #ruby
daed has quit [Ping timeout: 258 seconds]
mpfundstein has quit [Ping timeout: 258 seconds]
wallcloc_ has joined #ruby
doodlehaus has quit [Remote host closed the connection]
djwonk has quit []
browndawg has joined #ruby
<amh345> hi everyone. i've upgraded my app recently to ruby 1.9.3 from 1.8.7. i've got pretty much everything done - except for one piece. i have a large csv i generate. im building it from an array.
<amh345> in ruby 1.8.7 spacer = "\t" would give me a tab. but in ruby 1.9.3 "\t" renders as
<amh345> \t
momomomomo has joined #ruby
wallclockbuilder has quit [Ping timeout: 260 seconds]
GrizBear has joined #ruby
nathancahill has joined #ruby
<lewix> amh345: can you paste the code
<amh345> it's 900 lines. is there anything specific you're looking for so i can pair it down?
<waxjar> are you sure you're using double quotes amh345?
<momomomomo> Afternoon all
momomomomo has quit [Killed (idoru (Spam is off topic on freenode.))]
<lewix> amh345: "\t"
<amh345> hi waxjar, im definitely using double quotes.
jdunck has joined #ruby
apok has quit [Quit: apok]
rippa has joined #ruby
<waxjar> hmm, that's strange
<amh345> \n also renders
<amh345> as \n
<lewix> amh345: what do you use to output
<amh345> but i did just notice something in the csv file. the entire thing is wrapped in [ ]
zigomir has joined #ruby
<amh345> lewix: im outting with Open3.popen3 and streaming to a gpg.
<lewix> ok it's out of my league
zigomir has quit [Client Quit]
<lewix> =)
ndboost has joined #ruby
rubarlio_ has joined #ruby
<amh345> but. i did an unencrypted test with File.open("blah.csv","w") and same result.
sweeper has left #ruby [#ruby]
Will_Tampa has quit [Ping timeout: 260 seconds]
sam113101 has quit [Quit: WeeChat 0.4.0]
pigoz has quit [Quit: WeeChat 0.4.0-dev]
sam113101 has joined #ruby
<waxjar> the \t's aren't in the csv file are they?
<amh345> they are
<lewix> amh345: do you use puts, p,pp ,print or write
linoespinoza has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<amh345> the csv has no cols or rows. first field looks like ["a","\t","b","c","\t","\n"]
<waxjar> ah, well there's your problem :P
browndawg has quit [Quit: Leaving.]
ndboost has quit [Read error: Connection reset by peer]
<waxjar> my guess is that the CSV library you're using escapes \s.
<amh345> im not using a csv library
browndawg has joined #ruby
skattyadz has quit [Quit: skattyadz]
girija_ has joined #ruby
EvanPurkhiser has joined #ruby
markalanevans has joined #ruby
Kirotan_ has joined #ruby
<amh345> text_to_write = Array.new someresult.each do |val| text_to_write << val.something end
ndboost has joined #ruby
<amh345> that's basically how it's contstructed.
<amh345> only i have a few text_to_write << "\t"
twoism_ has joined #ruby
girija_ has quit [Read error: Connection reset by peer]
rubarlio_ has quit [Ping timeout: 264 seconds]
<EvanPurkhiser> Can anyone tell me if this is dumb or if there's a better way to do this: https://gist.github.com/5272209 ? Im very new to ruby
banjara has joined #ruby
<amh345> actuallyi stand corrected. it does put the values in the cols rows. it just doesnt pay attention to "\t" and
<amh345> "\n"
rezzack has joined #ruby
mrsolo has joined #ruby
djwonk has joined #ruby
apod has quit []
icole has joined #ruby
GrizBear has quit [Ping timeout: 260 seconds]
emmanuelux has joined #ruby
<waxjar> amh345: what happens when you print the object with #inspect? if you get double \s, they're escaped somehow somewhere
mahmoudimus has joined #ruby
<lewix> amh345: what method do you use to write the text_to_write
jonathanwallace has quit [Ping timeout: 240 seconds]
<amh345> waxjar: inspect on the "/t" field outputs "\"\\t\""
frem has quit [Ping timeout: 255 seconds]
rubarlio_ has joined #ruby
Ripp__ has quit [Quit: Leaving]
<amh345> first col value is also ["xyz, "\"\\t\"", "val","val1"]
doodlehaus has joined #ruby
<amh345> that's what it looks like in an editor.
dmiller1 has joined #ruby
<amh345> if i open the csv in office or something it looks like [xyz, \t, val,val1]
<apeiros_> EvanPurkhiser: I would probably not subclass Array, I'd explicitly write out .add_error and .add_info and not use a construct like type.to_s.singularize.to_sym
<amh345> brackets should not be there.
daed has joined #ruby
atno has quit [Remote host closed the connection]
<EvanPurkhiser> apeiros_: Thanks, I suppose I was just trying to be clever ;)
<apeiros_> EvanPurkhiser: I'd probably write add_error etc. as `def add_error(message); add(:error, message); end`
ndboost has quit [Remote host closed the connection]
<apeiros_> i.e., have a generic #add which takes type & message
slainer__ has quit [Remote host closed the connection]
rubarlio_ has quit [Ping timeout: 264 seconds]
<waxjar> i don't know amh345, that looks weird as hell. they're obviously being escaped somewhere but i can't tell you how and where without the relevant code
beiter has quit [Ping timeout: 256 seconds]
atno has joined #ruby
Elhu has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<amh345> waxjar: for sure. im trying to scale the code way back to see if i can recreate the error. then ill post it to a gist.
newUser1234 has quit [Remote host closed the connection]
newUser1234 has joined #ruby
browndawg has quit [Quit: Leaving.]
arturaz has joined #ruby
browndawg has joined #ruby
dallasm_ has joined #ruby
ndboost has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
motto has joined #ruby
danman has joined #ruby
skattyadz has joined #ruby
newUser1234 has quit [Ping timeout: 240 seconds]
excalq has joined #ruby
rubarLion has joined #ruby
joofsh has joined #ruby
m8 has quit [Ping timeout: 264 seconds]
rubarLion has quit [Remote host closed the connection]
verysoftoiletppr has quit []
thebastl has quit [Remote host closed the connection]
Asher has quit [Read error: Connection reset by peer]
Tuxist has joined #ruby
Tuxist has quit [Read error: Connection reset by peer]
c0rn has joined #ruby
<excalq> If I'm using File.read to read the next 100 bytes in a massive file, I hit a problem when that byte is in the middle of a UTF-8 character. Anyway to ensure that the read stops on a UTF-8 char boundary?
tspike has joined #ruby
Ontolog has joined #ruby
Ontolog has quit [Remote host closed the connection]
Ontolog has joined #ruby
choobie has quit [Ping timeout: 264 seconds]
browndawg has left #ruby [#ruby]
Mattix has joined #ruby
browndawg has joined #ruby
huismon is now known as nate_h
ericmathison has joined #ruby
breakingthings has quit []
kaerast has joined #ruby
marcdel has joined #ruby
chichou has quit [Remote host closed the connection]
<amh345> waxjar: ok, i scaled it back and managed to still replicate the issue. here is the code > https://gist.github.com/anonymous/1645896123a2168be907
zigomir has joined #ruby
m8 has joined #ruby
miroatme has joined #ruby
fcatojo has joined #ruby
<MrZYX> amh345: drop line 13 and call file.write filecontents_arr.join("\n")
Mon_Ouie has quit [Ping timeout: 260 seconds]
motto has quit [Ping timeout: 260 seconds]
<havenwood> excalq: Since a utf-8 char varies in size from 1 up to 6 bytes, hard to say! Can you read the next X chars instead of bytes?
ryanf has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<excalq> @havenwood: That's what I'm wondering. That's exactly what I need
pskosinski has quit [Ping timeout: 258 seconds]
<excalq> I think File.read and IO.read just do "bytes"
<rippa> excalq: try gets
<amh345> MrZYX: i get an error undefined method `write' for <Rake::FileTask => []>:Rake::FileTask (NoMethodError) because file hasnt been defined.
CamonZ has joined #ruby
<rippa> gets(nil, 100)
<excalq> @rippa, thanks, I'll try that
wallcloc_ has quit [Remote host closed the connection]
eldariof has joined #ruby
adambeynon has joined #ruby
sayan has quit [Ping timeout: 258 seconds]
mpfundstein has joined #ruby
<MrZYX> amh345: then file is not a file object
ndboost has quit [Remote host closed the connection]
hmarr has joined #ruby
pioz_ has joined #ruby
<amh345> maybe you meant line 15?
<amh345> err 16
atno has quit [Remote host closed the connection]
<amh345> oh.
<amh345> hah
<MrZYX> sure
choobie has joined #ruby
choobie has joined #ruby
choobie has quit [Changing host]
<amh345> ok, MrZYX i see what you meant.
<amh345> ok. i've done that. but the previous issues still appear.
<MrZYX> you even still get the brackets?
elemongw has joined #ruby
mpfundstein_ has joined #ruby
<waxjar> does People.csv_export(id) get you a regular Array?
pioz_ has quit [Client Quit]
djwonk has quit []
<waxjar> because you're writing an Array to the file now. File#write will call #to_s on filecontents_arr, which will give you the brackets and all that
<amh345> MrZYX: i did not. actually. it's a totally different layout now. everything appears in col a. and everything is in it's own line.
<amh345> line = row
<MrZYX> right
a_ has joined #ruby
<a_> hi
pioz_ has joined #ruby
chandankumar has quit [Quit: Leaving]
pskosinski has joined #ruby
<amh345> whats suppose to happen is each result in the array/hash should be in it's own row.
nano- has joined #ruby
<amh345> waxjar: i will try what you mentioned.
<nano-> When writing C modules, is it possible to register a method with rb_define_method as deprecated?
<a_> I have this expression len = d.each_byte.first.divmod(16) but sometime I get this error "NoMethodError undefined method `each_byte' for nil" I would like that in case of exception do a print
<waxjar> amh345, why don't you use a CSV library though?
<a_> can I add and rescue sentence there to do that? thank you
<waxjar> seems a lot simpler
<amh345> waxjar: i made this a long long time ago. and i really really dont want to have to rewrite the thing. it was a pain in the ass the first time getting it to format the way they wanted it.
angusiguess has quit [Ping timeout: 246 seconds]
<amh345> the next time i make one- i will use a lib.
<nano-> or the conversion is just to emit a rb_warning ?
tvw has joined #ruby
atno has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
<amh345> MrZYX: so your suggestion was close. but how to i keep each result iteration of the .each on it's own own row?
<waxjar> amh345, try changing filecontents_arr to filecontents_arr.join, to turn it into a string.
pioz_ has quit [Client Quit]
k610 has joined #ruby
<waxjar> keeping line 13
<MrZYX> try something like http://paste.mrzyx.de/show.php?id=1393
chrishough has quit [Quit: chrishough]
joofsh has quit [Remote host closed the connection]
chrishough has joined #ruby
djwonk has joined #ruby
ndboost_ has joined #ruby
apok has joined #ruby
<waxjar> you want to write a string to the file, not an array
dallasm_ has quit [Remote host closed the connection]
<amh345> MrZYX: that worked. but i'd have to rewrite everything for that to function.
<amh345> waxjar: trying your suggestion
<amh345> btw, thanks for helping out guys. i really appreciate it.
<amh345> waxjar: ok, that gave a positive result. but it omitted spacer = "\t"
<amh345> aside from the missing space/tab. it formatted perfectly.
sambao21 has joined #ruby
apod has joined #ruby
nano- has left #ruby [#ruby]
jblack has quit [Read error: Connection reset by peer]
jim_r0x has joined #ruby
joofsh has joined #ruby
dmiller1 has quit [Ping timeout: 264 seconds]
benlieb has quit [Quit: benlieb]
lewix has quit [Remote host closed the connection]
browndawg has left #ruby [#ruby]
akemrir has quit [Quit: WeeChat 0.4.0]
joofsh has quit [Read error: Connection reset by peer]
brandon has joined #ruby
browndawg has joined #ruby
joofsh has joined #ruby
ndboost_ has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
Jonito has joined #ruby
<Jonito> whois diegok
<Jonito> help?
<Jonito> ?
<Jonito> #whois
brianpWins has joined #ruby
gabito has joined #ruby
nfisher_ has joined #ruby
<havenwood> Jonito: Diego Kuperman
ndboost_ has joined #ruby
lewix has joined #ruby
<lewix> 10:55 waxjar: because you're writing an Array to the file now. File#write will call #to_s on filecontents_arr, which will give you the brackets and all that. that's why i asked you that before amh345
JohnBat26 has joined #ruby
malkomalko has quit [Remote host closed the connection]
gabito has quit [Client Quit]
danman has quit [Quit: danman]
sambio has quit []
shock_one has joined #ruby
<lewix> 10:16 lewix: amh345: do you use puts, p,pp ,print or write
<amh345> lewix: the brackets are no longer an issue. it's formatting correctly and "/n" is rendering fine. it's the "/t" that's being omitted now.
<amh345> im using write
ndboost_ has quit [Remote host closed the connection]
slash_nick has quit [Quit: Lost terminal]
apod has quit []
davetherat has quit [Remote host closed the connection]
ndboost has joined #ruby
davetherat has joined #ruby
davetherat has quit [Remote host closed the connection]
nari has quit [Ping timeout: 240 seconds]
davetherat has joined #ruby
ndboost has quit [Remote host closed the connection]
tspike has quit [Ping timeout: 245 seconds]
gabito has joined #ruby
ndboost has joined #ruby
JohnBat26 has quit [Client Quit]
<jokke> is there a one liner for this? return @val if @val; @val = Val.new; @val
bigoldrock has joined #ruby
lessless has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<jokke> i tried @val |= Val.new but this just returns true (because it returns the evaluation of @val = Val.new)
<MrZYX> jokke: @val || Val.new
<jokke> oh
<jokke> lol
<jokke> thanks
browndawg has quit [Quit: Leaving.]
<MrZYX> if you need to assign it, it's ||= not |=
<jokke> oh you're right!
<jokke> thanks agian
thinkdevcode has quit [Remote host closed the connection]
Es0teric has joined #ruby
sheerun has quit [Read error: Connection reset by peer]
logix812 has joined #ruby
carraroj has joined #ruby
reset has joined #ruby
<jokke> do i call a static method with self.method from within a static method?
uris has quit [Ping timeout: 258 seconds]
<banister`sleep> jokke: you can just call it with method()
<banister`sleep> same as any other method
<jokke> ah ok
sheerun has joined #ruby
tommyvyo has joined #ruby
ndboost has quit [Remote host closed the connection]
sethetter has joined #ruby
Axsuul has joined #ruby
Ontolog_ has joined #ruby
pioz_ has joined #ruby
sambio has joined #ruby
pioz_ is now known as pioz
jimeh has joined #ruby
bean has joined #ruby
huttan has quit [Read error: Connection reset by peer]
Jonito has left #ruby [#ruby]
Spooner has joined #ruby
Ontolog has quit [Ping timeout: 252 seconds]
breakingthings has joined #ruby
ryanf has quit [Quit: leaving]
angusiguess has joined #ruby
brandon has quit [Remote host closed the connection]
chrishough has quit [Quit: chrishough]
xbob has quit [Quit: Leaving]
newUser1234 has joined #ruby
ryanf has joined #ruby
gabito has quit [Remote host closed the connection]
d2dchat has joined #ruby
rudisimo has quit [Quit: Leaving.]
razibog has quit [Ping timeout: 260 seconds]
pioz has quit [Quit: This computer has gone to sleep]
newUser1234 has quit [Ping timeout: 264 seconds]
uris has joined #ruby
fir_ed has quit [Read error: Connection reset by peer]
sheerun has quit []
ndboost has joined #ruby
razibog has joined #ruby
v0n has quit [Quit: WeeChat 0.4.0]
ndboost has quit [Read error: Connection reset by peer]
ndboost has joined #ruby
statarb3 has joined #ruby
v0n has joined #ruby
danman has joined #ruby
<shock_one> By the way, why can't I call private methods with explicit self?
sambao21 has quit [Quit: Computer has gone to sleep.]
queequeg2 has quit [Quit: Changing server]
<tubbo> shock_one: because self is a reference to the external object, not the internal one
<tubbo> iirc
remi has quit [Quit: leaving]
tspike has joined #ruby
danneu has joined #ruby
yashshah has joined #ruby
<shock_one> tubbo, I don't understand this. I can easily do this->private() in, say, C++.
<Spooner> You never need to use self unless you are using a setter, so don't. This isn't Python!
<shock_one> Spooner, I just want to know the reason behind this logic.
atno has quit [Remote host closed the connection]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sambao21 has joined #ruby
ndboost_ has joined #ruby
yashshah__ has quit [Ping timeout: 260 seconds]
<tubbo> shock_one: well, you really have to question *why* you need to reference a private method with `self.`, considering that the private method is always gonna be in the right scope for you to be able to drop the self.
<tubbo> so if i'm in class Account and i have private;def some_method;end, i can just call some_method to call the method, i don't need self.some_method
<burgestrand> shock_one: it’s not just about the self, you can’t call private methods with an explicit receiver at all (unless you use send).
<shock_one> burgestrand, why?
<tubbo> shock_one: C++ actually has private methods, iirc. ruby does not.
<burgestrand> shock_one: it’s essentially the definition of private.
<Spooner> shock_one: self is just an object reference, no different to any other, so it doesn't expose private methods. You can access protected methods this way, since any object of the same class can access those.
<tubbo> ruby basically has a guideline and tries to make it a pain in the balls to call private methods
<shock_one> Spooner, got it.
kristofers has joined #ruby
ndboost has quit [Ping timeout: 264 seconds]
geggam_wk has quit [Remote host closed the connection]
tspike has quit [Ping timeout: 260 seconds]
<tubbo> but, since methods are just messages sent to the object, you can't really make a distinction between the two without violating one of the core constraints of ruby, imo
<shock_one> Thank you. Minus one mystery in my life
<burgestrand> shock_one: the one exception is when using setters.
<tubbo> ^^ this is all philosophy btw, it has no technical basis
<tubbo> haha
chrishough has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]
<Spooner> tubbo: ruby does have private, but it isn't exactly the same as C++ (neither is protected).
atno has joined #ruby
newUser1234 has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
newUser1234 has quit [Remote host closed the connection]
ritek has quit [Ping timeout: 260 seconds]
<tubbo> Spooner: lies! ;)
<tubbo> send(:my_private_method)
<banister`sleep> ruby's private kinda sucks
<shock_one> tubbo, you can call private method in c++ from the outside if you really want to.
<banister`sleep> i want real private (read: uninherited) methods
newUser1234 has joined #ruby
<sepp2k> banister`sleep: me too.
ndboost_ has quit [Ping timeout: 245 seconds]
<banister`sleep> as a result we see people doing silly things like this __my_super_private_method__
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<waxjar> Ruby's definition of private is a method that can't be called with an explicit receiver (including self)
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
davesahil has joined #ruby
queequeg1 has joined #ruby
webwarlock has joined #ruby
fcatojo has quit [Ping timeout: 245 seconds]
<davesahil> hi
<amh345> this is madness. i cant get the bloody "\t
<shock_one> banister`sleep, I would also don't mind final and abstract classes.
<amh345> " to create a tab
<davesahil> are rvm ruby related issues addressed here?
motto has joined #ruby
<banister`sleep> shock_one: "i also wouldn't mind final and abstract classes" :)
<amh345> i've even just tried 8 spaces
m8 has quit [Ping timeout: 245 seconds]
<shock_one> banister`sleep, thank you. ☺
ibash has joined #ruby
EvanPurkhiser has quit [Quit: Page closed]
jim_r0x has quit [Remote host closed the connection]
ibash has quit [Client Quit]
<Spooner> davesahil: Sometimes, but I think there is an #rvm
<shock_one> And the worst part of Ruby for me is that functions, defined inside another function, aren't private, but are accessible from the outside.
jbueza has quit [Quit: Leaving.]
<Hanmac> shock_one with that methods can overwrite itself :P
<banister`sleep> shock_one: because ruby doesn't have functions ;) use 'lambda' if what's what you want :)
<banister`sleep> yeah it's a cool trick
<davesahil> yea, but i am not able to join the channel
klaas has quit [Quit: ZNC - http://znc.sourceforge.net]
shadoi has joined #ruby
<davesahil> don't remember my registered name on freenode
<shock_one> amh345, are you going to show your code?
<amh345> shock_one: i posted it above. a couple of people were helping out. they got me a lot further, but still have this tab issue
k610 has quit [Ping timeout: 240 seconds]
<davesahil> Spooner, when I do a bundle install, I get /usr/bin/env: ruby: No such file or directory
zyrex has quit [Quit: Leaving]
c0rn has quit [Quit: Computer has gone to sleep.]
<davesahil> Spooner, I installed ruby 2.0.0 through rvm
sambao21 has quit [Quit: Computer has gone to sleep.]
<Spooner> I can't help. I use rbenv and that was fine with 2.0.0
<havenwood> davesahil: Are you using the latest RVM?: rvm get latest
<havenwood> I use chruby. :P
jerius has quit [Quit: Computer has gone to sleep.]
<davesahil> havenwood, I have rvm 1.19.0
maycon has quit [Quit: Saindo]
newUser1234 has quit [Ping timeout: 245 seconds]
<shock_one> amh345, what if you try filecontents_arr << "val\t#{p.id}\n"
<havenwood> Though I did see a tweet that RVM was considering a flag option to install Ruby with RVM but chruby for selecting.
newUser1234 has joined #ruby
<davesahil> havenwood, Yes I installed ruby with rvm
tspike has joined #ruby
pitzips has joined #ruby
<havenwood> davesahil: What do you get for?: rvm current
<havenwood> Spooner: Why you no use chruby?! :P
swingha has joined #ruby
quietone has joined #ruby
<havenwood> Shims... grumble, grumble.
doodlehaus has quit [Remote host closed the connection]
<Spooner> havenwood: Because I had trouble with rvm and rvenv works fine. Why do I need chruby?
<davesahil> havenwood, It returns ruby-2.0.0-p0
<havenwood> Spooner: Ahh. Was just curious if you are pro-shim (versus pro-env) or if rbenv just worked so no need to switch.
<amh345> shock_one: that didnt write the tab either. the other thing is im trying to change the way it appends these values because this is part of a much much larger compplicated file.
adamjleonard has quit [Quit: Leaving...]
<havenwood> davesahil: gem -v
<davesahil> havenwood, 2.0.3
<havenwood> davesahil: welp, latest on all accounts
<Spooner> havenwood: Couldn't care less if it works for me ;)
<havenwood> Spooner: Yeah, seems people mostly switch if they run into shim problems.
<havenwood> No problem, no problem.
Nisstyre-laptop has joined #ruby
<banister`sleep> chruby went better with my new hairstyle
sambao21 has joined #ruby
<Spooner> Fair enough.
<havenwood> banister`sleep: Yeah, then I got a sunburn between my corn rows!
dmiller1 has joined #ruby
<shock_one> amh345, I allowed myself to change your code a little. https://gist.github.com/shockone/2084eeac1802591e1bc5
<shock_one> amh345, I would check if you can just print tab correctly. Like puts "\t"
divout has quit [Quit: Leaving.]
ritek has joined #ruby
<havenwood> davesahil: Might try #rvm.
<quietone> HI, I get "in `binread': undefined method" using chef. I don't know ruby and my searches haven't helped. Is there a simple fix? debian wheezy
<havenwood> banister`sleep: I actually like having corn rows, very effective hair management. I just afraid I look silly.
<amh345> thanks shock_one. ill keep your example handy. and if all else fails and i have to write this 900 lines. ill use what you wrote. or just use a csv lib.
<Spooner> amh345: The csv standard lib works fine with tabs.
<shock_one> amh345, keep in mind, I didn't test it.
<amh345> puts "/t" is throwing errors.
<amh345> unless you meant test it in console.
<shock_one> amh345, File.open with block is very useful — you don't have to close the file explicitly.
alex__c2022 has quit [Quit: alex__c2022]
<Spooner> amh345: It is "\t"
<amh345> Spooner: yeah. it does. i just had such a hard time writing this csv file in the first place. the format and structure of the data is a horrible mess. so rewriting it is a daunting task and will take me a couple of days. this is why im so deperate to figure out why i cant get it to work. i had this functioning fine in ruby 1.8
doodlehaus has joined #ruby
dmiller1 has quit [Ping timeout: 246 seconds]
sepp2k has quit [Quit: Leaving.]
<amh345> soory, i meant that. filecontents_arr << puts ("\t") >> expecting keyword_do or '{' or '(' (SyntaxError) ..
doodlehaus has quit [Remote host closed the connection]
nothingism28 has quit [Ping timeout: 245 seconds]
slainer68 has joined #ruby
<Spooner> Don't leave a space from method to (
Asher has joined #ruby
davesahil has left #ruby ["Leaving"]
ebobby has joined #ruby
<amh345> oh. heh. ok. well in console it spit out a bunch of blank lines. but in the csv itself it's removed all colums. rows are intact though
doodlehaus has joined #ruby
dmiller1 has joined #ruby
alex__c2022 has joined #ruby
adamjleonard has joined #ruby
ndch has joined #ruby
webwarlock has quit [Ping timeout: 245 seconds]
razibog has quit [Ping timeout: 240 seconds]
tewlz has quit [Quit: Lost terminal]
mityaz has joined #ruby
colonolGron has joined #ruby
alex__c2022 has quit [Ping timeout: 240 seconds]
oracon75 has joined #ruby
anirudh24seven has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307122853]]
artm has joined #ruby
klaas has joined #ruby
artm_ has joined #ruby
artm_ has quit [Client Quit]
bubblehead has quit [Remote host closed the connection]
jribar has joined #ruby
shock_one has quit [Ping timeout: 260 seconds]
sheerun has joined #ruby
jribar has quit [Remote host closed the connection]
a_a_g has joined #ruby
<sam113101> is there some kind of ruby lib that would act as a dictionary, telling me if a certain word is a verb or a noun?
nathancahill has quit [Quit: nathancahill]
<amh345> ok. so this worked for creating a tab. spacer = "\t" filecontents_arr << spacer filecontents_arr << " " filecontents_arr << spacer
<jnoob22> With 'logger' I have many different logger.* statements of differing severity. How do I universally set this within my app to say only show WARN and higher, regardless if I have a logger.info 'blah' or logger.debug 'blah' ?
kpshek has quit []
baba has quit [Ping timeout: 246 seconds]
sonda has quit [Remote host closed the connection]
pitzips has quit [Quit: Leaving]
<jnoob22> According to here (http://www.ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html) it says "You can then give the Logger a level, and only messages at that level of higher will be printed." ... but it doesn't give an example. Any ideas?
zigomir has quit [Quit: zigomir]
<jnoob22> <facepalm> crud i see it. the yellow highlighting of find-> "level" blocked it out :-\
toekutr has joined #ruby
artm has quit [Remote host closed the connection]
<waxjar> pro tip: log with blocks (e.g. error { "your message" }), it'll speed up your app in production because the Strings for debug (and maybe info) messages won't have to be instantiated first :D
<apeiros_> if it's a plain string, I doubt that creating a block will be faster
<waxjar> read an article on it once, the author reported pretty big improvements
<apeiros_> with constructed strings maybe
<apeiros_> i.e. strings which required logic
<apeiros_> but a plain string - I doubt that
<apeiros_> but playing anno 2070 ATM, so won't write a benchmark :-p
Zai00 has quit [Ping timeout: 260 seconds]
etcetera has joined #ruby
<sam113101> is there some kind of ruby lib that would act as a dictionary, telling me if a certain word is a verb or a noun?
doodlehaus has quit [Remote host closed the connection]
reactormonk has quit [Ping timeout: 264 seconds]
geekbri has joined #ruby
oracon75 has quit [Quit: oracon75]
<A124> sam113101: I don't think so.. but I can make one. But you should be sure if it's the right thing to do
<A124> Yeah creating a block creates bout 0.15% which .. nvm. that std
arietis has joined #ruby
<sam113101> I'm trying to build some AI and I need that
geekbri has quit [Remote host closed the connection]
<A124> sam113101: If you stop by in few days. or.. write me PM (as I don't sit actively on channels all time), I could manage that.
<A124> Also some words could be both.. what then?
catalyst40 has joined #ruby
sepp2k has joined #ruby
<A124> Also noun and verb, etc word type is lexical analysis, so you might find something under that term
hadees has quit [Quit: hadees]
<sam113101> actually, for now, I just need to know if a word is a noun or verb, doesn't matter which one (for now)
peta_ has joined #ruby
baba has joined #ruby
heliumsocket has joined #ruby
timonv has quit [Remote host closed the connection]
<A124> sam113101: Then maybe.. give a bogus random value for now?
jmeeuwen has quit [Ping timeout: 264 seconds]
yacks has quit [Quit: Leaving]
nomenkun has joined #ruby
thebastl has joined #ruby
sambio has quit []
<apeiros_> waxjar: if you'd actually read what he writes, then you'd see that he says exactly the same as I do
<waxjar> true
russfran1 is now known as russfrank
ananthakumaran has quit [Quit: Leaving.]
doodlehaus has joined #ruby
jmeeuwen has joined #ruby
stevechiagozie has quit [Quit: Computer has gone to sleep.]
rads has joined #ruby
faen has quit [Remote host closed the connection]
swex has joined #ruby
ndch has quit [Remote host closed the connection]
Morkel has quit [Ping timeout: 257 seconds]
mattbl has joined #ruby
Morkel has joined #ruby
Xeago has quit [Remote host closed the connection]
mrsolo has quit [Quit: This computer has gone to sleep]
burgestrand has quit [Quit: Leaving.]
swex_ has quit [Ping timeout: 264 seconds]
kpshek has joined #ruby
mrsolo has joined #ruby
brianpWins has quit [Quit: brianpWins]
tjbiddle has joined #ruby
ebobby has left #ruby [#ruby]
zigomir has joined #ruby
lkba has joined #ruby
<tjbiddle> hey guys - would this be considered bad practice on a CLI app? it's placed in the very top level class that calls anything else: http://pastie.org/7165765
jblack has joined #ruby
<jblack> Hi. How do I figure out what gem I have to require in order to use another gem that requires 'AC# 110-001-4677645
<jblack> Hi. How do I figure out what gem I have to require in order to use another gem that requires 'require_library_or_gem '
<jblack> my hunch is that it's rails'ish
c0rn has joined #ruby
etcetera has quit [Read error: Connection reset by peer]
huttan has joined #ruby
dmiller1 has quit [Ping timeout: 264 seconds]
Hanmac1 has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
<tjbiddle> jblack: Can you rephrase that?
Hanmac has quit [Ping timeout: 258 seconds]
<tjbiddle> Don't quite understand your question
krawchyk has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
Hanmac has joined #ruby
<Spooner> tjbiddle: use logger or log4r rather than doing that.
jpfuentes2 has joined #ruby
<bakingbread> tjbiddle: I think you meant `raise e` there
<tjbiddle> Spooner: Noted. Was more pointing out the pokemon exception though
quietone has left #ruby ["Leaving"]
jpfuentes2 has quit [Client Quit]
<tjbiddle> bakingbread: raise should re-raise it afaik
<tjbiddle> Without the e
<tjbiddle> Will test though, sec.
<bakingbread> tjbiddle: maybe didn't know it
Hanmac1 has quit [Ping timeout: 260 seconds]
<jblack> Well, I'm trying to use ODBC with active record without rails. When activerecord implicitely includes the odbc gem, that gem complains "/var/lib/gems/1.9.1/gems/activerecord-odbc-adapter-2.0/lib/active_record/connection_adapters/odbc_adapter.rb:30:in `<top (required)>': undefined method `require_library_or_gem' for main:Object (NoMethodError)
<bakingbread> tjbiddle: and why do you need both .downcase and ~= /true/ but that's just small things, of course
etcetera has joined #ruby
<Spooner> bakingbread: It would only be redundant if it was /true/i
Yakko has joined #ruby
<Spooner> Still, can't see a reason not to just do .downcase == "true"
buibex has joined #ruby
sambao21 has joined #ruby
<tjbiddle> bakingbread: doesn't /somestring/ match it exactly? My regex-foo is terrible.
<bakingbread> Spooner: that what I meant. either ..to_s.downcase == 'true' or ...to_s ~= /true/i
<tjbiddle> Spooner: Lmao, good point.
<Spooner> tjbiddle: /dfd/ is case-dependent, but also only matches anywhere in the string (so "pietruelephant" would matcfh too).
Mon_Ouie has quit [Quit: WeeChat 0.4.0]
Hanmac1 has joined #ruby
<Spooner> ~= /\Atrue\Z/i would be the equivalent (of downcase == "true")
<bakingbread> Spooner: yes I got it
jblack has quit [Ping timeout: 260 seconds]
ibash has joined #ruby
sethetter has quit [Quit: leaving]
d2dchat has quit [Remote host closed the connection]
<Spooner> bakingbread: Sorry, I'm bored at the moment, so I thought I;d labour the point ;)
stevechiagozie has joined #ruby
jblack has joined #ruby
<jblack> sorry. apparently I lost my connection.
Hanmac has quit [Ping timeout: 252 seconds]
rippa has quit [Ping timeout: 240 seconds]
<bakingbread> Spooner: no it's ok :-D
<bakingbread> Spooner: also wee have .casecmp
<shevy> what is .casecmp?
alainus has joined #ruby
<bakingbread> it compares strings regardless of the case and returns 0 if equal
Gowie has joined #ruby
<Spooner> bakingbread: Didn't know that one.
<alainus> is there something like "with line_item.buyable as |item| do .. end" so i can later just do item.attribute ? or better just "attribute" ?
rippa has joined #ruby
sambao21 has quit [Quit: Quitter]
<bakingbread> >> "tRuE".casecmp("true") == 0
<eval-in> bakingbread => true (http://eval.in/13886)
<bakingbread> >> "tRuE\n".casecmp("true") == 0
<eval-in> bakingbread => false (http://eval.in/13887)
daed has quit [Ping timeout: 255 seconds]
<Spooner> And -1 on fail. How horribly unrubyish ;(
constant has joined #ruby
<bakingbread> Spooner: perlish
<constant> is there any way to teach "bundle" to use "su" and *not* "sudo" ?
daed has joined #ruby
etcetera has quit []
dangerousdave has quit [Read error: Connection reset by peer]
<Gowie> Any suggestions for books on ruby for an intermediate ruby programmer?
<bakingbread> Spooner: it also returns 1. and it's fast
<Spooner> bakingbread: If you prefer fast over nice, you are in the wrong place with Ruby ;)
jamie_ca_ has quit []
freerobby has quit [Quit: Leaving.]
jamie_ca_ has joined #ruby
sethetter has joined #ruby
<bakingbread> Spooner: wrong I can inject String with method which uses casecmp and I'll have both nice and fast :)
<apeiros_> Spooner: cmp returns -1 when lhs is smaller
<Spooner> WEll, yeah, you could wrap it...
<apeiros_> it returns 1 when lhs is bigger
<apeiros_> and nil on fail
<apeiros_> and that's true for <=> too, so nothing "unrubyish" about it
<alainus> how can i do: with class.subclass.method as |item| do ... do stuff with item.attributes ... end ? what's the correct syntax for that ?
<Spooner> Well, that is something that needs 3 results. 0 and -1 isn't really the same.situation.
<Spooner> 0 and nil would make a lot more snese.
<apeiros_> wth are you talking about?
<shevy> about swiss chocolate!
<apeiros_> a cmp has 4 possible results. if you want 2, it's not a cmp.
<Spooner> OH, no, ignore me. Yeah, it is the same thing.
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ruby
<apeiros_> alainus: huh?
freerobby has joined #ruby
<Spooner> alainus: Yeah, tell us what you want to achieve, not give us the code that doesn't work.
<apeiros_> alainus: it's `do |item| … end`
backjlack has quit [Ping timeout: 255 seconds]
dmiller1 has joined #ruby
<apeiros_> your `|item| do … end` is invalid syntax
doodlehaus has quit [Remote host closed the connection]
<apeiros_> also no idea what exactly your problem is. syntax? getting a class' subclass? understanding what Object#method does? how to use blocks?
kpshek has quit []
niklasb_ has joined #ruby
<alainus> apeiros_, Spooner I know it's invalid. I'm looking for a way to do that, and I'm trying to explain what I want to achieve using what I wrote. Basically I want to name an object as "item" and then use it for a block
<alainus> *on a block, sorry
dhruvasagar has joined #ruby
<bakingbread> alainus: oh you mean like in Python?
silky__ has quit [Quit: Leaving]
<jblack> I may have missed the answer. I'm trying to use activerecord with odbc, but the odbc gem is complaining " undefined method `require_library_or_gem'". It looks like that method is in active_support, but including it didn't fix the problem. I don't know what to try next
malcolmva has joined #ruby
<alainus> bakingbread, I wouldn't know, but I have a long object, and I was wondering if I could shorten it for simplicity's sake
<jblack> I'm trying to use activerecord outside of rails.
<apeiros_> alainus: like: `item = 5; (1..5).each do |x| puts x*item end`?
niklasb has quit [Ping timeout: 264 seconds]
<apeiros_> I'm at a loss at what you're trying to do…
<apeiros_> or instance_eval maybe?
niklasb_ is now known as niklasb
<Spooner> Ah, yes, that makes more sense seen as python.
Quebert has quit [Quit: Linkinus - http://linkinus.com]
<bakingbread> alainus: well... you can write your own with
<Spooner> alainus: Usuallly we'd do: object.method do |x| ... end
<alainus> Spooner, that's what I'm looking for, thanks =)
<Spooner> alainus: The method would yield something to be x (similar to Python yield in an enumerator).
<bakingbread> >> def my_with(x) { |x| yield(x) }; end; very_long_name = [42]; my_with(very_long_name) { |shrt| p shrt.first }
<eval-in> bakingbread => /tmp/execpad-39d8a083689f/source-39d8a083689f:2: syntax error, unexpected '|', expecting '}' ... (http://eval.in/13888)
<bakingbread> oops
<apeiros_> alainus: errr, yes, that's what I wrote as the very first… but well…
<bakingbread> >> def my_with(x); yield(x); end; very_long_name = [42]; my_with(very_long_name) { |shrt| p shrt.first }
<eval-in> bakingbread => 42 ... (http://eval.in/13889)
<bakingbread> that would be exactly like Python. but usually one doesn't need it
<apeiros_> bakingbread: I fail to see the point. just do x = very_long_name, and enjoy the show… though I think very_long_name would be better (hey, we've autocompleting editors nowadays, it's not hard, really…)
rippa has quit [Ping timeout: 240 seconds]
Yakko is now known as |ko
wargasm has left #ruby [#ruby]
forced_request has joined #ruby
<bakingbread> apeiros_: the point is...
peta_ has quit [Quit: peta_]
<bakingbread> >> original = {val: 42}; x = original; x[:val] -1; p original[:val]
<eval-in> bakingbread => 42 ... (http://eval.in/13890)
<Spooner> apeiros_: The Python idiom, with sss() as y: is not really tap. It is really just sss {|y| }
|ko is now known as yakko
peta_ has joined #ruby
yakko is now known as |co
|co is now known as |ko
<bakingbread> apeiros_: I just thought you ask for that. because what you wrote is very similar to Python idiom as Spooner mentioned :)
nouitfvf has joined #ruby
chetan- has joined #ruby
etcetera has joined #ruby
bzprod has joined #ruby
<chetan-> I'm trying to parallelize my unit tests (minitest) and running into problems with mocha. anyone know if theres a threadsafe mock library?
|ko is now known as Yakko
crimezone20xx has joined #ruby
randomautomator has quit [Ping timeout: 258 seconds]
brianherman has joined #ruby
kpshek has joined #ruby
rburton- has joined #ruby
motto has quit [Quit: Sto andando via]
m8 has joined #ruby
Spooner has quit [Ping timeout: 245 seconds]
icole has quit [Remote host closed the connection]
justinmcp has quit [Quit: No Ping reply in 180 seconds.]
justinmcp has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
internet_user has quit [Remote host closed the connection]
jerius has joined #ruby
Voodoofish430 has quit [Quit: Leaving.]
gynna has joined #ruby
gynna has quit [K-Lined]
gynna has joined #ruby
gynna has quit [Killed (idoru (Spam is off topic on freenode.))]
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
icole has joined #ruby
pkrnj has joined #ruby
marcdel has quit [Read error: Connection reset by peer]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jmeeuwen has joined #ruby
Banistergalaxy has quit [Ping timeout: 264 seconds]
awarner has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 260 seconds]
Banistergalaxy has joined #ruby
ibash has quit [Quit: ibash]
angusiguess has quit [Ping timeout: 240 seconds]
jpfuentes2 has joined #ruby
marcdel has joined #ruby
jnoob22 has quit [Remote host closed the connection]
<shevy> stupid random ads
AndChat| has joined #ruby
bw_ has quit [Remote host closed the connection]
doodlehaus has joined #ruby
jmeeuwen has quit [Ping timeout: 252 seconds]
eldariof has quit []
joofsh has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
icole has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 245 seconds]
icole has joined #ruby
jmeeuwen has joined #ruby
icole has quit [Read error: Connection reset by peer]
lewix has quit [Remote host closed the connection]
icole_ has joined #ruby
peta_ has quit [Quit: peta_]
dmiller1 has quit [Ping timeout: 260 seconds]
sheerun has quit [Read error: Connection reset by peer]
swingha has quit [Quit: WeeChat 0.4.0]
buibex has quit [Remote host closed the connection]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
bzprod_ has joined #ruby
Kruppe has joined #ruby
postmodern has joined #ruby
buibex has joined #ruby
bradleyprice has quit [Remote host closed the connection]
tomsthumb has quit [Quit: Leaving.]
bzprod has quit [Ping timeout: 264 seconds]
sheerun has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
dhruvasagar has joined #ruby
casheew has quit [Read error: Connection reset by peer]
flexd has quit [Ping timeout: 245 seconds]
Skofo has joined #ruby
invisime has quit [Quit: Leaving.]
yashshah has quit [Ping timeout: 245 seconds]
casheew has joined #ruby
hashmal has quit [Quit: Computer has gone to sleep.]
generalissimo has joined #ruby
doodlehaus has quit [Remote host closed the connection]
mm0 has joined #ruby
jerius has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mm0 has left #ruby [#ruby]
tommyvyo has quit [Quit:]
lewix has joined #ruby
Nahra has quit [Ping timeout: 246 seconds]
casheew has quit [Read error: Connection reset by peer]
RORgasm has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 246 seconds]
pmros has joined #ruby
<pmros> hi
casheew has joined #ruby
<pmros> I'm in trouble with my rakefile and new gem 2.0
<pmros> uninitialized constant Gem::Builder
<pmros> any help?
constant has left #ruby ["Overflow in /dev/null"]
<pmros> google doesn't help me too much
casheew has quit [Read error: Connection reset by peer]
<MrZYX> read the changelog
thebastl has quit [Remote host closed the connection]
digital-ghost has joined #ruby
indigenous has quit [Changing host]
indigenous has joined #ruby
Gowie has quit [Ping timeout: 245 seconds]
faen has joined #ruby
casheew has joined #ruby
Petru has joined #ruby
Petru has quit [Changing host]
Petru has joined #ruby
<pmros> I got it! Thank you, MrZYX!
<digital-ghost> Ruby noob here, looking to dynamically list Mon-Sun, in an html table row, but I need the days to shift by 1 each day to stay in sync with the current day.
<heftig> digital-ghost: #ror
<digital-ghost> Can anyone point me in the right direction? I keep searching on the topic but apparently failing my googlefoo.
<Petru> Hi. Ruby beginner here. If the only thing I have in a file is 'require <some gem name>' and when I run it it complains about 'uninitialized constant bla bla bla', is it my fault or is the gem broken?
<digital-ghost> heftig, even if I'm not using rails?
endzyme has quit [Ping timeout: 264 seconds]
jackjackdrpr has joined #ruby
<heftig> you didn't specify what you're using
<heftig> specifically, what's used for the output (the templating engine)
casheew has quit [Read error: Connection reset by peer]
danneu has quit [Ping timeout: 245 seconds]
<digital-ghost> heftig, I'm just trying to learn Ruby at the moment. running a script through sinatra to display it in a browser
TooTubular has quit [Quit: Linkinus - http://linkinus.com]
<heftig> digital-ghost: Time.now.wday will get you the current weekday
<MrZYX> Petru: post the real error and the real require
angusiguess has joined #ruby
strg has joined #ruby
<digital-ghost> Is there a way to perform +/- operations on that object?
<heftig> it's just a number (0 is sunday)
casheew has joined #ruby
<digital-ghost> If I had set the first column to be Time.now.wday, I have 6 other columns that need to shift with it.
d34th4ck3r has joined #ruby
<digital-ghost> hmm
pib1904 has quit [Remote host closed the connection]
sheerun has left #ruby [#ruby]
excalq has quit [Quit: Leaving.]
adamjleonard has quit [Quit: Leaving...]
<digital-ghost> Is there a method that will let me convert the '0' to the string 'Sunday'
adamjleonard has joined #ruby
adamjleonard has quit [Client Quit]
<heftig> 1.upto 20 do |x| puts %w(Sun Mon Tue Wed Thu Fri Sat)[(Time.now.wday + x) % 7] end
<heftig> eh, well, start with 0, not 1
<MrZYX> Petru: that line gets the file in a wrong order for you https://github.com/jamesshipton/simple_youtube/blob/master/lib/simple_youtube.rb#L7 I'd open an issue there, meanwhile you should be able to work around that by doing require 'simple_youtube/activeyoutube' before the require 'simple_youtube'
gchristensen has joined #ruby
etcetera has quit []
shinobi_one has joined #ruby
casheew has quit [Read error: Connection reset by peer]
<Petru> MrZYX, I get 'uninitialized constant SimpleYoutube (NameError)' if I do that
casheew has joined #ruby
<MrZYX> well then just open an issue
<MrZYX> not your fault
<Petru> Ah, okay. Thanks. :)
<waxjar> digital-ghost, have a look at date: http://rubydoc.org/stdlib/date/frames
t-mart has quit [Ping timeout: 272 seconds]
mityaz has quit [Quit: See ya!]
bean has joined #ruby
bean has quit [Client Quit]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
backjlack has joined #ruby
agarie has joined #ruby
shinobi_one has left #ruby [#ruby]
casheew has quit [Read error: Connection reset by peer]
Alc has quit [Quit: Alc]
xibalba has quit [Changing host]
xibalba has joined #ruby
etcetera has joined #ruby
bean has joined #ruby
_bart has joined #ruby
sethetter has quit [Quit: leaving]
mattbl has quit [Quit: This computer has gone to sleep]
<digital-ghost> waxjar, I wish I knew what I was looking for :-P
casheew has joined #ruby
danneu has joined #ruby
ToApolytoXaos has quit [Quit: Leaving]
breakingthings has quit []
casheew has quit [Read error: Connection reset by peer]
speakingcode-wor has quit [Remote host closed the connection]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
casheew has joined #ruby
skattyadz has quit [Quit: skattyadz]
yfeldblum has joined #ruby
mikurubeam has quit [Quit: +1 (Yes). -1 (No). i (What I have been trying to tell you all along).]
_nitti has quit [Remote host closed the connection]
bzprod_ has quit [Read error: Connection reset by peer]
mikurubeam has joined #ruby
Guest91682 has quit [Changing host]
Guest91682 has joined #ruby
Guest91682 has joined #ruby
bzprod has joined #ruby
nfisher_ has quit [Ping timeout: 245 seconds]
Guest91682 is now known as Boohbah
<waxjar> Date.today gets you the current day, you can just do date + x to get a date object for x days later. You can get it's weekday with #wday and turn it into a string with Date::DAYNAMES[the weekday number] :)
lewix has quit [Remote host closed the connection]
<waxjar> happy puzzling :D
hmarr has quit []
casheew has quit [Read error: Connection reset by peer]
dmiller1 has joined #ruby
casheew has joined #ruby
strg has quit [Quit: Linkinus - http://linkinus.com]
solidoodlesuppor has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931]]
Swarley_ has joined #ruby
tomsthumb has joined #ruby
icole_ has quit [Remote host closed the connection]
nonotza_ has joined #ruby
casheew has quit [Read error: Connection reset by peer]
joofsh has joined #ruby
jbueza has joined #ruby
icole has joined #ruby
nonotza_ has quit [Client Quit]
bzprod_ has joined #ruby
pioz has joined #ruby
peteyg_ has quit [Ping timeout: 246 seconds]
bzprod has quit [Ping timeout: 255 seconds]
nonotza_ has joined #ruby
casheew has joined #ruby
mockra has quit [Remote host closed the connection]
bzprod has joined #ruby
etcetera has quit []
casheew has quit [Read error: Connection reset by peer]
bzprod_ has quit [Ping timeout: 245 seconds]
casheew has joined #ruby
skattyadz has joined #ruby
casheew has quit [Read error: Connection reset by peer]
nonotza_ has quit [Quit: nonotza_]
alainus has left #ruby ["Leaving"]
idkazuma has joined #ruby
nezumi has quit [Read error: Operation timed out]
kpshek has quit []
casheew has joined #ruby
jlast has quit [Ping timeout: 258 seconds]
zigomir has quit [Quit: zigomir]
bean has quit [Quit: Computer has gone to sleep.]
bzprod_ has joined #ruby
casheew has quit [Read error: Connection reset by peer]
banjara has quit [Quit: Leaving.]
TeckniX has quit [Quit: TeckniX]
banjara has joined #ruby
bzprod has quit [Ping timeout: 245 seconds]
markalanevans has quit [Ping timeout: 264 seconds]
mattbl has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
casheew has joined #ruby
the-anome has joined #ruby
Skofo has quit [Ping timeout: 240 seconds]
Gowie has joined #ruby
lewix has joined #ruby
thebastl has joined #ruby
casheew has quit [Read error: Connection reset by peer]
breakingthings has joined #ruby
musl has quit [Remote host closed the connection]
flexd has joined #ruby
freerobby has quit [Quit: Leaving.]
musl has joined #ruby
casheew has joined #ruby
Sicp has joined #ruby
jgarvey has quit [Quit: Leaving]
wyhaines has quit [Read error: No route to host]
Layke has quit [Ping timeout: 246 seconds]
neurone-1337 has quit [Ping timeout: 264 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
mpfundstein has quit [Remote host closed the connection]
freerobby has joined #ruby
mlue has joined #ruby
casheew has quit [Read error: Connection reset by peer]
Gowie has quit [Quit: Lost terminal]
casheew has joined #ruby
TorpedoSkyline has joined #ruby
mpfundstein_ has quit [Ping timeout: 264 seconds]
ph^ has joined #ruby
musl has quit [Quit: WeeChat 0.4.0]
etcetera has joined #ruby
osvico has joined #ruby
mockra has joined #ruby
justsee has quit [Ping timeout: 264 seconds]
casheew has quit [Read error: Connection reset by peer]
neurone-1337 has joined #ruby
Skofo has joined #ruby
adkron has quit [Ping timeout: 256 seconds]
codecop has quit [Remote host closed the connection]
etcetera has quit [Client Quit]
casheew has joined #ruby
tvw has quit []
akashj87_ has joined #ruby
emmanuelux has quit [Ping timeout: 258 seconds]
Neomex has joined #ruby
Neomex has quit [Client Quit]
ph^ has quit [Remote host closed the connection]
wyhaines has joined #ruby
mockra_ has joined #ruby
casheew has quit [Read error: Connection reset by peer]
ruckerz has joined #ruby
pib1902 has joined #ruby
pib1902 has quit [Max SendQ exceeded]
pib1981 has joined #ruby
pib1981 has quit [Max SendQ exceeded]
Layke has joined #ruby
casheew has joined #ruby
akashj87 has quit [Ping timeout: 258 seconds]
lewix has quit [Remote host closed the connection]
pib1902 has joined #ruby
mockra has quit [Ping timeout: 260 seconds]
shadoi has quit [Quit: Leaving.]
shadoi has joined #ruby
zavier has quit [Quit: WeeChat 0.3.8]
sambao21 has joined #ruby
casheew has quit [Read error: Connection reset by peer]
zavier has joined #ruby
razibog has joined #ruby
casheew has joined #ruby
Michael__ has joined #ruby
alanp_ has joined #ruby
logix812 has quit [Quit: Computer has gone to sleep.]
chrishough has quit [Quit: chrishough]
buibex has quit [Remote host closed the connection]
Matip has joined #ruby
buibex has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
pmros has quit [Quit: Konversation terminated!]
dmiller1 has quit [Ping timeout: 240 seconds]
alanp has quit [Ping timeout: 264 seconds]
bzprod has joined #ruby
Michael__ has quit [Remote host closed the connection]
musl has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
jdolitsky has joined #ruby
reppard has joined #ruby
Mattix has quit [Ping timeout: 264 seconds]
reppard has quit [Client Quit]
bzprod_ has quit [Ping timeout: 264 seconds]
<Petru> Am I the only one under the impression that a large number of gems are outdated and/or broken?
bzprod_ has joined #ruby
SCommette has quit [Quit: SCommette]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
rads has quit []
buibex has quit [Remote host closed the connection]
bzprod has quit [Ping timeout: 256 seconds]
casheew has quit [Read error: Connection reset by peer]
colonolGron has quit [Quit: Lost terminal]
moos3 has quit [Quit: Computer has gone to sleep.]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
bzprod has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
a_a_g has quit [Quit: Leaving.]
<tomsthumb> Petru: if you don't play the dependency game well, sure, why not...
butblack has joined #ruby
casheew has joined #ruby
<Petru> tomsthumb, (possibly a stupid question) doesn't 'gem' resolve dependencies?
bzprod_ has quit [Ping timeout: 260 seconds]
jbueza has quit [Quit: Leaving.]
anonymuse has quit [Quit: Leaving...]
peteyg_ has joined #ruby
casheew has quit [Read error: Connection reset by peer]
dallasm has joined #ruby
<tomsthumb> Petru: mmmmmeeeeehhhh, it does, according to your dependecy files, but sometimes people play hard and loose with them and you get hosed
freerobby has quit [Quit: Leaving.]
casheew has joined #ruby
chrishough has joined #ruby
awestroke has joined #ruby
rads has joined #ruby
elaptics is now known as elaptics`away
bzprod has quit [Quit: Leaving...]
thebastl has quit [Remote host closed the connection]
bzprod has joined #ruby
bzprod is now known as jp__
jamie_ca_ has quit [Quit: Computer has gone to sleep.]
zeade has quit [Quit: Leaving.]
Raydiation has joined #ruby
peteyg_ has quit [Ping timeout: 252 seconds]
jdolitsky1 has joined #ruby
Morkel has quit [Quit: Morkel]
brian_000_ has joined #ruby
moos3 has joined #ruby
nazty has quit [Read error: Connection reset by peer]
jdolitsky has quit [Ping timeout: 245 seconds]
br4ndon has joined #ruby
skattyadz has quit [Quit: skattyadz]
chrishough has quit [Quit: chrishough]
adamjleonard has joined #ruby
bradleyprice has joined #ruby
Sicp has quit [Quit: Leaving]
brianherman has quit [Ping timeout: 240 seconds]
Inside has joined #ruby
razibog has quit [Ping timeout: 252 seconds]
banister_ has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
SCommette has joined #ruby
rupee has quit [Quit: Leaving]
banister`sleep has quit [Ping timeout: 255 seconds]
nfisher has joined #ruby
mercwithamouth has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
Yu\2 has quit [Quit: Leaving]
SCommette has quit [Client Quit]
dmiller1 has joined #ruby
mpfundstein has joined #ruby
45PAABO5W has joined #ruby
kirun has quit [Ping timeout: 246 seconds]
brian_000_ has quit [Read error: Connection reset by peer]
emergion has joined #ruby
brian_000_ has joined #ruby
emergion has quit [Client Quit]
TorpedoSkyline has quit [Quit: Computer has gone to… zzzzz...]
mrsolo has quit [Quit: Leaving]
lewix has joined #ruby
nfk has quit [Quit: yawn]
Swarley_ has quit [Quit: Leaving]
Swarley_ has joined #ruby
dmiller1 has quit [Ping timeout: 252 seconds]
chrishough has joined #ruby
kaerast has quit [Quit: Leaving]
MrZYX is now known as MrZYX|off
skattyadz has joined #ruby
Amfy has left #ruby [#ruby]
<lewix> i see
cobragoat has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
markenranosa has joined #ruby
<markenranosa> hi guys
<markenranosa> anyone using heroku cedar static stack
danman has quit [Quit: danman]
<markenranosa> am trying to make manifest.appcache work
mockra_ has quit [Remote host closed the connection]
ZachBeta has joined #ruby
<markenranosa> where do i put routes.rb? i only have config.ru
jdolitsky1 has quit [Ping timeout: 245 seconds]
<daed> what's the cedar stack like?
<daed> is it that much diff than standard rails?
mockra has joined #ruby
emocakes has joined #ruby
<markenranosa> its rack?
jekotia_ has joined #ruby
newUser1234 has quit [Remote host closed the connection]
justsee has quit [Ping timeout: 245 seconds]
<markenranosa> lol sorry am a real noob on ruby
mahmoudimus has quit [Client Quit]
butblack has quit [Quit: butblack]
jekotia has quit [Ping timeout: 258 seconds]
jekotia_ is now known as jekotia
m8 has quit [Quit: Sto andando via]