jhass changed the topic of #ruby to: Welcome new users migrating from #ruby-lang! || Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
Kyuujitsu has joined #ruby
<Radar> Try it and see what happens :)
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<irctc318> thanks man
irctc318 has quit [Quit: Page closed]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<Radar> np
bronson has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has quit [Ping timeout: 244 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
zenguy_pc has quit [Read error: No route to host]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
CloCkWeRX has joined #ruby
zenguy_pc has joined #ruby
aryaching has joined #ruby
pauly_oc has quit [Ping timeout: 260 seconds]
gcfhvjbkn has joined #ruby
mistym has quit [Remote host closed the connection]
chills42 has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has joined #ruby
tekacs has quit [Ping timeout: 265 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Takumo has quit [Ping timeout: 265 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has joined #ruby
tekacs has joined #ruby
Takumo has joined #ruby
Takumo has quit [Changing host]
Takumo has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
iceyec has joined #ruby
jgpawletko has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
_whitelogger____ has joined #ruby
user1138 has joined #ruby
michael_mbp has joined #ruby
That1Guy has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
tejasmanohar_ has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
bonhoeffer has joined #ruby
a1ph4g33k has left #ruby [#ruby]
chills42 has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
tejasmanohar_ has quit [Client Quit]
rehat has quit [Remote host closed the connection]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
tubuliferous has quit [Ping timeout: 244 seconds]
juanpablo_ has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
craysiii has quit [Remote host closed the connection]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
natbo has joined #ruby
loc22 has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
mxrguspxrt has quit [Ping timeout: 255 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
juanpablo_ has quit [Ping timeout: 240 seconds]
gcfhvjbkn has joined #ruby
momomomomo has quit [Quit: momomomomo]
gcfhvjbkn has quit [Client Quit]
diegoviola has joined #ruby
mxrguspx_ has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
loc22 has quit [Ping timeout: 246 seconds]
MasterPiece has quit [Quit: Leaving]
Kyuujitsu has quit [Ping timeout: 272 seconds]
Inside has quit [Ping timeout: 240 seconds]
user1138 has quit [Ping timeout: 258 seconds]
Kyuujitsu has joined #ruby
rubynuby has quit [Remote host closed the connection]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
rubynuby has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
phutchins2 has joined #ruby
Mendenhall has quit [Ping timeout: 250 seconds]
ariedler has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
user1138 has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<ariedler> Q: I have a lot of constants that I want to use in a particular file, is there a nice way to not fully namespace them ?
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
RegulationD has joined #ruby
<ariedler> e.g. Foo::Bar::(Baz,Beer,Booze) ; but I don't want to fully qualify them in Foo::Cats
gcfhvjbkn has joined #ruby
fenjamin has joined #ruby
gcfhvjbkn has quit [Client Quit]
sevenseacat has joined #ruby
Westerbly_ has joined #ruby
snockerton has quit [Quit: Leaving.]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
mxrguspx_ has quit [Read error: Connection reset by peer]
Kyuujitsu has quit [Ping timeout: 256 seconds]
mxrguspxrt has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
rubynuby has quit [Ping timeout: 244 seconds]
<GarethAdams> ariedler: depending on how you've declared Foo::Cats, you can call them as Bar::Baz from there
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
mxrguspxrt has quit [Read error: Connection reset by peer]
Kyuujitsu has joined #ruby
<shevy> ohhhh cats
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
oo_ has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<shevy> ariedler you can also include the constants
<ariedler> GarethAdams: by experimentation I just figured that out; thanks.. I also have another question...
radgeRayden has quit [Ping timeout: 244 seconds]
<shevy> respectively the namespace they are in
gcfhvjbkn has joined #ruby
oo_ has quit [Remote host closed the connection]
gcfhvjbkn has quit [Client Quit]
oo_ has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
RegulationD has quit [Ping timeout: 264 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Azure has quit [Ping timeout: 265 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<ariedler> this might be hard to know without context; but I have a series of Types of things, and they have a sequential ordering, is this a good time to use meta programming so programmers don't accidently use the same id?
Lingo has joined #ruby
Kyuujitsu has quit [Ping timeout: 244 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
tmtwd has quit [Ping timeout: 240 seconds]
Kyuujitsu has joined #ruby
<shevy> do you need meta programming there?
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
pdoherty has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<ariedler> shevy: not necessarily, but a Map from ID <-> Type needs to be statically maintained.
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Cache_Money has quit [Quit: Cache_Money]
sevenseacat has quit [Quit: .]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
theery has joined #ruby
<shevy> sounds like a hash?
aryaching has quit [Ping timeout: 260 seconds]
spiceweasel has quit [Read error: Connection reset by peer]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
paulcsmith has quit [Quit: Be back later ...]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
decaff has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
decaff has quit [Client Quit]
Kyuujitsu has quit [Ping timeout: 252 seconds]
theery has quit [Remote host closed the connection]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has joined #ruby
<ariedler> https://gist.github.com/AlexRiedler/9caccbf08ecd074c2d93 is basically what it is right now; but that feels... gross for some reason
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
GeissT has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
{756d6f} has joined #ruby
Westerbly_ has quit [Quit: Leaving]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
radgeRayden has joined #ruby
sarkyniin has quit [Remote host closed the connection]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
<Ox0dea> ariedler: For starters, {BAZ: ...} doesn't do what you seem to think it does.
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<ariedler> oops, habit; i meant => instead of :
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has quit [Ping timeout: 246 seconds]
<Ox0dea> Is there some good reason for these things to be accessible using opaque numeric IDs?
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has joined #ruby
gcfhvjbkn has joined #ruby
<ariedler> Ox0dea: they are used in a message format that goes across the wrire
gcfhvjbkn has quit [Client Quit]
ruby-lang492 has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
willywos has joined #ruby
chouhoulis has quit [Remote host closed the connection]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
chouhoulis has joined #ruby
arooni has quit [Ping timeout: 246 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
tuelz1 has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has quit [Ping timeout: 260 seconds]
ruby-lang492 has quit [Ping timeout: 246 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
ruby-lang391 has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
{756d6f} has quit [Ping timeout: 246 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
gcfhvjbkn has joined #ruby
<shevy> hmm how to apply a .map! on a hash? should I use .each_pair and reconstitute?
gcfhvjbkn has quit [Remote host closed the connection]
FernandoBasso has quit [Quit: May the force be with you.]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<Ox0dea> shevy: Why not just #map and reconstitute?
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<Radar> Hash[hash.map ... ]
<Ox0dea> #to_h > Hash#[], in my opinion.
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<Ox0dea> Hash.[], I suppose.
<Radar> Oh right, to_h is now a thing
<Ox0dea> 19>> [].method(:to_h)
<ruboto> Ox0dea # => undefined method `to_h' for class `Array' (NameError) ...check link for more (https://eval.in/409268)
Kyuujitsu has quit [Ping timeout: 246 seconds]
<Ox0dea> Huh.
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<Radar> It's a thing on my Ruby version?
<Radar> I guess it's a recent addition?
<Ox0dea> Aye, I specifically checked 1.9 there.
Kyuujitsu has joined #ruby
ruby-lang391 has quit [Ping timeout: 246 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
<Ox0dea> Wow, #to_h is 2.1.
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
topdownjimmy has quit [Ping timeout: 240 seconds]
<ariedler> yerp :)
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
bonhoeffer has quit [Quit: bonhoeffer]
Jello_Raptor has quit [Ping timeout: 252 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
bonhoeffer has joined #ruby
Kyuujitsu has quit [Ping timeout: 244 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has joined #ruby
paulcsmith has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
paulcsmith has quit [Client Quit]
Afterburned6387 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
MatthewsFace has quit [Read error: Connection reset by peer]
Azure has joined #ruby
bruno-_ has quit [Ping timeout: 240 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
MatthewsFace has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
ixti has quit [Ping timeout: 272 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has quit [Ping timeout: 265 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
mdavid613 has quit [Quit: Leaving.]
linuxboytoo has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
Kyuujitsu has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
linuxboytoo has joined #ruby
bodgix1 has quit [Quit: Leaving.]
charliesome has quit [Ping timeout: 252 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
TeresaP has quit [Ping timeout: 246 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
theery has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Xoro has quit [Read error: Connection reset by peer]
Pupeno_ has quit [Read error: Connection reset by peer]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Xoro has joined #ruby
Pupeno has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
oo_ has quit [Remote host closed the connection]
jtdoncas has joined #ruby
oo_ has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
linuxboytoo has quit [Ping timeout: 255 seconds]
tekk has quit [Ping timeout: 260 seconds]
s00pcan has quit [Ping timeout: 264 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
bodgix has quit [Ping timeout: 256 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
tekk has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
willywos_ has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
oo_ has quit [Remote host closed the connection]
hashrocket has quit [Quit: Connection closed for inactivity]
gcfhvjbkn has joined #ruby
charliesome has joined #ruby
gcfhvjbkn has quit [Client Quit]
bronson has joined #ruby
gcfhvjbkn has joined #ruby
jtdoncas has quit [Ping timeout: 255 seconds]
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has quit [Ping timeout: 264 seconds]
oo_ has joined #ruby
willywos has quit [Ping timeout: 244 seconds]
Lingo has quit [Quit: (null)]
gcfhvjbkn has joined #ruby
kfpratt has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
sysanthrope has quit [Remote host closed the connection]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
s00pcan has joined #ruby
casadei_ has joined #ruby
sysanthrope has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
<ariedler> is there a method that is like def_delegator but for module methods?
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
bonhoeffer has quit [Quit: bonhoeffer]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
bronson has quit [Ping timeout: 255 seconds]
jenrzzz_ has quit [Ping timeout: 240 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
GeissT has quit [Ping timeout: 264 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
kfpratt has quit [Remote host closed the connection]
Kyuujitsu has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
petersaints has quit [Ping timeout: 256 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
texasmade has quit [Ping timeout: 240 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has quit [Ping timeout: 244 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
weaksauce has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
dorei has quit []
gcfhvjbkn has joined #ruby
tsvenson has quit [Read error: Connection reset by peer]
gcfhvjbkn has quit [Client Quit]
<Ox0dea> ariedler: Do you know how to access a Module's singleton class?
tsvenson has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<ariedler> yes; I was looking for SingleForwardable I think
danielpclark has joined #ruby
towski_ has quit [Ping timeout: 240 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
bricker has quit [Ping timeout: 272 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<ariedler> I've been programming for 3+ years in ruby; but mainly rails... forgot some of the basics I think somewhere
phutchins2 has quit [Ping timeout: 265 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
theery has quit [Read error: Connection reset by peer]
<Ox0dea> Well, I wouldn't call SingleForwardable "basic", per se.
frem has quit [Quit: Connection closed for inactivity]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
<Ox0dea> The implementation of #def_single_delegator is a little crazy.
theery has joined #ruby
<ariedler> true
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<Ox0dea> Doing the `extend` and `def_delegator` from within your module's singleton class would work, and it's definitely saner than eval + manually mucking about with $@.
curses has joined #ruby
Musashi007 has quit [Quit: Musashi007]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
scripore has joined #ruby
<ariedler> right; which is why I used it, I knew about Forwardable; but I was like wait a second I think there is something for this.
fenjamin has quit [Remote host closed the connection]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has quit [Ping timeout: 264 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
christiandsg has joined #ruby
Kyuujitsu has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
bosma has quit [Quit: Leaving]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Musashi007 has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
curses has quit [Ping timeout: 240 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
minmax has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
willywos_ has quit [Ping timeout: 265 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
christiandsg has quit [Ping timeout: 265 seconds]
Kyuujitsu has quit [Ping timeout: 246 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Jello_Raptor has joined #ruby
Kyuujitsu has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
jenrzzz has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
EllisTAA has quit [Quit: EllisTAA]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
duderonomy has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
Kyuujitsu has quit [Ping timeout: 260 seconds]
dfockler has joined #ruby
evo2020 has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<shevy> this is how I intend to write ruby code henceforthwith: http://blog.codinghorror.com/content/images/2015/07/364_placebo_effective.png
<Coraline> Works for me
<Coraline> alert('Called');
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has joined #ruby
<evo2020> has someone ever done a select for Ruby hash when you want to get the keys with Multiple values?
<Ox0dea> evo2020: Please clarify.
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<evo2020> This should work but throws error:
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
cornerma1 has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
jschoolcraft has quit [Quit: peace]
<evo2020> def get_value_positions
<evo2020> @squares.select {|keys | @squares[keys] == "X" || @square[keys] == "O"}.keys
<evo2020> end
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
theery has quit [Read error: Connection reset by peer]
<evo2020> values should be strings "X" or "O". Can't find anything close on stack overflow
<shevy> hah, vim... I remember that from when I first used Linux
<Ox0dea> evo2020: You should probably be using an Array to represent a tic-tac-toe board, for what that's worth.
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<evo2020> a hash is easier for this.
loc22 has joined #ruby
theery has joined #ruby
dfockler has quit [Ping timeout: 272 seconds]
<Ox0dea> Clearly.
<evo2020> why is the syntax wrong?
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<evo2020> It works with just one value request
<evo2020> the OR operator is not right?
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has quit [Ping timeout: 240 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
cornerman has quit [Ping timeout: 264 seconds]
cornerma1 is now known as cornerman
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has joined #ruby
<shevy> evo2020 do you have full code to reproduce?
<Ox0dea> evo2020: @squares.select { |k, v| %w[X O].include? v }.keys
jesseherrick has joined #ruby
<shevy> he inverted the query :)
gcfhvjbkn has joined #ruby
gcfhvjbkn was banned on #ruby by Radar [gcfhvjbkn!*@*]
gcfhvjbkn has quit [Client Quit]
<evo2020> 0x0dea: what is that?
<evo2020> !!
<evo2020> hold
<evo2020> let me check
<shevy> evo2020 he just checks if the array includes the value
<shevy> the array being 'X' and 'O' as its members
davedev24 has joined #ruby
<evo2020> into a hash? hmmm.
<evo2020> checking
mrmargolis has joined #ruby
davedev2_ has quit [Ping timeout: 244 seconds]
<Ox0dea> evo2020: Hash#select yields each key-value pair to the block, returning a new Hash whose elements satisfy the predicate specified by the block.
<shevy> well I assume @squares is the hash there
<shevy> so he just selects based on the condition inside the {}
bruno- has joined #ruby
<shevy> either it is included - or it is not. black white. yin yang. drunk sober. thin fat.
iceyec has quit [Quit: iceyec]
iceyec has joined #ruby
bonhoeffer has joined #ruby
Kyuujitsu has quit [Ping timeout: 265 seconds]
iceyec has quit [Client Quit]
tmtwd has joined #ruby
Kyuujitsu has joined #ruby
<Ox0dea> shevy: The Bloom filter would like a word with you.
tubuliferous has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
<evo2020> OxOdea: yes I can see that. I am checking one item
freerobby has quit [Read error: No route to host]
eminencehc has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
<evo2020> Perfect. Absolutely spot on. I had a typo in my code
freerobby has joined #ruby
<bazbing81> can I use the the preceeding \K group negatively? Can I match the bar inside |faxbar funbar bobar and bar| and omit the bar inside |foobar fobar foooooobar|? https://regex101.com/r/qR9kD4/3
<bazbing81> basically invert my current matches. hoping I just need to a ! or something :)
<evo2020> OxOdea: Thank u. Was on that for 30 mins
aaeron has quit [Quit: Leaving.]
linuxboytoo has joined #ruby
ValicekB has quit [Ping timeout: 244 seconds]
<Ox0dea> evo2020: Happy to help.
Kyuujitsu has quit [Ping timeout: 252 seconds]
<evo2020> shevy: U too.
<Ox0dea> bazbing81: So many bars.
<evo2020> U guys are a life-saver.
Kyuujitsu has joined #ruby
<evo2020> and a hair-saver too. LOL
<shevy> I save hair for later in life
<bazbing81> Ox0dea indeed. im banned from them all :(
<evo2020> shevy: LOL
<evo2020> k. back to ruby land
tubuliferous has quit [Ping timeout: 244 seconds]
decaff has joined #ruby
<evo2020> I really have to learn to use those %w. U guys are so slick with it!
<evo2020> bye for now!
juanpablo_ has joined #ruby
evo2020 has quit [Quit: Leaving]
bootstrappm has left #ruby [#ruby]
eminencehc has quit [Ping timeout: 255 seconds]
arescorpio has joined #ruby
arescorpio has quit [Max SendQ exceeded]
tkuchiki has joined #ruby
havenwood has joined #ruby
Kyuujitsu has quit [Ping timeout: 240 seconds]
loc22 has quit [Quit: Be back later ...]
Kyuujitsu has joined #ruby
Pupeno has quit [Remote host closed the connection]
juanpablo_ has quit [Ping timeout: 252 seconds]
user1138 has quit [Quit: Leaving]
user1138 has joined #ruby
jesseherrick has quit [Quit: leaving]
jake_the_snake has joined #ruby
ValicekB has joined #ruby
<jake_the_snake> I was hoping someone could explain how this is a thread safety problem: https://github.com/rails/rails/pull/9789
user1138 has quit [Remote host closed the connection]
<jake_the_snake> Seems like it's saying that instance variables are shared cross-thread?
user1138 has joined #ruby
<jake_the_snake> or maybe that it's saying the Application instance is shared across rails threads?
GriffinHeart has joined #ruby
<jake_the_snake> (ie in scope at the time the threads are created)
benlieb has quit [Quit: benlieb]
Kyuujitsu has quit [Ping timeout: 255 seconds]
<jake_the_snake> (or stored in a shared place, accessible across threads)
Kyuujitsu has joined #ruby
frem has joined #ruby
rubynuby has joined #ruby
nateberkopec has quit [Ping timeout: 255 seconds]
natbo has quit [Remote host closed the connection]
vt102 has quit [Ping timeout: 256 seconds]
Kyuujitsu has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
arescorpio has joined #ruby
tmtwd has quit [Quit: Leaving]
Kyuujitsu has joined #ruby
pdoherty has quit [Quit: Leaving]
<Ox0dea> bazbing81: Are you actually trying to implement Proc#source using regular expressions, then?
HoppingMadMan has joined #ruby
fedexo has joined #ruby
Kyuujitsu has quit [Ping timeout: 246 seconds]
HoppingMadMan has quit [Excess Flood]
swgillespie has joined #ruby
dimasg has quit [Ping timeout: 272 seconds]
HoppingMadMan has joined #ruby
olas has quit [Quit: ZNC - http://znc.in]
RegulationD has joined #ruby
jenrzzz has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
olas has joined #ruby
Kyuujitsu has joined #ruby
chills42 has quit [Remote host closed the connection]
theery has quit [Remote host closed the connection]
weemsledeux has quit [Quit: Textual IRC Client: www.textualapp.com]
yqt has quit [Ping timeout: 246 seconds]
RegulationD has quit [Ping timeout: 246 seconds]
decaff has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
Kyuujitsu has quit [Ping timeout: 255 seconds]
GriffinHeart has quit [Remote host closed the connection]
tmtwd has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
scripore has quit [Quit: This computer has gone to sleep]
Kyuujitsu has joined #ruby
HoppingMadMan has quit [Excess Flood]
shock_one has joined #ruby
_blizzy_ has joined #ruby
HoppingMadMan has joined #ruby
GriffinHeart has joined #ruby
triangles has quit [Read error: Connection reset by peer]
jtdoncas has joined #ruby
Kyuujitsu has quit [Ping timeout: 244 seconds]
shock_one has quit [Ping timeout: 260 seconds]
aaeron has joined #ruby
rbowlby has quit [Remote host closed the connection]
Kyuujitsu has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
oo_ has quit [Remote host closed the connection]
danielpclark has quit [Ping timeout: 265 seconds]
jake_the_snake has quit [Quit: Page closed]
scripore has joined #ruby
_blizzy_ has joined #ruby
duderonomy has quit []
oo_ has joined #ruby
marcoamo1 has quit [Ping timeout: 244 seconds]
Kyuujitsu has quit [Ping timeout: 265 seconds]
_seanc_ has quit [Quit: _seanc_]
marcoamo1 has joined #ruby
jtdoncas has left #ruby [#ruby]
_seanc_ has joined #ruby
symm- has quit [Ping timeout: 265 seconds]
aaeron1 has joined #ruby
<lannonbr> question, can you call #class on an object and change that value into a string?
<lannonbr> Never mind, I got it
aaeron has quit [Ping timeout: 255 seconds]
<Ox0dea> >> [Class.new.name, Class.new.to_s] # lannonbr: Something to bear in mind, perhaps.
<ruboto> Ox0dea # => [nil, "#<Class:0x4171410c>"] (https://eval.in/409293)
Kyuujitsu has joined #ruby
<lannonbr> Hmm, I did foo.class.inspect and got the same result
jenrzzz has joined #ruby
blaines_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lannonbr> now that only does what I want since I haven't overridden the inspect method
danielpclark has joined #ruby
Kyuujitsu has quit [Ping timeout: 240 seconds]
<Ox0dea> lannonbr: Yes, that's right. Class#name is almost certainly the method you want, but, as it demonstrated, it returns nil for "weird" classes.
aaeron1 has quit [Quit: Leaving.]
<lannonbr> Okay, Thanks Ox0dea
Vile` has quit [Ping timeout: 244 seconds]
decaff has joined #ruby
rsc___ has joined #ruby
willharrison has joined #ruby
michael_mbp has quit [Excess Flood]
Eiam_ has joined #ruby
bmurt has joined #ruby
theery has joined #ruby
Vile` has joined #ruby
darkf has joined #ruby
michael_mbp has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
<Ox0dea> lannonbr: Happy to help.
sevenseacat has joined #ruby
<Ox0dea> >> [(x = Class.new).name, (X = Class.new).name] # One more potential gotcha.
<ruboto> Ox0dea # => [nil, "X"] (https://eval.in/409297)
Kyuujitsu has joined #ruby
charliesome has joined #ruby
<lannonbr> is there a thing to do with constants that causes that?
braincrash has quit [Quit: bye bye]
scripore has quit [Quit: This computer has gone to sleep]
ducklobster has joined #ruby
<Ox0dea> That's exactly it.
juanpablo_ has joined #ruby
baweaver has quit [Remote host closed the connection]
theery has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
wldcordeiro_ has joined #ruby
Kyuujitsu has quit [Ping timeout: 250 seconds]
hahuang61 has quit [Ping timeout: 252 seconds]
Kyuujitsu has joined #ruby
triangles has joined #ruby
braincrash has joined #ruby
juanpablo_ has quit [Ping timeout: 260 seconds]
shadoi has quit [Quit: Leaving.]
Kyuujitsu has quit [Ping timeout: 246 seconds]
dimasg has joined #ruby
Kyuujitsu has joined #ruby
decaff has quit [Remote host closed the connection]
oo_ has joined #ruby
Kyuujitsu has quit [Ping timeout: 244 seconds]
hahuang61 has joined #ruby
Kyuujitsu has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz has quit [Ping timeout: 240 seconds]
<elton> hi does any one know how I can use a class something equivalent to java
<elton> i mean use a static class
Phrogz2 has joined #ruby
Phrogz2 is now known as Phrogz_
Phrogz_ has quit [Changing host]
Phrogz_ has joined #ruby
jenrzzz has joined #ruby
<Ox0dea> elton: Ruby's "open classes" philosophy pervades the language.
Phrogz has quit [Disconnected by services]
Phrogz_ is now known as Phrogz
<Ox0dea> elton: I suppose you could try freezing the class.
<elton> like list = ApiCaller.getNames
<Phrogz> I want to create a utility application that communicates with others over the network. I want your opinions: (a) HTTP or sockets? (b) What framework(s) to use?
<elton> instead of @ApiCaller.new.getNames
mattp__ is now known as mattp-
<Ox0dea> elton: The term you're looking for is "class method".
<Phrogz> For testing, I need to be able to launch this application with a variety of different command-line parameters used to configure its behavior.
<Ox0dea> >> class Foo; def self.bar; 42 end end; Foo.bar # elton
<ruboto> Ox0dea # => 42 (https://eval.in/409326)
curses has joined #ruby
<Phrogz> I was going to use Sinatra for HTTP communication, but I normally run Sinatra behind Thin, and that does not allow me to command-line configure the launch.
<elton> ok ill look into class method
tuelz1 has quit [Ping timeout: 244 seconds]
diegoviola has quit [Quit: WeeChat 1.2]
cscheib has joined #ruby
mleung has joined #ruby
christiandsg has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
ryanpc has quit [Quit: Textual IRC Client: www.textualapp.com]
<elton> Ox0dea i see, class methods are the thing i was looking for
curses has quit [Ping timeout: 244 seconds]
<cscheib> do y'all use any particular gems to simplify abstracting configuration variables for a script/app to another file? Or do you just write your own code to parse a file?
<cscheib> i.e. user/password/servername for a script that hits an API - I don't want those in my code
Kyuujitsu has quit [Ping timeout: 265 seconds]
mrmargolis has quit [Remote host closed the connection]
Kyuujitsu has joined #ruby
<Ox0dea> cscheib: You want those to come from the environment, but you shouldn't have to do any considerable amount of parsing in that case.
christiandsg has quit [Ping timeout: 265 seconds]
<cscheib> so, env variables or command line flags rather than a config file?
mleung has quit [Quit: mleung]
mleung has joined #ruby
<cscheib> I don't do a lot of coding (intentionally avoided it in fact), but I've finally gotta give in and dive in... starting with a simple report from an API for one of my storage devices
<cscheib> so excuse the "stupid" questions
blue_deref has joined #ruby
KnownSyntax has quit []
oo_ has quit [Remote host closed the connection]
sevenseacat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sevenseacat has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kyuujitsu has quit [Ping timeout: 272 seconds]
Kyuujitsu has joined #ruby
Averna has joined #ruby
hahuang61 has joined #ruby
gix has quit [Ping timeout: 252 seconds]
bklane has joined #ruby
code1o6 has quit [Ping timeout: 244 seconds]
code1o6 has joined #ruby
nini1294 has joined #ruby
Kyuujitsu has quit [Ping timeout: 244 seconds]
gix has joined #ruby
Kyuujitsu has joined #ruby
<Phrogz> I just include plaintext username and password in my code. Because...fuckit
<cscheib> lulz.
<Phrogz> Well…I Rot13 and reverse and swapcase on the password. Because that makes it safe.
<cscheib> configlieri looks like an interesting gem.
<cscheib> and probably does what I want
djbkd_ has quit [Remote host closed the connection]
<Phrogz> It's got a good name.
<Phrogz> I'd trust it.
<cscheib> indeed
yfeldblum has quit [Ping timeout: 244 seconds]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
Averna has quit [Ping timeout: 252 seconds]
djbkd has joined #ruby
shakes has joined #ruby
Kyuujitsu has quit [Ping timeout: 246 seconds]
bronson has joined #ruby
mleung has quit [Quit: mleung]
Kyuujitsu has joined #ruby
mary5030 has joined #ruby
Inside has joined #ruby
Inside has joined #ruby
hahuang61 has quit [Ping timeout: 272 seconds]
tubuliferous has joined #ruby
evo2020 has joined #ruby
bklane has quit [Remote host closed the connection]
Kyuujitsu has quit [Ping timeout: 252 seconds]
bklane has joined #ruby
Kyuujitsu has joined #ruby
petersaints has joined #ruby
tubuliferous has quit [Ping timeout: 255 seconds]
bklane has quit [Ping timeout: 246 seconds]
_5moufl has quit [Ping timeout: 246 seconds]
Kyuujitsu has quit [Ping timeout: 250 seconds]
_5moufl has joined #ruby
Kyuujitsu has joined #ruby
mary5030 has quit [Remote host closed the connection]
bmurt has quit []
hahuang61 has joined #ruby
bklane has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
Averna has joined #ruby
stnly has joined #ruby
theery has joined #ruby
Kyuujitsu has quit [Ping timeout: 240 seconds]
<Radar> cscheib: Why do you need a gem for this?
<Radar> cscheib: Why not store it in ENV[]?
<Radar> ENV['YOURTHING_USERNAME']
astrobun_ has joined #ruby
rehat has joined #ruby
<Radar> Alternatively, .yaml files are good for that sort of thing too.
Kyuujitsu has joined #ruby
svf has joined #ruby
rubynuby has quit []
hahuang61 has quit [Ping timeout: 246 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
HoppingMadMan has quit [Ping timeout: 244 seconds]
GriffinHeart has joined #ruby
Kyuujitsu has quit [Ping timeout: 255 seconds]
HoppingMadMan has joined #ruby
Kyuujitsu has joined #ruby
chipotle has joined #ruby
texasmade has joined #ruby
ariedler has quit []
swgillespie has joined #ruby
HoppingMadMan has quit [Excess Flood]
chipotl__ has joined #ruby
swgillespie has quit [Max SendQ exceeded]
chipotle has quit [Read error: Connection reset by peer]
Kyuujitsu has quit [Ping timeout: 250 seconds]
swgillespie has joined #ruby
eggoez has quit [Ping timeout: 244 seconds]
Kyuujitsu has joined #ruby
mdavid613 has joined #ruby
s00pcan has quit [Read error: No route to host]
swgillespie has quit [Max SendQ exceeded]
swgillespie has joined #ruby
<evo2020> does anyone know the ruby splat operator really well?
<evo2020> I am trying to map an array of arrays to winning method and it keeps blowing up
elton has quit [Quit: elton]
elton has joined #ruby
<danielpclark> Have you tried the flatten method?
eggoez has joined #ruby
hahuang61 has joined #ruby
<danielpclark> Have a gist of an example?
Kyuujitsu has quit [Ping timeout: 256 seconds]
houhoulis has joined #ruby
<Radar> evo2020: no code == no help
svf has quit [Quit: Lost terminal]
code1o6 has quit [Ping timeout: 255 seconds]
Kyuujitsu has joined #ruby
blue_deref has quit [Quit: bbn]
lannonbr has quit [Quit: WeeChat 1.2]
mockra has joined #ruby
ohaibbq has joined #ruby
wldcordeiro_ has quit [Remote host closed the connection]
tuelz1 has joined #ruby
<rehat> anyone use Sublime Text? How do you auto indent your ruby code.
Kyuujitsu has quit [Read error: Connection reset by peer]
<Ox0dea> gg=G
<Ox0dea> (Sorry.)
mdavid613 has quit [Quit: Leaving.]
<bnagy> there's a beautify ruby plugin which isn't terrible
Averna has quit [Ping timeout: 240 seconds]
<sevenseacat> it does it by default? or i press tab while typing if i need it?
<Ox0dea> evo2020: I assume you already have an array of arrays containing cell indices to map to winning Tic-Tac-Toe positions?
<Ox0dea> evo2020: [[0, 1, 2], [0, 3, 6], [0, 4, 8], ...], right?
<mozzarella> Ox0dea: well, there's the vintage mode…
<evo2020> 0x0dea: yes it is my rubicon
<Ox0dea> evo2020: Pardon?
<evo2020> I have a board object
<Ox0dea> evo2020: What is the content of the array of arrays you mentioned earlier?
<evo2020> In pry it displays like so
<evo2020> #<Board:0x00000002819e38
<evo2020> @squares=
<evo2020> {1=>" ", 2=>" ", 3=>" ", 4=>" ", 5=>"X", 6=>" ", 7=>" ", 8=>" ", 9=>" "}>
<Ox0dea> That's not an array of arrays.
<evo2020> It is first an object
wldcordeiro_ has joined #ruby
<evo2020> that holds a hash
axisys has quit [Ping timeout: 246 seconds]
<evo2020> The array of arrays is the winning lines
tuelz1 has quit [Ping timeout: 265 seconds]
<Ox0dea> evo2020: As in the example I supplied?
<evo2020> yes! Exactly
<Ox0dea> You can determine the winning method based on the difference between cells.
<Ox0dea> 1 = horizontal, 3 = vertical, 2/4 = diagonal.
<evo2020> huh?
<evo2020> oh yeah
<evo2020> but i am trying to check the game board against the winning lines
markholmes has joined #ruby
HoppingMadMan has joined #ruby
jcoe has joined #ruby
<Ox0dea> >> '222_222_222'.to_i(3).to_s(2).size
<ruboto> Ox0dea # => 15 (https://eval.in/409356)
<evo2020> then jump out if it doesn't match and continue game
markholmes has left #ruby [#ruby]
<Ox0dea> You can represent the state of a tic-tac-toe board using a single 15-bit number.
<Ox0dea> You should totally try it. :)
<evo2020> say WOT?
Yzguy has quit [Quit: Zzz...]
<evo2020> is there a link for that?
<Ox0dea> For doing bitwise arithmetic?
wldcordeiro_ has quit [Remote host closed the connection]
<evo2020> lol. I'm listening
<evo2020> bitwise arithmetic. k
cnngimenez has quit [Quit: Konversation terminated!]
wldcordeiro_ has joined #ruby
<Ox0dea> There's been virtually no research into doing mathematics at the levl of bits, I'm afraid. :/
<Ox0dea> It's rather esoteric territory. Esoterritory, if you will.
HoppingMadMan has quit [Excess Flood]
<evo2020> 0x0dea: I figured Esoterritory
<Ox0dea> You'll have to search far and wide to learn of such mysteryies as AND and XOR.
kriskropd has quit [Ping timeout: 256 seconds]
<evo2020> I got that
HoppingMadMan has joined #ruby
<evo2020> did that in science class
astrobu__ has joined #ruby
<evo2020> I previously used the splat operator to map game board. It worked.
<evo2020> Just now that I am doing OOP, it's another universe.
werelivinginthef has joined #ruby
<bnagy> dammit now I am totally nerdsniped
<rehat> is there a way to not return an object in a method?
davedev24 has quit [Remote host closed the connection]
<rehat> does calling return still return nil?
<Ox0dea> Yes.
wldcordeiro_ has quit [Remote host closed the connection]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shakes has quit [Quit: Leaving]
<Ox0dea> bnagy: Excellent. :)
<Ox0dea> It's a little tricky, but only just.
<bnagy> it seems like a 15 bit encoding isn't particularly useful
<bnagy> if you did 18 then a lot of twiddles are easy
fantazo has quit [Ping timeout: 272 seconds]
<Ox0dea> It's not, but it's the most space-efficient, if nothing else.
<rehat> so I would need to check for a nil return type if I am using << to add objects to an array or will it ignore adding a nil itme?
rbowlby has joined #ruby
<Ox0dea> rehat: No, it will add the nil.
HoppingMadMan has quit [Remote host closed the connection]
<rehat> Ox0dea: thanks
<Ox0dea> That is, yes, you'd need to check for nil.
<Ox0dea> Sure thing.
freerobby has quit [Quit: Leaving.]
<Ox0dea> evo2020: Something like this oughta do: https://gist.github.com/0x0dea/d63dea3a26586e014ad5
tkuchiki has quit [Remote host closed the connection]
astrobun_ has quit [Ping timeout: 272 seconds]
<bnagy> >> 3**9 == '222_222_222'.to_i(3)
<ruboto> bnagy # => false (https://eval.in/409364)
<Ox0dea> evo2020: Erm, you'll want to add a check that the unique value isn't the blank square, though.
<bnagy> amusing off by ones
countryHick has quit [Quit: Connection closed for inactivity]
Kyuujitsu has joined #ruby
wldcordeiro_ has joined #ruby
_blizzy_ has quit [Ping timeout: 244 seconds]
<Ox0dea> >> 2**1 == '1'.to_i(2) # Math are hard. :P
<ruboto> Ox0dea # => false (https://eval.in/409365)
<evo2020> hold
<Ox0dea> Standing by.
<rehat> if I want to make some methods private do I need to place the 'private' call at the end of the class def
<Ox0dea> rehat: `private` is actually just a regular Ruby method.
<bnagy> rehat: commonly you just have 'private' on one line the private methods from there until end of class body
<rehat> ahh thanks
<Ox0dea> rehat: Given 1+ arguments, #private modifies the visibility of each; given 0, it changes the default visibility of subsequently defined methods.
<Ox0dea> The same is true, of course, of #public and #protected.
Kyuujitsu has quit [Ping timeout: 260 seconds]
wldcordeiro_ has quit [Remote host closed the connection]
<rehat> I was looking at this http://stackoverflow.com/questions/10724221/where-to-place-private-methods-in-ruby so I can just declare private and all the methods defined below that
troyreadyy has quit [Ping timeout: 265 seconds]
Kyuujitsu has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
keen__________33 has joined #ruby
<Ox0dea> Yes, that's the conventional approach.
wldcordeiro_ has joined #ruby
jenrzzz has joined #ruby
mxrguspxrt has joined #ruby
fedexo has quit [Read error: Connection reset by peer]
<Ox0dea> If you wanted to add another public method, you could do it before the call to #private, or you could add a line containing just "public" after the private methods to introduce a new default visibility.
keen__________32 has quit [Ping timeout: 272 seconds]
mxrguspxrt has quit [Read error: Connection reset by peer]
<Ox0dea> The latter is to be shunned with utmost enmity.
duderonomy has joined #ruby
rsc___ has quit [Quit: rsc___]
<rehat> Ox0dea: lol thanks
mxrguspxrt has joined #ruby
<bnagy> if you had two nine bit vectors you can check for invalid board state with a&b > 0 and then have masks for all the wins
<evo2020> 0x0dea: Would you translate { |i| @squares[i] }.uniq.size == 1 }
<evo2020> I think it means map the wins array to @squres object such that
kriskropd has joined #ruby
wldcordeiro_ has quit [Remote host closed the connection]
troyready has joined #ruby
Kyuujitsu has quit [Ping timeout: 255 seconds]
mockra has quit [Remote host closed the connection]
tjohnson has quit [Quit: Connection closed for inactivity]
Kyuujitsu has joined #ruby
<bnagy> I guess they're not even masks, just comparisons
<evo2020> each @squares position only matches up once to each position in one array of arrays
wldcordeiro_ has joined #ruby
<bnagy> 8 per vector
<evo2020> close?
<bnagy> evo2020: I am not even vaguely in the same headspace as you, I am doing awful bit twiddling
<bnagy> ie I am not actually trying to help, sorry :\
mxrguspxrt has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 244 seconds]
<Ox0dea> rehat: Happy to help. One last thing to note is that the method visibility methods expect a Symbol, which is just the kind of value we get from method definition expressions in Ruby 2.0+.
<Ox0dea> >> class Foo; private def bar; end end; Foo.private_instance_methods(false)
<ruboto> Ox0dea # => [:bar] (https://eval.in/409372)
houhoulis has quit [Remote host closed the connection]
konsolebox has joined #ruby
<Ox0dea> You probably should forget this knowledge too, though. :)
<bnagy> now I am trying to work out how to take an "almost win" and get a winning move via twiddles
<evo2020> 0x0dea: I'm not sure how to implement until i understand it more
<bnagy> I guess you could & your board with each of the wins and count bits set in the result
<rehat> thanks dude
<Ox0dea> evo2020: No, that's not quite right. It maps each position to what is found there in @squares; if calling #uniq on that gives a single element, we know all three board cells matched.
Guest55021 is now known as bl4ckdu5t
bl4ckdu5t has quit [Changing host]
bl4ckdu5t has joined #ruby
Kyuujitsu has quit [Ping timeout: 260 seconds]
bl4ckdu5t is now known as silverdust
<Ox0dea> As I said, the simplistic approach presented doesn't take into account that three empty cells would "match".
Kyuujitsu has joined #ruby
<evo2020> they don't
Sapna has joined #ruby
axisys has joined #ruby
<Ox0dea> bnagy: Do you even __builtin_popcount?
<evo2020> OMG
<evo2020> Got it
<Ox0dea> Yay!
<evo2020> without understanding all the syntax!
rsc___ has joined #ruby
bmurt has joined #ruby
juanpablo_ has joined #ruby
<bnagy> I guess irl you only need 'take the center' and 'stop opponent from winning', but that still needs 'find their winning move'
Sapna1 has joined #ruby
Kyuujitsu has quit [Ping timeout: 240 seconds]
<Ox0dea> >> require 'objspace'; board = (1..9).zip([' '].cycle).to_h; [ObjectSpace.memsize_of(board), 19683.bit_length] # evo2020
<ruboto> Ox0dea # => [324, 15] (https://eval.in/409374)
theery has quit [Remote host closed the connection]
pabloh has joined #ruby
skade has joined #ruby
<Ox0dea> You could achieve a 2,160% reduction in memory requirements!
<Ox0dea> And that doubles in a 64-bit environment.
Kyuujitsu has joined #ruby
arescorpio has quit [Ping timeout: 252 seconds]
<Ox0dea> bnagy: Did you settle for an 18-bit encoding, then?
<bnagy> I think so
icebourg has joined #ruby
christiandsg has joined #ruby
<pabloh> hello
Sapna has quit [Ping timeout: 244 seconds]
<bnagy> that would make 'find winning move' an and of the player vector with all win numbers, select those with bitcount 2, select those where the last bit is open
<pabloh> anyone can suggest a simple gem to keep track of subclasses for specific classes?
juanpablo_ has quit [Ping timeout: 252 seconds]
crdpink has quit [Ping timeout: 246 seconds]
<bnagy> can't immediately think of a clean way to do 'last bit is open' though
theery has joined #ruby
<bnagy> oh, invert the win, mask those bits out of your board, then xor what's left with the win
<bnagy> then check that bit against the opponents board
Kyuujitsu has quit [Ping timeout: 255 seconds]
<Ox0dea> evo2020: Whoops. memsize_of is in bytes, so multiply that yield by 8.
Kyuujitsu has joined #ruby
Sapna1 has quit [Ping timeout: 260 seconds]
<Ox0dea> pabloh: Why would you need a gem for that when you can just use Class#inherited?
tmtwd has quit [Remote host closed the connection]
shinnya_ has quit [Ping timeout: 264 seconds]
<Ox0dea> >> $in = []; class Foo; def self.inherited klass; $in << klass end end; class A < Foo; end; B = Class.new(Foo); $in
<ruboto> Ox0dea # => [A, B] (https://eval.in/409379)
arooni has joined #ruby
<bnagy> actually there are only 8 wins, so I guess you could just keep win and inverted-win in the same number at different ends
crdpink has joined #ruby
<Ox0dea> 16, technically.
<bnagy> yeah, but I'm just using patterns
mary5030 has joined #ruby
<bnagy> because I have two boards
nini1294 has quit [Ping timeout: 265 seconds]
mockra has joined #ruby
fedexo has joined #ruby
Kyuujitsu has quit [Ping timeout: 256 seconds]
<evo2020> 0x0dea: Did u mean me re 'memsize_of is in bytes' ?
Kyuujitsu has joined #ruby
willywos has joined #ruby
<evo2020> what are u optimizing? Gameplay time?
<bnagy> I think you could do the whole thing in registers
<Ox0dea> evo2020: Memory requirements.
<evo2020> bec game is slow to start?
<Ox0dea> No, because frivolity.
podman has quit [Quit: Connection closed for inactivity]
<bnagy> hm might not have enough
<Ox0dea> bnagy: Doesn't x86-64 give you, like, 200-ish?
Guest32 has joined #ruby
<bnagy> well I guess with 64 bit registers you're fine anyway
<bnagy> because you can load two things into each
<bnagy> I think I only need 8 win-pos dword and 2 board dwords
mary5030 has quit [Ping timeout: 264 seconds]
werelivinginthef has quit [Read error: Connection reset by peer]
<bnagy> which also means you can use register addressing to get your sub-values instead of shifting :>
Inside has quit [Ping timeout: 252 seconds]
werelivinginthef has joined #ruby
Kyuujitsu has quit [Ping timeout: 246 seconds]
iateadonut has joined #ruby
jenrzzz has joined #ruby
<bnagy> oh the boards are one dword not two. Golden.
Kyuujitsu has joined #ruby
<bnagy> ok I guess I should go and actually do work :<
Rickmasta has joined #ruby
<pabloh> Ox0dea, yeah I end up using that
<pabloh> actually I wanted to track descendants initially para subclasses are enough
mary5030 has joined #ruby
<pabloh> s/para/but/
krz has joined #ruby
<Ox0dea> pabloh: Those are the same thing?
<pabloh> subclasses and descendants?, no
<pabloh> well
Kyuujitsu has quit [Ping timeout: 244 seconds]
<pabloh> immediate subclasses != descendants :P
Kyuujitsu has joined #ruby
amclain has quit [Quit: Leaving]
lele` has joined #ruby
christiandsg has quit [Remote host closed the connection]
<Ox0dea> pabloh: I'm not sure I follow. In my example, is it not the case that A and B are subclasses/descendants of Foo?
fedexo has quit [Ping timeout: 246 seconds]
<Ox0dea> < is the "subclass operator", and A.ancestors would include Foo.
charliesome has quit [Quit: zzz]
leat1 has joined #ruby
Sapna has joined #ruby
leat has quit [Ping timeout: 240 seconds]
tuelz1 has joined #ruby
lele has quit [Ping timeout: 256 seconds]
lele` has quit [Excess Flood]
lele has joined #ruby
Kyuujitsu has quit [Ping timeout: 246 seconds]
Encapsulation has joined #ruby
Kyuujitsu has joined #ruby
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Sapna has quit [Ping timeout: 246 seconds]
<Ox0dea> pabloh: Right, sorry, I see the distinction now. ActiveSupport adds Class#subclasses and Class#descendants if you're still looking for a gem.
tuelz1 has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
Guest26862 has joined #ruby
bklane_ has joined #ruby
fedexo has joined #ruby
Kyuujitsu has quit [Ping timeout: 250 seconds]
troyready has quit [Ping timeout: 250 seconds]
mary5030 has quit [Remote host closed the connection]
Kyuujitsu has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
shortCircuit__ has joined #ruby
shock_one has joined #ruby
mrmargolis has joined #ruby
shock_one has quit [Read error: Connection reset by peer]
shock_one has joined #ruby
christiandsg has joined #ruby
leat1 has quit [Remote host closed the connection]
bklane has quit [Ping timeout: 244 seconds]
leat1 has joined #ruby
<flughafen> hey guys
troyready has joined #ruby
yfeldblum has joined #ruby
<shortCircuit__> hiii
casadei_ has quit [Remote host closed the connection]
Kyuujitsu has quit [Ping timeout: 246 seconds]
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
mrmargolis has quit [Ping timeout: 240 seconds]
Kyuujitsu has joined #ruby
tagrudev has joined #ruby
tubuliferous has joined #ruby
casadei_ has joined #ruby
tkuchiki has joined #ruby
kp666 has joined #ruby
evo2020 has quit [Quit: Leaving]
theery has quit [Remote host closed the connection]
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
willywos has quit [Quit: Textual IRC Client: www.textualapp.com]
Phrogz has quit [Remote host closed the connection]
theery has joined #ruby
Kyuujitsu has quit [Ping timeout: 240 seconds]
Guest95121 has joined #ruby
Guest95121 is now known as Ann
skade has quit [Quit: Computer has gone to sleep.]
theery has quit [Remote host closed the connection]
JoshuaPaling has joined #ruby
tubuliferous has quit [Ping timeout: 240 seconds]
leat1 has quit [Remote host closed the connection]
casadei_ has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
leat1 has joined #ruby
Sapna has joined #ruby
theery has joined #ruby
djbkd has quit [Quit: My people need me...]
yfeldblu_ has joined #ruby
arooni has quit [Ping timeout: 244 seconds]
theery has quit [Remote host closed the connection]
dvb_ua has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TeresaP has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
SOLDIERz has joined #ruby
Kyuujitsu has joined #ruby
christiandsg has quit [Remote host closed the connection]
rsc___ has quit [Quit: rsc___]
bklane_ has quit []
nofxx has quit [Ping timeout: 264 seconds]
olistik has joined #ruby
Kyuujitsu has quit [Ping timeout: 246 seconds]
nofxx has joined #ruby
theery has joined #ruby
Kyuujitsu has joined #ruby
Rickmasta has joined #ruby
yfeldblu_ has quit [Read error: Connection reset by peer]
Sapna has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
charliesome has quit [Quit: zzz]
Kyuujitsu has quit [Ping timeout: 244 seconds]
shock_one has quit [Remote host closed the connection]
shock_one has joined #ruby
Kyuujitsu has joined #ruby
RobertBirnie has joined #ruby
olistik has quit [Remote host closed the connection]
HoppingMadMan has joined #ruby
Channel6 has joined #ruby
yfeldblu_ has joined #ruby
fedexo has quit [Ping timeout: 244 seconds]
<TeresaP> Sorry for the probably obvious answer this question begs, but I can't figure out how to add an item with a particular format to an existing Hash http://pastie.org/private/drfcui7wyfsewsxmxlfeq
shock_on_ has joined #ruby
nini1294 has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
shock_one has quit [Ping timeout: 240 seconds]
<Ox0dea> TeresaP: Unless I'm missing something, Hash#merge should suffice.
<Ox0dea> >> a = {a: 1, b: 2}; b = {c: 3, d: 4}; a.merge(b)
<ruboto> Ox0dea # => {:a=>1, :b=>2, :c=>3, :d=>4} (https://eval.in/409410)
kakusu has joined #ruby
Rickmasta has quit [Read error: No route to host]
<TeresaP> I've got the first part in an object, which I read in from JSON, but I'm being stupid about the second part.
woodruffw has quit [Ping timeout: 265 seconds]
<TeresaP> That's good to know abut merge
<TeresaP> I've been programming for quite a few years now, but never had the opportunity to create/use hashes until recently
Rickmasta has joined #ruby
<TeresaP> For some reason they still trip me up
Kyuujitsu has quit [Ping timeout: 260 seconds]
blaines has joined #ruby
theery has quit [Remote host closed the connection]
Kyuujitsu has joined #ruby
tkuchiki has quit [Remote host closed the connection]
christiandsg has joined #ruby
Sapna has joined #ruby
Rickmasta has quit [Read error: No route to host]
nini1294 has quit [Ping timeout: 265 seconds]
<Ox0dea> TeresaP: Thinking of them as "maps" or "dictionaries" may provide the necessary insight.
Rickmasta has joined #ruby
jas02 has joined #ruby
vdamewood has joined #ruby
Kyuujitsu has quit [Ping timeout: 246 seconds]
<Rinzlit> Ox0dea thats interesting O_o
CloCkWeRX has left #ruby [#ruby]
<Ox0dea> With a dictionary, you have the key (a word), and you can query the dictionary for a value (the word's definition).
Kyuujitsu has joined #ruby
tvw has joined #ruby
blaines has quit [Ping timeout: 244 seconds]
Sapna has quit [Ping timeout: 260 seconds]
christiandsg has quit [Remote host closed the connection]
blaines has joined #ruby
werelivinginthef has quit [Remote host closed the connection]
<Ox0dea> Sure, you could have two arrays, one contaning all the words and the other all the definitions, and then you could find the definition by asking for the nth element, where n is derived from the word's position in the word array, but that's tiresome and inefficient.
Miphix has joined #ruby
Marina91 has joined #ruby
<Ox0dea> I suppose you could also just have a bunch of variables named along the lines of `definition_of_whizz` and `definition_of_bang`, but that would be insane.
Marina91 has quit []
<Ox0dea> TeresaP: If you're only looking to add a single key-value pair to your Hash, `hash[foo] = bar` would do. Ruby's Hashes are mutable; you can just keep stuffing values in.
tkuchiki has joined #ruby
Kyuujitsu has quit [Ping timeout: 244 seconds]
<TeresaP> oh geez
<TeresaP> I'll try that Ox0dea
<TeresaP> I was trying to do
eGGsha has joined #ruby
<TeresaP> blah = {"foo" => ["bar"]}
<TeresaP> or some such crazy stuff
<Ox0dea> Well, that would create a new Hash which you could #merge into the main one, but that's excessive if you're just adding the one.
Kyuujitsu has joined #ruby
<TeresaP> yes just the one
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dimasg has quit [Ping timeout: 255 seconds]
tuelz1 has joined #ruby
mockra has quit []
<TeresaP> I made that way too hard
msnyon has quit [Ping timeout: 255 seconds]
michael_mbp has quit [Excess Flood]
Kyuujitsu has quit [Ping timeout: 250 seconds]
Kyuujitsu has joined #ruby
blaines has quit [Ping timeout: 240 seconds]
Channel6 has quit [Quit: Leaving]
tuelz1 has quit [Ping timeout: 250 seconds]
michael_mbp has joined #ruby
RegulationD has joined #ruby
Kyuujitsu has quit [Ping timeout: 246 seconds]
Sapna has joined #ruby
Kyuujitsu has joined #ruby
TvL2386 has joined #ruby
linuxboytoo has quit [Remote host closed the connection]
danielpclark has quit [Remote host closed the connection]
woodruffw has joined #ruby
ReBoRN has joined #ruby
blaines has joined #ruby
Ann has quit [Remote host closed the connection]
ips|malc has joined #ruby
Sapna has quit [Ping timeout: 255 seconds]
RegulationD has quit [Ping timeout: 272 seconds]
andikr has joined #ruby
TeresaP has quit [Ping timeout: 246 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Asher has quit [Read error: No route to host]
Kyuujitsu has quit [Ping timeout: 272 seconds]
Kyuujitsu has joined #ruby
Phrogz has joined #ruby
Asher has joined #ruby
GriffinHeart has joined #ruby
ponga has joined #ruby
radgeRayden has quit [Ping timeout: 265 seconds]
Philipp__ has joined #ruby
lsmola has joined #ruby
Kyuujitsu has quit [Ping timeout: 256 seconds]
schaerli has joined #ruby
gagrio has joined #ruby
juanpablo_ has joined #ruby
gagrio has quit [Client Quit]
Kyuujitsu has joined #ruby
icebourg has quit []
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ishahnaz has joined #ruby
juanpablo_ has quit [Ping timeout: 260 seconds]
stan has joined #ruby
r4do has joined #ruby
yardenbar has joined #ruby
Kyuujitsu has quit [Ping timeout: 264 seconds]
towski_ has joined #ruby
Kyuujitsu has joined #ruby
sevenseacat has quit [Quit: .]
schaerli has quit [Remote host closed the connection]
RobertBirnie has joined #ruby
Ilyas has joined #ruby
yfeldblu_ has quit [Ping timeout: 260 seconds]
Phrogz has quit [Ping timeout: 246 seconds]
chipotl__ is now known as chipotle
Kyuujitsu has quit [Ping timeout: 265 seconds]
Kyuujitsu has joined #ruby
robbyoconnor has joined #ruby
yfeldblum has joined #ruby
quimrstorres has joined #ruby
_seanc_ has quit [Quit: _seanc_]
bluOxigen has joined #ruby
curses has joined #ruby
shock_on_ has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 246 seconds]
shock_one has joined #ruby
weemsledeux has joined #ruby
HoppingMadMan has quit [Ping timeout: 246 seconds]
Kyuujitsu has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
juanpablo_ has joined #ruby
quimrstorres has quit [Remote host closed the connection]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weemsledeux has quit [Max SendQ exceeded]
fella5s has joined #ruby
shock_one has quit [Read error: No route to host]
Kyuujitsu has joined #ruby
curses has quit [Ping timeout: 260 seconds]
shock_one has joined #ruby
fella6s has quit [Ping timeout: 246 seconds]
<maloik> oh, hello
yardenbar has quit [Ping timeout: 246 seconds]
texasmade has quit [Ping timeout: 264 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
juanpablo_ has quit [Ping timeout: 246 seconds]
lxsameer has joined #ruby
platosha_ has quit [Quit: This computer has gone to sleep]
charliesome has joined #ruby
aganov has joined #ruby
shock_one has quit [Remote host closed the connection]
akemrir has joined #ruby
shock_one has joined #ruby
Sapna has joined #ruby
akemrir has quit [Client Quit]
shadeslayer has quit [Ping timeout: 244 seconds]
eGGsha has joined #ruby
dmolina has joined #ruby
dfockler has joined #ruby
Kyuujitsu has quit [Ping timeout: 246 seconds]
DoubleMalt has joined #ruby
Kyuujitsu has joined #ruby
<ljarvis> hi
shock_one has quit [Ping timeout: 265 seconds]
ndrei has joined #ruby
CustosLimen has quit [Ping timeout: 264 seconds]
towski_ has quit [Remote host closed the connection]
akemrir has joined #ruby
Rollabunna has quit [Remote host closed the connection]
vondruch has joined #ruby
Sapna has quit [Ping timeout: 260 seconds]
dimasg has joined #ruby
dfockler has quit [Ping timeout: 240 seconds]
akemrir has quit [Client Quit]
jatb has joined #ruby
mrmargolis has joined #ruby
Kyuujitsu has quit [Ping timeout: 250 seconds]
yardenbar has joined #ruby
CustosLimen has joined #ruby
Kyuujitsu has joined #ruby
dimasg has quit [Ping timeout: 264 seconds]
rsc___ has joined #ruby
mrmargolis has quit [Ping timeout: 246 seconds]
ips|malc has joined #ruby
tuelz1 has joined #ruby
djbkd has quit [Remote host closed the connection]
tubuliferous has joined #ruby
Kyuujitsu has quit [Ping timeout: 244 seconds]
auzty has joined #ruby
Kyuujitsu has joined #ruby
chinmay_dd has joined #ruby
tuelz1 has quit [Ping timeout: 244 seconds]
codecop has joined #ruby
olistik has joined #ruby
charliesome has quit [Quit: zzz]
tubuliferous has quit [Ping timeout: 244 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kyuujitsu has quit [Ping timeout: 265 seconds]
Kyuujitsu has joined #ruby
djbkd has joined #ruby
texasmade has joined #ruby
olistik has quit [Ping timeout: 244 seconds]
troulouliou_div2 has joined #ruby
shortCircuit__ has quit [Remote host closed the connection]
olistik has joined #ruby
Phoop has joined #ruby
charliesome has joined #ruby
bmurt has quit []
jgt has joined #ruby
Kyuujitsu has quit [Ping timeout: 252 seconds]
_ht has joined #ruby
bodgix has joined #ruby
johnMcLain has joined #ruby
johnMcLain has quit [Client Quit]
olistik_ has joined #ruby
schaerli has joined #ruby
bruno- has joined #ruby
krz has quit [Ping timeout: 255 seconds]
olistik has quit [Ping timeout: 256 seconds]
hololeap has quit [Ping timeout: 240 seconds]
shadeslayer has joined #ruby
olistik_ has quit [Remote host closed the connection]
Rollabunna has joined #ruby
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_tpavel has joined #ruby
baweaver has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
nofxx has quit [Ping timeout: 255 seconds]
nofxx has joined #ruby
Rollabunna has quit [Ping timeout: 244 seconds]
Violentr has joined #ruby
bayed has joined #ruby
riffraff has joined #ruby
Feyn has joined #ruby
_tpavel has quit [Quit: Leaving]
olistik has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
evo2020 has joined #ruby
white_bear has joined #ruby
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
mxrguspxrt has joined #ruby
<evo2020> 0x0dea: I have everything done except the win method. Will u please look at my code? It should work but doesnt
schaerli has quit [Read error: Connection timed out]
joonty has joined #ruby
olistik has quit [Ping timeout: 250 seconds]
olistik has joined #ruby
schaerli has joined #ruby
<flughafen> why would minitest::assert compalin about no msg given?
unshadow_ has joined #ruby
juanpablo_ has joined #ruby
evo2020 has quit [Quit: Leaving]
sepp2k has joined #ruby
unshadow has quit [Ping timeout: 252 seconds]
djbkd has quit [Remote host closed the connection]
<zenspider> flughafen: it isn't complaining... it's telling.
htmldrum has quit [Ping timeout: 246 seconds]
juanpablo_ has quit [Ping timeout: 265 seconds]
<flughafen> Failed assertion, no message given. (MiniTest::Assertion)
<flughafen> ahhh
<flughafen> sorry
<zenspider> either provide a message to provide more context, use a better assertion, or just go fix it so it passes
Zai00 has joined #ruby
dumdedum has joined #ruby
shock_one has joined #ruby
_blizzy_ has joined #ruby
Pupeno has joined #ruby
livathinos has joined #ruby
baweaver has quit [Remote host closed the connection]
watnall56_ has quit [Quit: Connection closed for inactivity]
_blizzy_ has quit [Read error: Connection reset by peer]
Pupeno has quit [Ping timeout: 260 seconds]
shock_one has quit [Ping timeout: 246 seconds]
Sapna has joined #ruby
_blizzy_ has joined #ruby
Pupeno has joined #ruby
joonty has quit [Ping timeout: 252 seconds]
joonty has joined #ruby
blaines has quit [Ping timeout: 246 seconds]
bumbar_ has joined #ruby
<apeiros> so apparently good ruby practices are bad rails practices - requiring files you depend on in rails can cause file double loading (through rails' autoload) leading to "constant already defined" warnings. nice.
<ljarvis> require_dependency
<apeiros> ljarvis: which is rails only…
<apeiros> well, I guess I can do a compat layer by defining require_dependency if it doesn't exist already
<ljarvis> right, but you're talking about a rails issue no
<apeiros> but…*ugh*
<apeiros> not all code I use in rails is rails only code…
<ljarvis> heh, right
tuelz1 has joined #ruby
<ljarvis> tl;dr lolrails
<apeiros> but I guess this discovery will cause me to change how I organize code which should be usable in and out of rails
<ljarvis> get your fancy ellipsis out of here
<apeiros> ………………………
<apeiros> have some more
<ljarvis> heh, code I use out of rails often doesnt go into any autoloading place in my rails apps
Oka has joined #ruby
<apeiros> ljarvis: that's the thing I'll change about my code :)
Sapna has quit [Ping timeout: 244 seconds]
<apeiros> can't have my cake and eat it too :(
<adaedra> …
<ljarvis> :(
tuelz1 has quit [Ping timeout: 272 seconds]
stan has quit [Quit: Leaving]
Phrogz has joined #ruby
<adaedra> ☹
<apeiros> so, 20min later, 300 lines of warnings at startup are gone.
djbkd has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
livathinos has quit [Ping timeout: 272 seconds]
rdark has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
Phrogz has quit [Ping timeout: 244 seconds]
chinmay_dd has quit [Read error: Connection reset by peer]
davedev24 has joined #ruby
<DylanJ> given some file data. anyone have any tips for getting a mime type? currently i'm piping it into file and running --mime. Anyone have better ideas?
mxrguspxrt has joined #ruby
<apeiros> DylanJ: ruby filemagic gem
Siyfion has joined #ruby
<apeiros> ruby-filemagic is even the name :)
<DylanJ> apeiros: sweet thanks.
ohaibbq has quit [Quit: Leaving...]
phutchins2 has joined #ruby
tomaz_b has joined #ruby
davedev24 has quit [Ping timeout: 244 seconds]
GriffinHeart has quit [Remote host closed the connection]
axl_ has joined #ruby
mxrguspxrt has quit [Ping timeout: 272 seconds]
GriffinHeart has joined #ruby
phutchins2 has quit [Ping timeout: 260 seconds]
Rollabunna has joined #ruby
bodgix has quit [Ping timeout: 246 seconds]
shock_one has joined #ruby
pocketprotector has quit [Ping timeout: 255 seconds]
joonty has quit [Read error: Connection reset by peer]
<yorickpeterse> monring
joonty has joined #ruby
Rollabunna has quit [Ping timeout: 264 seconds]
leafybasil has quit [Remote host closed the connection]
shock_one has quit [Remote host closed the connection]
shock_one has joined #ruby
shock_one has quit [Read error: Connection reset by peer]
shock_one has joined #ruby
Newbie0086 has joined #ruby
JoshuaPaling has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rbowlby has quit [Remote host closed the connection]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeSeth has joined #ruby
Muhannad has joined #ruby
shock_one has quit [Ping timeout: 265 seconds]
aotg has quit [Quit: ZNC - http://znc.in]
Silox| has joined #ruby
pocketprotector has joined #ruby
<SebastianThorn> I got a program that iterates over files in a directory and then moves them elsewhere. The files gets in to the directory gets there by ftp, can i know if the file in the dir is currently beeing transfered into the directory?
aotg has joined #ruby
quimrstorres has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<SOLDIERz> Hello everyone I got a problem at the moment managing two ruby version with chruby ruby-2.2.1 and ruby-2.2.2 when switching between them I will be stucked to one version every time
astrobu__ has quit [Remote host closed the connection]
<SOLDIERz> I think it's related to the package build where share libraries are enabled
marr has joined #ruby
shock_one has joined #ruby
shock_one has quit [Read error: Connection reset by peer]
<jhass> SOLDIERz: can you elaborate a bit? you chruby 2.2.2 and ruby -v says 2.2.1 or what?
charliesome has quit [Quit: zzz]
<SOLDIERz> jhass correct
quimrstorres has joined #ruby
<jhass> SebastianThorn: uh, you probably could try to parse the output of lsof, not much beyond that (well, watching if the filesize changes, which is probably even more hassle)
bodgix has joined #ruby
anisha has joined #ruby
<SebastianThorn> jhass: size is not consistent
<jhass> SOLDIERz: what's echo $RUBIES ?
<SebastianThorn> ohh, changes
<SebastianThorn> ok
<apeiros> SebastianThorn: the common way I have seen is by providing a sha along with files and/or a metadata file
<apeiros> *sha+size
<SOLDIERz> jhass /opt/rubies/ruby-2.2.1 when I already switched to 2.2.2
mrmargolis has joined #ruby
<SebastianThorn> apeiros: ahh, ok. i understand
<apeiros> with waiting for size to stop changing you have to define a threshold for how long a file must no longer be changing
<jhass> SOLDIERz: but chruby without any arguments lists 2.2.2 ? oO
<SOLDIERz> jhass yes
<jhass> you're sure you've shown the entire output of echo $RUBIES? it shouldn't matter which ruby is active
djbkd_ has joined #ruby
ttilley has joined #ruby
ttilley has quit [Changing host]
ttilley has joined #ruby
Vile` has quit [Ping timeout: 264 seconds]
leafybasil has joined #ruby
<SOLDIERz> jhass Yes of course but that's the problem I'm facing and I dont know how to fix it
c0m0 has joined #ruby
Vile` has joined #ruby
<Ox0dea> SOLDIERz: How about `echo ${RUBIES[@]}`?
<jhass> SOLDIERz: so, you got /opt/rubies or $HOME/.rubies and if so what folders beneath them?
mrmargolis has quit [Ping timeout: 240 seconds]
texasmade has quit [Ping timeout: 240 seconds]
allomov has joined #ruby
tubuliferous has joined #ruby
<SOLDIERz> Ox0dea jhass /opt/rubies/ruby-2.2.1 /opt/rubies/ruby-2.2.2
stamina has joined #ruby
<jhass> what does /opt/rubies/ruby-2.2.2/bin/ruby -v says what?
<jhass> er, s/what//
djbkd_ has quit [Ping timeout: 246 seconds]
Renich has joined #ruby
charliesome has joined #ruby
nini1294 has joined #ruby
stan has joined #ruby
<SOLDIERz> jhass ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
<Ox0dea> Bollocks.
<SOLDIERz> thats the funny thing and I think it's related to the shared libraries
f4cl3y has joined #ruby
CustosLimen has quit [Ping timeout: 250 seconds]
<jhass> how did you install 2.2.2?
<pipework> If I were answering, I'd probably say, "Half-drunk"
<Ox0dea> Manually, with `cp`, uphill both ways.
tubuliferous has quit [Ping timeout: 255 seconds]
vali has left #ruby ["Leaving"]
<SOLDIERz> They are installed trough rpm in the directory /opt/rubies
krz has joined #ruby
<jhass> who build the rpm?
eGGsha has joined #ruby
<SOLDIERz> I by myself
<jhass> check your process in doing so
<jhass> you probably got the 2.2.1 sources in your 2.2.2 package
<jhass> and forget about the "shared libraries" stuff, that won't ever affect the output of ruby -v
<SOLDIERz> jhass oh okay already checked it five times there are different files
mutuma has joined #ruby
<jhass> I don't know what to tell you, but the observable facts speak otherwise
blacksmustgoaway has joined #ruby
charliesome has quit [Quit: zzz]
tuelz1 has joined #ruby
<blacksmustgoaway> are there any fun ruby exercises for ruby?
<jhass> blacksmustgoaway: check exercism.io, codewars and the ruby koans
<blacksmustgoaway> thanks jha :)
<blacksmustgoaway> jhass
postmodern has quit [Quit: Leaving]
nini1294 has quit [Ping timeout: 265 seconds]
<SOLDIERz> jhass Yeah I understand your point the problem at least is if I install a single version everything works fine. So lets say I just install ruby-2.2.1 everything is working as expected and ruby -v is returning me the right things
apfeluser has joined #ruby
<jhass> SOLDIERz: that says nothing, surprising would be if you install only 2.2.2 and it'd properly report 2.2.2
tuelz1 has quit [Ping timeout: 272 seconds]
CustosLimen has joined #ruby
<SOLDIERz> jhass yes it is
<shevy> god man
<shevy> just install 2.2.2 and remove everything else
<SOLDIERz> and that what makes we wonder whats happening there
<jhass> SOLDIERz: can you share your rpm's?
skade has joined #ruby
<SOLDIERz> sure
arup_r has joined #ruby
Newbie0086 has quit [Quit: 离开]
<SOLDIERz> jhass
<SOLDIERz> shevy just stop trolling -.-
<shevy> I am dead serious
Guest26862 has quit [Quit: Leaving]
GriffinHeart has quit [Remote host closed the connection]
TvL2386 has quit [Quit: Ex-Chat]
<SOLDIERz> shevy Yeah and I'm serious with my request here so it's good that are people here which want to help and are not like you save it for yourself don't need your comment on that! Thanks!
TvL2386 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
charliesome has joined #ruby
Rollabunna has joined #ruby
<darix> SOLDIERz: unless you changed the libdir and so on for your ruby rpms or use completely distinct prefixes
<darix> those 2 packages might have file conflicts
tkuchiki has quit [Remote host closed the connection]
<darix> and then i wouldnt wonder if you have problems
<SOLDIERz> darix ah okay so you recommend I should use define prefixes for every dir?
tkuchiki has joined #ruby
<darix> SOLDIERz: i would worry about having rpms for 2.2.1 and 2.2.2
<darix> we usually package per major branch
pocketprotector has quit [Ping timeout: 244 seconds]
Rollabunna has quit [Ping timeout: 244 seconds]
jcoe has quit [Ping timeout: 256 seconds]
<jhass> wth, i don't even... what does rpm do there? oO
<SOLDIERz> darix I am and it's not my decision discussed this several times with the R&D Department and every time the same outgoing so dont want to take it further
<SOLDIERz> jhass it installs ruby in the specific version under /opt/rubies
<darix> jhass: rpm is a very nice way to deploy ruby
<darix> just as is deb
bruno- has joined #ruby
<jhass> darix: no, I mean I see the issue too with their packages
<darix> jhass: if he really has file conflicts then yes it is a packaging issue.
<jhass> I don't understand how installing both at the same time can make /opt/rubies/ruby-2.2.2/bin/ruby -v and /opt/rubies/ruby-2.2.1/bin/ruby -v say the same thing while installing just one works
<jhass> d'oh, libruby.so.2.2 => /opt/rubies/ruby-2.2.1/usr/lib64/libruby.so.2.2 (0x00007fbde35a3000)
<jhass> really?
<jhass> and it affects even -v?
minmax has quit [Quit: WeeChat 0.4.3]
mutuma has quit [Ping timeout: 250 seconds]
<SOLDIERz> darix Do you got an idea how I could easy fix my rpm because you got a really complex one there
tuelz1 has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
<jhass> do you already compile with --libexecdir= set?
<jhass> nvm, I'll just look at rbconfig
<SOLDIERz> jhass nope
Hounddog has joined #ruby
pocketprotector has joined #ruby
_blizzy_ has quit [Ping timeout: 265 seconds]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nini1294 has joined #ruby
<darix> SOLDIERz: if you have a distinct --prefix for each rpm
<darix> you should be fine
<darix> otherwise i can check later
<SOLDIERz> darix this is actually my configure in the spec
<ruboto> SOLDIERz, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/74ae5445be3f34c5539b
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<jhass> well, the issue is that rpm generates a /etc/ld.conf.d/rubyxxx.conf that adds each prefixes lib64 to the load path
<jhass> so the 221 one comes first due to sorting and the 2.2.2 binary loads that libruby.so instead of its own
tuelz1 has quit [Ping timeout: 260 seconds]
<jhass> --with-soname= or even just --with-rubylibprefix= might help
mutuma has joined #ruby
htmldrum has joined #ruby
<SOLDIERz> jhass cool
stan has quit [Quit: Leaving]
<darix> ugh
<darix> dont create ld.conf.d stuff
<darix> it should set the proper rpath in the binaries
<SOLDIERz> darix okay how should I do it better
<SOLDIERz> at the moment I got --disable-rpath
sdothum has joined #ruby
spider-mario has joined #ruby
<darix> yeah
<darix> speak about shooting yourself in the foot
htmldrum has quit [Ping timeout: 240 seconds]
<SOLDIERz> so everything should be fine just throw out ldconfig
<SOLDIERz> stuff
norc has joined #ruby
norc has quit [Changing host]
norc has joined #ruby
norc has quit [Changing host]
norc has joined #ruby
<jhass> darix: I don't see those files in the rpm, looks like they're generated on install?
allomov has quit []
ndrei has quit [Ping timeout: 265 seconds]
<adaedra> Let's put everyone on LFS, so no one will be affected by distribution's decisions
Phrogz has joined #ruby
mutuma has quit [Ping timeout: 260 seconds]
doertedev has joined #ruby
Rickmasta has joined #ruby
<norc> Hi. How do I access an instance variable inside a define_method block? http://pastie.org/10321702
charliesome has quit [Quit: zzz]
Renich has quit [Ping timeout: 264 seconds]
JoshuaPaling has joined #ruby
<SOLDIERz> darix Let you know if it works
Phrogz has quit [Ping timeout: 272 seconds]
<norc> Ah nevermind. self. instance_variable_get(:"@apple") does the trick
stan has joined #ruby
eGGsha has joined #ruby
gwendall has joined #ruby
<jhass> no need for the self.
<norc> jhass: Ah neat. :)
<jhass> norc: and actually also no need for the class_eval in your example and just @apple does seem to work here
MasterPiece has joined #ruby
<jhass> >> class Foo; def initialize; @apple = "red"; end; define_method(:bar) do @apple; end; end; Foo.new.bar
<ruboto> jhass # => "red" (https://eval.in/409596)
kp666 has joined #ruby
kp666 has joined #ruby
<norc> jhass: Well, Im writing a class method at the moment. I was just trying to reduce the problem as much as possible. :)
<shevy> adaedra I do that!
nini1294 has quit [Ping timeout: 255 seconds]
<jhass> as you see not always helpful, who knows what there's to optimize in your real code ;)
Ilyas has quit [Ping timeout: 246 seconds]
Guest32 has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
Ilyas has joined #ruby
<norc> jhass: Yeah. But I wonder why I can omit the class_eval there.
RegulationD has joined #ruby
<jhass> because self and the definee is already what class_eval would change it to
Rollabunna has joined #ruby
nini1294 has joined #ruby
unshadow has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
<norc> jhass: fair enough. Since you seem to want to see what Im doing: http://pastie.org/10321726
Rollabunna has quit [Ping timeout: 244 seconds]
<norc> I just want to dynamically generate accessor functions for a Hash.
<norc> Without exposing the Hash directly since that backend is subject to change
<jhass> alright, as said you can omit the self. there. and I'd do "#{key}="
unshadow_ has quit [Ping timeout: 246 seconds]
<jhass> but not much that can go wrong there otherwise
psy_ has quit [Ping timeout: 244 seconds]
<jhass> perhaps extract the method into a module that you can extend your class with
<norc> Neat. I presume the interpolation automatically calls to_s then ?
<jhass> yeah
<norc> Okay yeah that is a lot cleaner than. And definitely - I intend on reusing this code anyway.
curses_ has joined #ruby
pabloh has quit [Quit: Saliendo]
tomaz_b has quit [Quit: Leaving]
JoshuaPaling has quit [Quit: Textual IRC Client: www.textualapp.com]
curses_ has quit [Ping timeout: 244 seconds]
jimms has joined #ruby
chills42 has joined #ruby
Kyuujitsu has joined #ruby
bruno- has joined #ruby
chills42 has quit [Remote host closed the connection]
chills42 has joined #ruby
charliesome has joined #ruby
ruby-user72722 has joined #ruby
<ruby-user72722> Hello!
<jhass> hi
<ruby-user72722> May I ask, is Ruby really good for desktop applications? :D
<daxroc> Morning all
<adaedra> hi
<DefV> ruby-user72722: it's usable but I wouldn't recommend it
Igorshp has joined #ruby
<daxroc> Anyone recommend tools for debuging a local to remote ssl connection. (don't have control or access to the remote certs)
<shevy> ruby-user72722 you can use e. g. ruby-gnome
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> ruby-user72722 it's quite a lot of work in general though
<adaedra> daxroc: ssh -v ?
<ruby-user72722> DefV: Thank you for the fast reply, but my target is only for command-line applications.
<bnagy> daxroc: what's the issue?
<shevy> lol
<ruby-user72722> shevy; thank you for the GUI suggestion :D
mxrguspxrt has joined #ruby
<DefV> ruby-user72722: even that depends on your use case and target audience
<jhass> ah, desktop application sounds like GUI ;)
<ruby-user72722> jhass: my bad :(
<jhass> doing CLI tools is certainly workable
<shevy> I use ruby-gnome quite a lot, it's ok but I always found it too much hassle, especially nowadays. html/css/javascript are easier than the bindings :\ :/
<jhass> many great libraries for that in fact
bruno- has quit [Ping timeout: 240 seconds]
Kyuujitsu has quit [Ping timeout: 272 seconds]
<shevy> I can have fancy effects via jquery... this be a head scratcher when I try the same in rubygnome
<ruby-user72722> jhass: How about deploying them with external libraries?
<adaedra> itt, people thinking web applications and websites are the same.
lele is now known as Guest24
<adaedra> er
phutchins has joined #ruby
<adaedra> thinking applications and*
<ruby-user72722> I don't have interest with ruby on rails (or any web programming)
<ruby-user72722> but I quite love the syntax, especially the block and 'closer' (end)
<SOLDIERz> darix /opt/rubies/ruby-2.2.1/bin/ruby: error while loading shared libraries: libruby.so.2.2: cannot open shared object file: No such file or directory
wpp has joined #ruby
juanpablo_ has joined #ruby
<ruby-user72722> shevy: Why note ruby-gtk+3?
<shevy> ruby-user72722 well harness the power of the commandline then :D
<jhass> ruby-user72722: you'd typically package the tool up as gem and publish it on rubygems.org. Rubygems is the package manager that comes with ruby and can handle dependencies just fine
<shevy> ruby-user72722 I dunno, it took me ages to switch and update from ruby 1.8.x to 2.2.x; I still have not switched to gtk3 for the most part
jimms_ has joined #ruby
<jhass> SOLDIERz: run ldd on it
<shevy> I think I wrote about ... 800 or so ruby-gnome files, still have not updated all of them, only about 20%
mrmargolis has joined #ruby
<ruby-user72722> jhass: I'm a very beginner with Ruby and the environment. May I ask will it auto install the dependencies (like apt)
<jhass> ruby-user72722: yes, I thought I just said so
<ruby-user72722> shevy: wow! That's a lot of code you had written!
jimms has quit [Read error: Connection reset by peer]
<shevy> ruby-user72722 yeah but this is bad, I want to write less not more :(
<jhass> ruby-user72722: and the good part is that he never shares it with anyone
jimms has joined #ruby
nish1294 has joined #ruby
sinkensabe has joined #ruby
_blizzy_ has joined #ruby
juanpablo_ has quit [Ping timeout: 256 seconds]
<SOLDIERz> jhass ldd? which way ldd /opt/rubies?
<ruby-user72722> jhass: Great! Anyway, I'm also looking to package ruby gems as .deb package, but by google for them, only output advanced results
<jhass> SOLDIERz: on the binary of course, ldd /opt/rubies/2.2.2/bin/ruby
xnr has quit [Quit: <3]
<jhass> ruby-user72722: I doubt you'll really need that
sepp2k1 has joined #ruby
<jhass> rubygems comes with ruby, so everybody just needs to apt-get install ruby and can then gem install your_app
sepp2k has quit [Ping timeout: 246 seconds]
nini1294 has quit [Ping timeout: 244 seconds]
<ruboto> SOLDIERz, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/049feed8381363906827
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<jhass> SOLDIERz: ^ stop ignoring the message ;)
tubuliferous has joined #ruby
mrmargolis has quit [Ping timeout: 246 seconds]
jimms_ has quit [Ping timeout: 244 seconds]
<ruby-user72722> jhass: Oh! I see!
dmolina has quit [Read error: Connection reset by peer]
dmolina has joined #ruby
<adaedra> jhass: but muh pastebin
<jhass> SOLDIERz: any more helpful with -v or perhaps -u?
bruno- has joined #ruby
OrbitalKitten has joined #ruby
<SOLDIERz> jhass nope same error message
<jhass> adaedra: I wish apeiros would fix the DB so ruboto properly scolds the repeated offenders :/
<apeiros> that's a db issue?
<jhass> idk what's the issue
<jhass> but I can hardly debug it
<jhass> I just don't know what else it could be
<apeiros> well, if the *guys* wouldn't be bitching so much about having to change a single word in their vocabulary, I could have made the update. but now I had to use the time for politics…
<adaedra> but muh privilege
<ruby-user72722> jhass: shevy: Defv: Thank you for enlightening the issue! I appreciate it! :D
_blizzy_ has quit [Read error: Connection reset by peer]
<apeiros> jhass: what do you need for debugging?
<jhass> apeiros: you know, my public ssh key is public, just saying :P
sarkyniin has joined #ruby
livathinos has joined #ruby
<apeiros> ok, so I guess that's code for "ssh access"
<jhass> I'd hope there's something enlightening in the logs
auzty has quit [Quit: Leaving]
tubuliferous has quit [Ping timeout: 246 seconds]
<adaedra> apeiros: it's code for “pet me”
_blizzy_ has joined #ruby
rodfersou has joined #ruby
leitz has joined #ruby
<ruby-user72722> Oh! I also forgot to ask this - "How to install gems specifically for Jruby on Ubuntu 14.04 installe from apt?"
<jhass> jruby -S gem install foo
xnr has joined #ruby
<shevy> from apt!
<jhass> iirc
tkuchiki has quit [Remote host closed the connection]
<jhass> shevy: the jruby, not the gem
<shevy> ah
<ruby-user72722> jhass: I already tried that, but it always output openssl errors
<jhass> well, had over to #jruby with those
<ruby-user72722> jhass: Oh! Thank you for mentioning that channel!
<ruby-user72722> I gotta go! Thanks again everyone!
ruby-user72722 has quit [Quit: Page closed]
moeSeth has quit [Quit: Connection closed for inactivity]
ruby-lang953 has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruby-lang953> Hi! May I ask, which ruby book are good to use as learning source for beginners?
<shevy> the pickaxe
ledestin has joined #ruby
sarkyniin has quit [Ping timeout: 240 seconds]
[k- has joined #ruby
<ruby-lang953> Thank you! :D
ruby-lang953 has quit [Client Quit]
<jhass> shevy: :(
<jhass> 1.9.2 :((
<[k-> :(((
<shevy> I don't think there are any newer ones from them
<adaedra> ☹ ☹ ☹ ☹ ☹ ☹
dmolina has quit [Read error: Connection reset by peer]
<shevy> perhaps they abandoned ruby meanwhile
dmolina has joined #ruby
<jhass> so maybe no longer recommend them
<adaedra> my terminal doesn't like those symbols :/
<shevy> no the book is good
ledestin has quit [Client Quit]
<adaedra> It can't be good if it's still for 1.9.2
axl_ has quit [Ping timeout: 245 seconds]
<shevy> why not?
<adaedra> because ruby evolved since
<shevy> 1.8 was better than 2.x :)
charliesome has quit [Quit: zzz]
<jhass> let's see, 1.9.3, 2.0, 2.1, 2.2, close to 2.3, basically five major releases since
<adaedra> it's indicated by something we call a 'version number'
nofxx has quit [Read error: Connection reset by peer]
<shevy> oh yeah
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
<[k-> don't we follow semver now
<shevy> windows 10
<[k-> that is 1 major release and 4 minor
<jhass> [k-: with 2.1 we do, somewhat
<jhass> not too strictly tbh
DoubleMalt has quit [Remote host closed the connection]
<adaedra> Anyway, ruby 1.9.2 was out when?
<jhass> when was your mother born?
<jhass> around that
<adaedra> :<
<[k-> 2010
<flughafen> does minitest not have an assert_false?
banister has quit [Ping timeout: 244 seconds]
<Rinzlit> do you guys use vagrant?
<jhass> ?vagrant Rinzlit
<ruboto> Rinzlit, I don't know anything about vagrant
<jhass> meh, sorry I thought I set that up
<Rinzlit> Its some kind of virtual setup envirement thingy
<jhass> !fact mk vagrant please join #vagrant for help with it.
<ruboto> jhass, I will remember that vagrant is please join #vagrant for help with it.
<[k-> lets vote for apeiros!
<shevy> these guys won last year: http://www.ruby.or.jp/en/news/20141010.html
<Rinzlit> The question was if any of you guys use it
<Rinzlit> I don't need help with it xD
<shevy> I don't use vagrant
<shevy> [k- first guy published a book, that must have been a lot of work :(
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Rollabunna has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<jhass> ?guys Rinzlit
<ruboto> Rinzlit, You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
<jhass> and no, it's too much overhead for me
skyrocker1 has left #ruby [#ruby]
<shevy> [k- I could nominate your one-liners :)
<jhass> I stick to simple chroots where I can
<shevy> jhass-in-prison
last_staff has joined #ruby
<Rinzlit> jhass was that really needed....
<[k-> > nominate my one-liners
<shevy> do the projects have to be useful in order to be nominated?
sdothum has joined #ruby
<jhass> Rinzlit: yes
<shevy> if not then we could nominate Ox0dea
<[k-> yay Ox0dea!
omegamike has joined #ruby
<[k-> wait a minute, nomination ended?!
f3ttX] has joined #ruby
<[k-> it just sends me here:
opalraava has quit [Quit: Changing server]
Rollabunna has quit [Ping timeout: 246 seconds]
sarkyniin has joined #ruby
<leitz> Trying to iterate over a nested hash fails. https://gist.github.com/LeamHall/2defbab02b89d8c20536
hackeron_ has joined #ruby
<leitz> It iterates all of them well, but i'm trying to figure out how to pull data from one particular nested item at a time.
dgutierrez1287 has joined #ruby
<shevy> well it's one month past now [k-
<maloik> leitz: unit['43'] is a hash, and youre passing it to show_trooper which in turn does unit['43'][1] which doesn't work
<maloik> see line 11
<[k-> oh i thought it was just yesterday
hackeron has quit [Ping timeout: 264 seconds]
<shevy> how many downloads for an average project on rubygems, would you estimate to be automatic downloads via bots/scripts/hooks?
<leitz> maloik, the file contains nested hashes. Yes, sadly, a numeric string.
<maloik> if I'm understanding youre code directly, you can simply get rid of line 10 and 11, and replace "this_trooper" with "trooper" in the rest of the method
<leitz> Lemme try that.
<jhass> leitz: for the loop you want unit.each do |_key, trooper| then
ldnunes has joined #ruby
Silox| has quit [Quit: Connection closed for inactivity]
<leitz> jhass, the loop actually works.
<jhass> leitz: with the current method, yes
<leitz> That's part of what has me confused.
blueOxigen has joined #ruby
<jhass> but it'll break if you change it to the (better) version maloik suggested
<jhass> leitz: the issue is that Hash.each yields two element arrays of [key, value]. So trooper in your loop is that array, trooper[1] in the method correctly retrieves the value
bluOxigen has quit [Ping timeout: 246 seconds]
<jhass> but when you do unit["43"] you directly get the value, so you're no longer passing the [key, value] array to show_trooper
<jhass> which is the better thing to do in fact, hence changing both, the method and the loop
<[k-> line1 = %w[ ... # is such a waste
<jhass> ah yeah, calling .each directly on the literal would be nice too
<[k-> not only is it less configurable, it also instantiates the object many times as well
<jhass> uh, what?
<leitz> Eliminating lines 10 and 11, and changing this_trooper to trooper in lines 14 and 16 give "./show_hash_fail.rb:14:in `[]': can't convert String into Integer (TypeError)"
<jhass> leitz: you didn't change the loop yet, right?
<leitz> jhass......plbbtthhhh......
dumdedum has quit [Quit: foo]
<leitz> Okay, that works for the individual call. Lemme go change the loop.
lannonbr has joined #ruby
<leitz> Much better.
<jhass> leitz: now also get rid of the line1 local which you don't really need as [k- noted
<leitz> The "line1" bit is because it needs to print stuff out in a particular order. Hashes in Ruby 1.8 aren't quite so ordered.
mutuma has joined #ruby
<jhass> just do %w[a b c].each do |item|
<jhass> :(
<leitz> Ah, lemme try that.
<jhass> why would you use Ruby 1.8
frem has quit [Quit: Connection closed for inactivity]
<leitz> jhass, because I support servers, and their ruby version is a patched 1.8.
<leitz> Not ideal, but that's where I am.
yfeldblum has quit [Ping timeout: 246 seconds]
<jhass> give everybody responsible a fat slap into the face from me then
<workmad3> leitz: 'not ideal' <-- that's an understatement
<leitz> And the %w[].each works nicely, thanks!
<leitz> Talk to Red Hat, not me.
<leitz> You can slap them again for upstart and the other silly init replacement, too.
<leitz> systemd. Ugh.
<adaedra> sigh
livathinos has quit [Ping timeout: 272 seconds]
<leitz> The good news is that I've been sick with bronchitis all week. Staying home has givne me time to work on my coding skills. :)
ndrei has joined #ruby
<shevy> leitz also not a systemd friend? no worries, it'll get bigger and "more integrated" :D
startupality has joined #ruby
erts has joined #ruby
<[k-> it already has your password
* leitz goes to URL, after smacking shevy...
<adaedra> but muh init scripts
erts has quit [Client Quit]
iceyec has joined #ruby
withnale_ has joined #ruby
<leitz> workmad3, the issue with a secure server is that i want less software on it, not more. While Ruby 2+ is probably a much better option, having to maintain it on several hundred servers, as well as whatever gems I might want to use, becomes a chore.
erts has joined #ruby
<workmad3> leitz: and so you stick with unsecure software that no longer receives any official maintenance?
<leitz> Instead, I code to 1.8. Since I don't really code well that's not a high challenge. If I get good enough that it makes a difference, I'll get a job as a ruby coder.
<leitz> All software is insecure and non-performant.
<[k-> touché!
<leitz> It's just where you are on the range.
<workmad3> leitz: 1.8 is officially so :P
<leitz> Can't argue that point. RHEL 6 ships with 1.8.7, patched by RH.
<leitz> So until we're all sysemd'd up the wazoo with RHEL 7, we're stuck.
<leitz> Honestly, the more I work with RH, the more I want to make my own distro.
<adaedra> there's a 1.9 in SPL iirc
<adaedra> still not perfect, but a bit less worse
<jhass> don't, you just end up with arch :P
<leitz> I've used Puppet, which ships with 1.9.x.. Puppet 4.x ships with Ruby 2.x, I think.
<adaedra> er
<adaedra> SCL*
CloCkWeRX has joined #ruby
houhoulis has joined #ruby
<shevy> hmm
<shevy> Puppet seems to be fairly important, I remember a guy who was in the same class with me, is now working with puppets in the UK
<adaedra> ?puppet
<ruboto> Please join #puppet for help with it.
s00pcan has joined #ruby
juanpablo_ has joined #ruby
scripore has joined #ruby
<[k-> ?aboose adaedra
<ruboto> adaedra, I don't know anything about aboose
prestorium has joined #ruby
rbowlby has joined #ruby
<adaedra> frankly, I don't either.
mutuma has quit [Ping timeout: 240 seconds]
<leitz> Puppet, and it's ilk, are really Good Things (tm).
<workmad3> leitz: agreed (although I'm more a chef man, personally)
<leitz> Puppet is a Configuration Management tool that lets you maange large numbers of servers automatically.
senayar has quit [Remote host closed the connection]
<shevy> adaedra but I don't need any help!
<leitz> workmad3, I was, until I saw it drop 8,000+ files on my server. Ugh!
<adaedra> I don't know what to answer to that.
<jhass> so many puppetmasters these days ... (let's see who gets the reference)
senayar has joined #ruby
<maloik> leitz: and that was a chef problem? oO
<[k-> puppet masters control the puppets!
<leitz> maloik, remember, all software is insecure. If you add 8,000 insecurities, yeah, it's an issue.
* adaedra controls [k-
dorei has joined #ruby
<adaedra> o_O
<maloik> ... what?
<maloik> no, I'm asking if it was a chef problem
juanpablo_ has quit [Ping timeout: 256 seconds]
<maloik> if you write a ruby script to wipe your drive, then that's not a ruby issue
davedev24 has joined #ruby
<leitz> The original code, or the 8,000 files? Sorry. I'm still half out of it.
<maloik> whatever made the 8000 files disappear
<maloik> it sounds like you switched away from chef, or stopped liking it, because a bug in chef deleted your files
Siyfion has quit [Read error: Connection reset by peer]
<yorickpeterse> maloik: yo when's the update on Arrrcamp speakers coming out?
<workmad3> maloik: no, he dislikes it because (probably the server) had 8000 files
rbowlby has quit [Ping timeout: 260 seconds]
<maloik> yorickpeterse: asap I hope :( going to go over the list this afternoon, reach out etc, do some announcements if I find the time
<leitz> Ah, sorry. Putting Chef on a node added 8,000+ files to every node. Since I'm in the "less is better" camp, that was my objection.
<maloik> oh, lol... okay
<maloik> I understood "drop files" as "delete files"
<leitz> Chef itself ran fine. Well, when I could code it.. I was even less a coder then. :P
<yorickpeterse> maloik: ah
but3k4 has joined #ruby
<workmad3> leitz: ah, omnibus install of chef... that would include a bundled ruby + all libs so that it can be completely isolated
sinkensabe has quit [Remote host closed the connection]
apfeluser has quit [Read error: Connection reset by peer]
<leitz> Yup. The isolation part if a good idea, but that means you have to upgrade frequently to stay patched.
<leitz> Using node native code limits you heavily; as in Ruby 1.8.7. :)
apfeluser has joined #ruby
<leitz> Also, before I nap out, let me plug someone else's book. "PRactical Object Oriented Design in Ruby". Very good for us OOP newbs.
quimrstorres has joined #ruby
<leitz> The trooper issue was based on me trying to rethink a bunch of functions into a class structure.
<workmad3> leitz: that's a somewhat poor argument... if you want to stay patched, you'd need to upgrade exactly as frequently as if those parts weren't isolated... but instead of one single tested update of everything, it would be an openssl upgrade, a ruby upgrade, a chef gem upgrade, a rubygems upgrade...
tinyhippo has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<leitz> workmad3, sorry, it's a different patch structure. I'm not against the osolated bundle at all, as long as the vendor issues patches in good time.
jgt has quit [Ping timeout: 250 seconds]
Phrogz has joined #ruby
<workmad3> leitz: yeah... 'vendor issues patches in good time' is really the biggest problem with distro package repos ;)
<leitz> So far they don't seem to. Hence all the Java 1.4 trash laying around.
<workmad3> leitz: and rhel only having ruby 1.8...
skade has joined #ruby
<leitz> workmad3, yeah. I'm not at the Gentoo level, but still. That's one reason I don't like adding a lot of software, it means you have to test and patch a lot more often.
joonty has quit [Quit: joonty]
<workmad3> anyway, I need to run
<workmad3> hf all
<leitz> Thanks for your help!
last_staff has quit [Quit: last_staff]
ips|malc has joined #ruby
DoubleMalt has joined #ruby
<leitz> jhass, arch has Ruby 2.2 in the extra repo. Is there a base version installed?
rideh has joined #ruby
Phrogz has quit [Ping timeout: 250 seconds]
<jhass> you don't run arch without the extra repo enabled, heck probably not even without the community repo enabled
<jhass> the different repos more categorize who has commit access to them
eGGsha has joined #ruby
bronson has quit [Remote host closed the connection]
<leitz> Ah.
<jhass> but even to commit to community you have to get a so called trusted user
<leitz> I still like the "minimal is best" approach.
<jhass> the untrusted stuff is in the AUR
Siyfion has joined #ruby
<jhass> enabling the repo != installing everything
ndrei has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 244 seconds]
<leitz> Hmm... RHEL/CentOS 7 uses Ruby 2.0.0.
<tinyhippo> just use rvm like everyone else
atomical has joined #ruby
atomical has quit [Client Quit]
<jhass> which officially EOLs in february 2016 btw
<[k-> > rvm minimal
<jhass> leitz: I think my basic arch chroots usually end up around 150-250M
startupality has quit [Quit: startupality]
<leitz> jhass, nice!
startupality has joined #ruby
<leitz> Though a 30M NetBSD on Sparc is hard to beat. :)
tinyhippo has left #ruby [#ruby]
<jhass> leitz: the standard arch kernel is 73M alone, so... :P
<jhass> I actually should take care to not install it
startupality has quit [Client Quit]
<leitz> jhass, understood. The NetBSD reference was from a few years ago, so it's not apples to apples.
<leitz> Still, there's a continuum between "just the right software" and "has aged enough that all the other big tools work on it".
nzst has joined #ruby
<leitz> For example, if you use a large backup solution, and it doesn't support your OS, then you're hosed.
Rollabunna has joined #ruby
<jhass> yeah, my comment is more that if you'd do your custom distro you'd likely end up not doing versions (=rolling release) and applying as few patches as possible, which both matches arch's philosophy
rsc___ has quit [Quit: rsc___]
Kyuujitsu has joined #ruby
CustosLimen has quit [Ping timeout: 272 seconds]
rsc___ has joined #ruby
startupality has joined #ruby
Igorshp has quit [Remote host closed the connection]
kully3xf has joined #ruby
Rollabunna has quit [Ping timeout: 244 seconds]
niiamon has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
Siyfion has quit [Quit: Textual IRC Client: www.textualapp.com]
platzhirsch has joined #ruby
erts has quit [Quit: erts]
jas02 has quit [Quit: jas02]
joonty has joined #ruby
startupality has quit [Quit: startupality]
rsc___ has quit [Quit: rsc___]
rideh has quit [Quit: zap]
sankaber has joined #ruby
MasterPiece has quit [Ping timeout: 246 seconds]
rideh has joined #ruby
rsc___ has joined #ruby
startupality has joined #ruby
unshadow has quit [Quit: leaving]
startupality has quit [Client Quit]
ndrei has joined #ruby
riotjon__ has quit [Remote host closed the connection]
CustosLimen has joined #ruby
diegoviola has joined #ruby
curses has joined #ruby
<kully3xf> how can I install rake with out gem install and with out yum install
<kully3xf> I have the git repo cloned
dagda1 has joined #ruby
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> not sure what you mean
<jhass> you mean without network access or something like that?
<jhass> rake is bundled with ruby btw
skade has joined #ruby
sinkensabe has joined #ruby
<jhass> but maybe your distro unbundled it
<apeiros> Kully3xf: "how can I install something without the designated installer" - makes little sense. why do you want to do that?
<ddv> Kully3xf: what is your _real_ problem?
<kully3xf> so basically we have this one super locked down server - on prem. and I'm trying to get chef-zero installed on it because we need to manage the applications on it etc, but every turn there's something missing and it's yum repos are hella tight and gem install is running through a proxy
<kully3xf> which ruby /usr/bin/ruby
<apeiros> Kully3xf: well, you could try to find an old setup.rb
<apeiros> that'd install rake into site_ruby
<apeiros> (I believe - it's been a while)
<kully3xf> I just installed ruby from repo
<kully3xf> yesterday
<kully3xf> that was on there
niiamon has quit [Remote host closed the connection]
<apeiros> no idea which one I'd use today
pingpong11 has joined #ruby
sinkensabe has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
<kully3xf> great. I'll try the git repo
<pingpong11> 'lo, i see this line ManrillMailer.deliver_bp_account_activation
<apeiros> oh
<pingpong11> the method is bp_account_activation
<pingpong11> how does the prefix work?
<apeiros> Kully3xf: by "without gem install", do you really mean "without gem install for a remote gem"?
<kully3xf> yea
<kully3xf> I can gem install local .gem
<kully3xf> but I tried that on chef-zero and it failed also
<apeiros> Kully3xf: bundle it up as a gem and install it locally
<apeiros> well, "it failed" is nothing I can help with.
<apeiros> but then again, chef-zero probably means I can't help anyway
sinkensabe has joined #ruby
<apeiros> pingpong11: probably method_missing. see Object#method_missing
sinkensabe has quit [Remote host closed the connection]
<pingpong11> it calls it fine, but i'm just wondering what it's doing
jtdoncas has joined #ruby
<pingpong11> how is it prefixing it like that
<kully3xf> [root@hostname chef-zero]# gem install chef-zero-4.2.3.gem ERROR: While executing gem ... (URI::InvalidURIError) the scheme http does not accept registry part: onprem_host (or bad hostname?)
<apeiros> pingpong11: as said, it probably uses method_missing.
<kully3xf> that's after a gem build chef-zero.gemspec that went well
<leitz> Okay, I'm slow. I get floor and ceil, but what's the normal "round up at x.5, or down if less than that"?
<apeiros> Kully3xf: -y (without dependencies)
<apeiros> Kully3xf: you'll have to install the dependencies by hand yourself
<pingpong11> oh i misunderstood
<kully3xf> cool thanks
<apeiros> leitz: .round
<apeiros> >> [1.2.round, 1.6.round]
<ruboto> apeiros # => [1, 2] (https://eval.in/409698)
psy_ has joined #ruby
<kully3xf> yep worked. Cool thanks so much
dblessing has joined #ruby
livathinos has joined #ruby
sinkensabe has joined #ruby
sinkensabe has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
<leitz> aperios, thanks!
quimrstorres has quit [Remote host closed the connection]
pengin has joined #ruby
quimrstorres has joined #ruby
platosha has joined #ruby
tubuliferous has joined #ruby
<[k-> apeiros*
radgeRayden has joined #ruby
startupality has joined #ruby
tubuliferous has quit [Ping timeout: 264 seconds]
imperator has joined #ruby
imperator has left #ruby [#ruby]
senayar has quit [Remote host closed the connection]
skade has quit [Read error: Connection reset by peer]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
<leitz> Yeah...I blame being ill.
axl_ has joined #ruby
<SOLDIERz> jhass Do you probably got some idea left how to handle this ld thing? Because we are messing our heads and got no clue at the moment how to handle the tiny versions
<SOLDIERz> or darix probably?
<jhass> SOLDIERz: I'd still try changing the soname
<darix> SOLDIERz: you could do something like
kp666 has quit [Remote host closed the connection]
apfeluser has quit [Quit: Leaving]
<SOLDIERz> jhass so you mean --with-soname=ruby-1.9.2-64
<darix> yes
<darix> libruby2_2-2_2_2
Hounddog has quit [Read error: Connection reset by peer]
<darix> libruby2_2-2_2
<darix> is what we use as soname
<jhass> ^
pengin has quit [Remote host closed the connection]
<darix> SOLDIERz: read our spec file
<SOLDIERz> okay darix
<darix> SOLDIERz: the background story https://discourse.nordisch.org/t/ruby-packaging-next/22~
michael_mbp has quit [Excess Flood]
m0thman has joined #ruby
startupality has quit [Quit: startupality]
<SOLDIERz> darix Error 403 forbidden
<darix> SOLDIERz: without the ~ in the end
<darix> sorry
jgt has joined #ruby
michael_mbp has joined #ruby
arup_r has joined #ruby
arup_r has quit [Remote host closed the connection]
<SOLDIERz> cool thx
michael_mbp has quit [Excess Flood]
m0thman has quit [Quit: Textual IRC Client: www.textualapp.com]
rippa has joined #ruby
michael_mbp has joined #ruby
Zort0n has joined #ruby
jgt has quit [Ping timeout: 246 seconds]
rideh has quit [Ping timeout: 246 seconds]
gagrio has joined #ruby
chrisseaton has quit []
chrisseaton has joined #ruby
<SOLDIERz> darix and this would also work without all the ldconfig stuff
<darix> SOLDIERz: sure
<SOLDIERz> or need I still to do some ldd for ruby
<darix> i hope
<darix> SOLDIERz: at least if you use different sonames
<darix> you can add back your ld.conf.d stuff
sinkensabe has joined #ruby
<SOLDIERz> aah okay
<Rinzlit> What is the best way for a 3D array o-o
rideh has joined #ruby
startupality has joined #ruby
Igorshp has joined #ruby
niiamon has joined #ruby
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
ips|malc has joined #ruby
nutbunnies has joined #ruby
bronson has joined #ruby
jesse____ has joined #ruby
jesse____ has left #ruby [#ruby]
nutbunnies has left #ruby ["Textual IRC Client: www.textualapp.com"]
Rollabunna has joined #ruby
bonhoeffer has joined #ruby
<wpp> Rinzlit What?
CustosLimen has quit [Ping timeout: 246 seconds]
grios has quit [Ping timeout: 250 seconds]
bronson has quit [Ping timeout: 265 seconds]
jimms has quit [Remote host closed the connection]
wpp has quit [Quit: ZZZzzz…]
<Rinzlit> Whats the best way to do 3D arrays in ruby o.o
Rollabunna has quit [Ping timeout: 244 seconds]
devdazed has quit [Quit: Computer has gone to sleep.]
sinkensabe has quit [Remote host closed the connection]
JoshL has joined #ruby
linuxboytoo has joined #ruby
<apeiros> Rinzlit: define "best"
jgt has joined #ruby
<apeiros> [[[]]] # there, 3d array
mello has quit [Quit: Lost terminal]
pingpong11 has quit [Quit: Page closed]
malconis has joined #ruby
livathinos has quit []
dmolina has quit [Quit: Leaving.]
JimmyNeutron has quit [Ping timeout: 246 seconds]
<Rinzlit> Well they recommended hash's for 2D arrays .-.
troulouliou_div2 has quit [Quit: Leaving]
<Rinzlit> Thats why I was like kinda confused apeiros
<apeiros> "they"
mxrguspxrt has quit [Remote host closed the connection]
mrmargolis has joined #ruby
<apeiros> you know, the use-case *kinda* matters
blacksmustgoaway has quit [Ping timeout: 246 seconds]
<Rinzlit> Well if I wanted to do something like minecraft
<Rinzlit> And setup the blocks in a 3D array
<Rinzlit> How would you recommend doing it?
<apeiros> so you have a value in every "slot" in the 3d array?
<apeiros> i.e. it's not sparse, no empty cells
jimms has joined #ruby
<apeiros> in that case, I'd definitively NOT use a hash. I'd use either a flat array + mapping logic, or a nested array.
CustosLimen has joined #ruby
<Rinzlit> Oh okay o.o
TvL2386 has quit [Quit: Ex-Chat]
<Rinzlit> Thank you aperiros
* apeiros hits Rinzlit with a trout
<adaedra> :D
<apeiros> that's one major league class of a typo
<apeiros> srsly, use tab completion if you can't spell nicks :-p
<Rinzlit> Sorry started playing a league match
<Rinzlit> lol
<adaedra> calm down, abeiroz
prestorium has quit [Ping timeout: 244 seconds]
<apeiros> adaedra: silence. dead daedras don't talk.
<apeiros> also, it's apeibros
<adaedra> I'm not your bro, pal
<apeiros> I'm not your pal, friend
jgt has quit [Ping timeout: 264 seconds]
keeguon has joined #ruby
<keeguon> Hey! Might not be the best room to ask my question but whatever. I’m using jRuby 1.7.21 and compiling a Rails 3.2.22 app using warbler on a Linux machine. When I run the code in a Linux machine everything works fine. However when I try to boot it on Windows, it fails with an “blame_file!” error coming from ActiveSupport (side note: I’m using SQL Server on the Windows machine and MySQL on the Linux machine but the
<keeguon> drivers are correctly set). Since it was cryptic and I saw there was some shenanigans going on there in 2013 (https://github.com/jruby/jruby/issues/976) but couldn’t really pinpoint what was going on I decided to hack the “Kernel.require” call to log what was going on on boot. Somehow, upon requiring “rails/application/bootstrap” it require “active_support/notification” which causes a loop requiring it like a
<keeguon> gazillion times and then fails with a Java StackOverflowError. Do any of you guys might have an idea?
scripore has quit [Quit: This computer has gone to sleep]
<adaedra> ?guys
<ruboto> You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
<Rinzlit> Hey bros
<Rinzlit> Whats up?
<adaedra> I've already started enough "I'm not your" chains today.
<ljarvis> Rinzlit: not cool
scripore has joined #ruby
riotjones has joined #ruby
<Rinzlit> 1jarvis maybe I'm just lazy, but why have a command to tell people not to say "guys"
<adaedra> There is a command to kick your ass, too :)
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
paulcsmith has joined #ruby
<ljarvis> Rinzlit: so we don't have to type it out every time?
<Rinzlit> Thats kind of expected adaedra, but what isn't is to have people use specific words to address a crowd
bonhoeffer has quit [Quit: bonhoeffer]
<ljarvis> ?guys2
<ruboto> it doesn’t matter if it’s "normal"/gender neutral to say "guys" in your idiolect. "You guys" to refer to a mixed group is erasure. All we ask from you is to be a decent channel member and respect that. If you want to further discuss this, join #ruby-offtopic.
Feyn has quit [Quit: Leaving]
<maloik> is idiolect an actual work, or is it idiot+dialect?
<maloik> (honest question)
<ljarvis> it's an actual word
<maloik> s/work/word
<ljarvis> Idiolect is the variety of language unique to an individual.
<maloik> I see
<apeiros> seems to be too hot today again. people forget about google :-p
whippythellama has joined #ruby
<keeguon> Seems like my question was totally ignored in favor of this off-topic madness ^^
<apeiros> keeguon: might seem like that, but I read it and just don't have an answer.
tjohnson has joined #ruby
riotjones has quit [Ping timeout: 240 seconds]
<adaedra> or maybe people just don't have the answer, it's kind of specific keeguon
<adaedra> also, coucou
<maloik> yorickpeterse: http://2015.arrrrcamp.be
<maloik> first couple confirmed names
<apeiros> keeguon: only thing I can say is that a file which has been required should not be re-required again, i.e. require should just return
<yorickpeterse> maloik: such excite
juanpablo_ has joined #ruby
bonhoeffer has joined #ruby
<jhass> keeguon: #jruby might have better clues than us
<yorickpeterse> meanwhile I'm dealing with stupid race conditions leading to corrupted objects
<maloik> pretty proud of that lineup, and we still have 4 people that need to confirm
rideh has quit [Quit: zap]
<yorickpeterse> I swear the AWS SDK has been nothing but a pain
<yorickpeterse> maloik: what's the total amount of people?
<keeguon> adaedra: thought I’d be precise :). Also bonjour à toi!
apeiros changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/ || There have been 0 days since the last argument about "guys"
<maloik> yorickpeterse: remains to be seen but probably 12/13
<yorickpeterse> nice
chouhoulis has joined #ruby
<ljarvis> apeiros: not particularly in favour of bringing more attention to it in the topic though fwiw
<keeguon> apeiros: yeah that would be the expected behavior but eh it ain’t
<keeguon> jhass: thought I’d increase my chances by asking the question both here and there
choppington has joined #ruby
apeiros changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
livathinos has joined #ruby
<apeiros> ljarvis: bah, spoilsport
<ljarvis> <3
<jhass> ?crosspost keeguon
<ruboto> keeguon, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
<jhass> you should have said you already asked there ;)
davejlong has joined #ruby
livathinos has quit [Client Quit]
<apeiros> but I think it's time to remove "Welcome new users migrating from #ruby-lang!", been 2 months now. should be enough.
<adaedra> 2 months!?
<adaedra> already?!
benlovell has joined #ruby
<keeguon> jhass & ruboto: nobody seems very active on the jruby channel atm hence the crosspost since I wasn’t getting an answer
juanpablo_ has quit [Ping timeout: 244 seconds]
<leitz> I need to use a 4 element designation to identify an array of items. So array[0][0][0][0] will be one list and array[0][0][0][1] will be another. The array keys will be part of the item designation.
<adaedra> ?ruboto
<ruboto> I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
<jhass> keeguon: not complaining that you did crosspost, complaining that you didn't inform everybody of that fact ;))
david__ has joined #ruby
<ljarvis> leitz: what exactly are you asking? you can just build an array of arrays
<adaedra> I'd have used a 1d array and accessor methods like .at(x, y, z, Ω)
david__ is now known as daexploit
RegulationD has joined #ruby
daexploit is now known as zombiema
* leitz returns from coughing up half a lung
<leitz> Would it be better to use a multi-d array or a hash key of "0.0.0.1", etc?
nini1294 has joined #ruby
<maloik> I think it really depends on what you want to do and what your data looks like/represents
<leitz> So far ti seems that you can't create a multi-d array without doing each step in turn.
shterrett has joined #ruby
juanpaucar has joined #ruby
<jhass> ?xy
<ruboto> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
paulcsmith_ has joined #ruby
paulcsmith has quit [Read error: Connection reset by peer]
dimasg has joined #ruby
davejlon_ has joined #ruby
<zombiema> looking for coder can code recode metasploit exploit to python or ruby i pay via btc
<maloik> in before ban
<yorickpeterse> btc? I only accept Monopoly money
<yorickpeterse> that at least has some value
tennis_ has quit [Remote host closed the connection]
<leitz> As usual, it's for a game. The "node" items are a list of people in that team. The array keys/hash keys are the levels of unit. So "1.1.1.1" would be "1st Company, 1st Platoon, 1st Squad, 1st Team". Etc.
<lxsameer> I'm using bundler and when i run my project ruby complain about "can't loading a file" which I'm certain that that gem is installed and is a dependency of one of my dependecies.
<lxsameer> how can I debug this
jgt has joined #ruby
<adaedra> I have a 20 SEK bill, it's my last offer
<leitz> Sorry for the delays, I keep having to go cough my brains out.
<zombiema> yorickpeterse get a life
khebbie has joined #ruby
msnyon has joined #ruby
<jhass> leitz: don't worry, IRC is highly asynchronous in nature
benlovell has quit [Ping timeout: 272 seconds]
RegulationD has quit [Ping timeout: 260 seconds]
nish1294 has quit [Ping timeout: 265 seconds]
<yorickpeterse> zombiema: oh no, such burn
<adaedra> lxsameer: you use `bundle exec`?
<lxsameer> adaedra: yeah
<adaedra> lxsameer: gem is in gemfile and bundle install is up to date, with gem in .lock? Have a complete error message, maybe?
<maloik> leitz: problem is that you'd end up with something like army[0][0][0][0] as you mentioned previously. Why not use a hash, where the values are an array? army[:companies][0][:platoons][0] is a bit more obvious (although longer)
Phrogz has joined #ruby
davejlong has quit [Ping timeout: 255 seconds]
curses has quit [Quit: leaving]
devdazed has joined #ruby
<maloik> other than that I think I don't understand your actual problem/question
<jhass> leitz: Company = Struct.new(:platoons); Platoon = Struct.new(:squads); Squad = Struct.new(:squads); Team = Struct.new(:members)
cornerma1 has joined #ruby
<jhass> add initializers that assign the empty arrays
<ljarvis> Squad = Struct.new(:squads) wot
<jhass> eh, :teams
<jhass> you get the idea
<lxsameer> adaedra: weired it's not on my Gemfile.lock
<ljarvis> </pedant>
<jhass> gonna go to the grocery, the channel is all yours
<lxsameer> adaedra: I maintain the my app along side with gem A , A depends on gem B
<lxsameer> adaedra: and B is not in my gemfile.lock
<adaedra> lxsameer: and it is in your Gemfile?
<ljarvis> right, jhass is gone. Let's all smoke pot and code python
<leitz> Hmm...haven't used Struct in Ruby yet. Lemme go read.
<lxsameer> adaedra: A is in my Gemfile
<leitz> Line 47 is kinda of what I'm looking at: https://gist.github.com/LeamHall/d6549e7c8658ebb4ca03
nini1294 has quit [Ping timeout: 255 seconds]
<leitz> The first arguemnt is the unit designation.
<adaedra> lxsameer: and B is in A's dependencies in the .gemspec?
<lxsameer> adaedra: yeah
Zort0n has quit [Quit: Textual IRC Client: www.textualapp.com]
Axy has joined #ruby
<adaedra> a missing `bundle install`?
cornerman has quit [Ping timeout: 246 seconds]
cornerma1 is now known as cornerman
Zort0n has joined #ruby
<lxsameer> adaedra: nope I tried in milion times
withnale__ has joined #ruby
Phrogz has quit [Ping timeout: 265 seconds]
schaerli has quit [Remote host closed the connection]
Violentr has quit [Ping timeout: 250 seconds]
<adaedra> how do you require A in your app's gemfile?
Mia has quit [Ping timeout: 244 seconds]
<lxsameer> adaedra: gem 'A'
tagrudev has quit [Remote host closed the connection]
<adaedra> isn't it the gem you're managing locally?
ReBoRN has quit [Quit: • IRcap • 8.72 •]
withnale_ has quit [Ping timeout: 244 seconds]
rsc___ has quit [Quit: rsc___]
jgt has quit [Ping timeout: 255 seconds]
TomyWork has joined #ruby
Guest70360 has quit [Read error: Connection reset by peer]
rideh has joined #ruby
<lxsameer> adaedra: yeah but I'm using the rubyge
<lxsameer> adaedra: yeah but I'm using the rubygems version right now
zz_Outlastsheep is now known as Outlastsheep
<lxsameer> adaedra: as you can see rails-assets-jquery-knob listed as dependency
<adaedra> this is A, right? And what is B?
<lxsameer> adaedra: but rails can't find it
sshuff|gone is now known as sshuff
<adaedra> and in the Gemfile.lock, rails-assets-jquery-knob is not listed under admin_lte-rails?
<adaedra> is the version listed for admin_lte-rails correct?
ych_ has joined #ruby
juanpablo_ has joined #ruby
yardenbar has quit [Ping timeout: 246 seconds]
<lxsameer> adaedra: version is correct but that gem is missing
workmad3 has joined #ruby
user1138 has quit [Remote host closed the connection]
<adaedra> no clue
Rollabunna has joined #ruby
gwendall has quit [Remote host closed the connection]
gwendall has joined #ruby
user1138 has joined #ruby
user1138 has quit [Remote host closed the connection]
user1138 has joined #ruby
user1138 has quit [Remote host closed the connection]
Iskarlar has joined #ruby
startupality has quit [Quit: startupality]
bonhoeffer has quit [Quit: bonhoeffer]
_tpavel has joined #ruby
Rollabunna has quit [Ping timeout: 244 seconds]
countryHick has joined #ruby
<SOLDIERz> jhass darix thx for the help with the soname! It worked great! :-) Saved my day! :-) No I could go happy in the weekend! Have nice weekend Guys! :-)
lxsameer has quit [Quit: Leaving]
<adaedra> sigh
gwendall has quit [Ping timeout: 272 seconds]
CustosLimen has quit [Ping timeout: 260 seconds]
startupality has joined #ruby
bonhoeffer has joined #ruby
<SOLDIERz> adaedra hm?
casadei_ has joined #ruby
benlovell has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
werelivinginthef has joined #ruby
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
lkba has joined #ruby
Phrogz has joined #ruby
decoponio has joined #ruby
prefixed has joined #ruby
banister has joined #ruby
Phrogz has quit [Remote host closed the connection]
linuxboytoo has quit [Remote host closed the connection]
_whitelogger____ has joined #ruby
darkf has quit [Quit: Leaving]
ponga has joined #ruby
aphprentice_ has joined #ruby
linuxboytoo has quit [Ping timeout: 260 seconds]
DexterLB has quit [Ping timeout: 260 seconds]
tjohnson has joined #ruby
Kruppe has quit [Quit: ZNC - http://znc.in]
<TomyWork> i'm trying to "gem install rfusefs" and get "/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)". "gem install mkmf" says "ERROR: Could not find a valid gem 'mkmf' (>= 0) in any repository"
_blizzy_ has quit [Ping timeout: 265 seconds]
norc has quit [Ping timeout: 246 seconds]
Kruppe has joined #ruby
<TomyWork> oh, looks like i needed to do "apt-get install ruby1.9.1-dev" first
kies^ has quit [Ping timeout: 240 seconds]
lele has joined #ruby
<TomyWork> ...and libfuse-dev
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
havenwood has joined #ruby
jcp has joined #ruby
jcp is now known as Guest32426
scripore has joined #ruby
Philipp__ has quit [Read error: Connection reset by peer]
abyss has joined #ruby
user1138 has joined #ruby
d10n-work has joined #ruby
Guest32426 has quit [Read error: Connection reset by peer]
Kruppe has quit [Read error: Connection reset by peer]
segfalt has quit [Quit: segfalt]
camilasan has quit [Ping timeout: 256 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
Kruppe has joined #ruby
nzst has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
krasnus has joined #ruby
tubuliferous has joined #ruby
<Scriptonaut> hey guys, I have a somewhat generic question. To learn more about ruby I decided to write an irc bot. I can't think of any new features to implement. Here's the commands I've written so far. Since this is irc, I figured you guys might know some cool features to add: https://gist.github.com/robins35/eb45ad22f6ece1896692
linuxboy_ has joined #ruby
dimasg has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
Zort0n has quit [Quit: Textual IRC Client: www.textualapp.com]
freerobby has joined #ruby
tennis_ has joined #ruby
<ych_> is there an rnn library in ruby? besides fann-ruby (doesn't have rnn) and tlearn (broken) ?
tennis_ has quit [Remote host closed the connection]
_tpavel has quit [Quit: Leaving]
tennis_ has joined #ruby
hashrocket has joined #ruby
tubuliferous has quit [Ping timeout: 240 seconds]
Kyuujitsu has quit [Ping timeout: 255 seconds]
<TomyWork> Scriptonaut you could always make it pass the turing test :)
camilasan has joined #ruby
<havenwood> I've failed that test. It's hard.
<havenwood> I'm not a bot!
<TomyWork> is that your bot, Scriptonaut?
umgrosscol has joined #ruby
<Scriptonaut> TomyWork: no
<Scriptonaut> my bot isn't in here
<havenwood> Hi, I'm Scriptonaut's bot. Welcome to Ruby!
<shevy> lol
<Outlastsheep> Scriptonaut: !def (For definition retrieval), !syn (Synonyms), !ping, !roll ( [amount]d[dicenumber] ), !regex ( Simply matches the given string ), !calc/!eval (Evaluate mathematical sums)
kies^ has joined #ruby
<Outlastsheep> For the first two there are probably Dictionary/Thesaurus API's.
<Scriptonaut> haha
<Scriptonaut> oh, nice
<Outlastsheep> !random, !psuedorandom (Supply a number), !unix, !date, etc.
<Scriptonaut> what's !unix?
<Outlastsheep> A lot of these can just be the literal porting of standard Ruby methods.
<havenwood> Scriptonaut: !levenshtein
<Outlastsheep> UNIX-Time :P
<Scriptonaut> ah :)
<Scriptonaut> !levenshtein?
<havenwood> ych_: Hmm..
<Outlastsheep> !yt/!youtube's a nice one too.
<Scriptonaut> I have that one
phutchins has quit [Ping timeout: 240 seconds]
<havenwood> Scriptonaut: get the Levenshtein distance between two words
<Outlastsheep> I have !bench which basically benchmarks other IRC bots.
<Scriptonaut> These are the commands I have so far: https://gist.github.com/robins35/eb45ad22f6ece1896692
<Scriptonaut> The !imgur ones are by far the most popular
<Scriptonaut> I just added !js, for evaluating js, but it doesn't seem to be real js
<Scriptonaut> using that gem
<Outlastsheep> !gis for Google-Image-Search.
<Scriptonaut> that's a good one
<Outlastsheep> !g for google search. Etc.
jimms has quit [Remote host closed the connection]
<Scriptonaut> that gem I'm using, apparently var is an unexpected token, along with semicolons
<Outlastsheep> !bible, !allah if you're in a religious chat.
<Scriptonaut> haha
<Scriptonaut> no religious people in this chat afaik
<Outlastsheep> !hash which returns MD5, SHA1 and SHA256 strings of whatever you gave.
<Scriptonaut> that's pretty cool
<Outlastsheep> !translate for Google-Translate.
<Scriptonaut> I will add that
<havenwood> Scriptonaut: SHA3!
<Outlastsheep> !choose arg1,arg2,arg3 and it'll randomly pick. That's a popular one.
<Scriptonaut> I was thinking of adding: !quote, to keep the chat's best quotes
<ych_> havenwood, any idea?
<Scriptonaut> these are all great ideas so far thanks guys
<Outlastsheep> Normally it's used like: .ch procrastinate,work,sleep
<Outlastsheep> And the bot returns a random one.
<Scriptonaut> ah
<Outlastsheep> Nice for queries like "!ch Put tabasco in tea, What is wrong with you?"
<maloik> make sure it never chooses work or no one will like your bot
<Scriptonaut> haha
<Outlastsheep> Oh, and !ud for Urban Dictionary. !hats for TF2 hats. !wolframalpha and !wiki are musthaves.
<havenwood> ych_: I'm running into C-ext errors with tlearn. I actually don't know of an alternative rnn gem but interesting thing to look into.
<Scriptonaut> I wouldn't mind a haskell compiler
<Scriptonaut> for clever one liners
<Scriptonaut> same with JS
<havenwood> Scriptonaut: Wolfram API would be a very nice addition.
<Scriptonaut> I'll add that
<Outlastsheep> If you could embed Lua: most of those functions'd take less than a few lines.
<Outlastsheep> But that's another language.
tennis_ has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
<Scriptonaut> Writing features in ruby so far has been effortless
tennis_ has joined #ruby
<Scriptonaut> most features I knock out in 20 minutes
gizmore has joined #ruby
<ych_> :(
<Scriptonaut> using activerecord and activesupport without rails has been cool too
<adaedra> Sequel!
<Scriptonaut> Everyone has been telling me to use that
<Outlastsheep> My general Ruby code can use some improvement.
<Scriptonaut> nothing but praise for it so far
<Scriptonaut> I'm primarily a rails dev, so I took this project on to imporve my general ruby
<Outlastsheep> Is RoR very different from Ruby?
<Scriptonaut> quite a bit ya
<Scriptonaut> I mean it's made from Ruby, but there's quite a bit additional stuff you have to learn
<Scriptonaut> lots of convention/magic
<Outlastsheep> Huh.
<Outlastsheep> I'll look into it soonish.
<Outlastsheep> Anyways, I have dinner now.
<Scriptonaut> alright, thanks for the advice
mleung has joined #ruby
<Outlastsheep> You're welcome o/ Good luck with your bot.
<Bish> is there something like activerecord, without rails, which works with an existing database?
<TomyWork> !bible Lev25:39
<Rinzlit> Wait should I learn ruby before trying to learn ruby on rails?
<Bish> im fed up with creating sql queries
<TomyWork> where's your bot? :)
segfalt has joined #ruby
<Scriptonaut> in a private channel ;)
<jhass> Bish: sequel ?
Outlastsheep is now known as zz_Outlastsheep
<Scriptonaut> it's probably not appropriate for this channel
<Scriptonaut> people have added many nsfw !imgur commands
<havenwood> Sequel!
<Bish> jhass, looks good
<TomyWork> what's an easy way to autorestart your script when it's changed? it's a fuse filesystem
<jhass> TomyWork: guard
<jhass> probably guard-shell or whatever the generic plugin was
benlovell has quit [Ping timeout: 244 seconds]
jamto11 has joined #ruby
<jhass> if it's a rack app shotgun
<TomyWork> it's a 14-line ruby script
<TomyWork> extension .rb, mod 755, with a shebang. that's about it :)
tubuliferous has joined #ruby
schaerli has joined #ruby
<shevy> under kde3, I was able to get a .rb file to restart via dcop; sadly they removed dcop, and I have not found out how to do this via qdbus
<havenwood> Rinzlit: Yes, learn Ruby!
<Rinzlit> Oh okay okay thank you havenwood
mleung has quit [Client Quit]
<adaedra> havenwood » Sequel! – Stop copying me!
anisha has quit [Quit: Leaving]
Rollabunna has joined #ruby
<havenwood> adaedra: Stop reading my mind before I type things.
JoshL has quit [Read error: Connection reset by peer]
JoshL has joined #ruby
DaniG2k has joined #ruby
<adaedra> you don't have a mid firewall?
<adaedra> mind*
baroquebobcat has joined #ruby
<havenwood> adaedra: Nope, unfiltered.
<DaniG2k> Hello all. I'm making a small ruby gem. When I run the following code: File.open('db/index.json', 'w') {|f| f.write(tokens)} I am getting an error saying Errno::ENOENT: No such file or directory @ db/index.json
SOLDIERz has quit [Ping timeout: 250 seconds]
<DaniG2k> why won't it just create the file?
<adaedra> &ri File.open
<DaniG2k> ah maybe I need to create the db dir first -_- silly me
withnale__ has quit [Remote host closed the connection]
<DaniG2k> is it a bad idea to create a text file from a gem?
<DaniG2k> to /db/
withnale__ has joined #ruby
<DaniG2k> it will contain a small index in json format
Rollabunna has quit [Ping timeout: 244 seconds]
<jhass> it's a bad idea to do it relative to the working directory
<DaniG2k> jhass: how can I do it properly?
<DaniG2k> ok it worked now that I made the db directory
<DaniG2k> phew
<jhass> well, we've been there before
djstorm has joined #ruby
<DaniG2k> jhass: sorry -_-
<jhass> you write a gem for usage in a rails app, use Rails.root
<jhass> or better yet default to that but make it configurable
<DaniG2k> jhass: NameError: uninitialized constant Rails
<DaniG2k> its because this is a gem that calls Railties
al2o3-cr has joined #ruby
al2o3-cr has quit [Client Quit]
<DaniG2k> I don't want to make an engine because Engines are nightmares
<DaniG2k> I can barely setup rspec in a Rails Engine
<jhass> I'm sure there's a way of doing it with a Railtie
<jhass> you just need the proper hook
gagrio has quit [Quit: Leaving...]
<ljarvis> yeah if this is a rails gem if you should a rails engine
<ljarvis> be a *
tommylom1ykins is now known as tommylommykins
decaff has joined #ruby
Yzguy has joined #ruby
<jhass> looks legit
_blizzy_ has joined #ruby
tvw has quit []
<DaniG2k> :D
<DaniG2k> hmm doesnt work: require 'rankrb' (true)
<DaniG2k> NameError: uninitialized constant Rails
jamto11_ has joined #ruby
<jhass> doesn't look like you do it properly if it accesses it on require
lampd1 has quit [Remote host closed the connection]
dblessing has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jamto11 has quit [Ping timeout: 256 seconds]
<DaniG2k> god this is painful -_-
<DaniG2k> ah maybe I need to call this from within a Rails app
<DaniG2k> which then means that I can't actually test the gem individually
Yzguy has quit [Client Quit]
tkuchiki has joined #ruby
beneggett has joined #ruby
lampd1 has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
<jhass> well, Rails.root is easily faked for testing purposes if that's all
<jhass> require "pathname"; module Rails; def self.root; Pathname.new("fake_app/"); end; end; in your spec_helper or whatever
axl__ has joined #ruby
_blizzy_ has joined #ruby
aganov has quit [Remote host closed the connection]
cmisenas has joined #ruby
volhit has joined #ruby
volhit has quit [Client Quit]
apt-get_ has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
eminencehc has joined #ruby
volhit has joined #ruby
ixti has joined #ruby
volhit has quit [Client Quit]
Rixius|Alt is now known as Rixius
phutchins has joined #ruby
rcvalle has joined #ruby
<DaniG2k> jhass: ok I have Rails.root from within a dummy Rails app
<DaniG2k> jhass: would the path then be Rails.root + '/db/myfile' ?
sarkyniin has quit [Ping timeout: 240 seconds]
elektronaut has joined #ruby
<jhass> Rails.root.join("db/foo")
Trieste has joined #ruby
Trieste has joined #ruby
phrozen77 has joined #ruby
drPoggs has joined #ruby
soahccc has joined #ruby
decaff has quit [Remote host closed the connection]
<DaniG2k> jhass: you're a legend
TomyWork has quit [Ping timeout: 264 seconds]
gogo has joined #ruby
al2o3-cr has joined #ruby
gogo has quit [Client Quit]
bauruine has joined #ruby
quimrstorres has joined #ruby
nzst has joined #ruby
niiamon has quit [Remote host closed the connection]
<adaedra> .join('db', 'foo'), rather, no?
<jhass> doesn't make too much of a difference :P
<tbuehlmann> the filesystem's file separator will be used then, right?
<ljarvis> yes
<ljarvis> obviously the popular os' all support forward slashes, though
<tbuehlmann> but yeah, I'm a fan of multiple arguments there, too
<DaniG2k> went with multiple args
<DaniG2k> ;) thanks
jgpawletko has quit [Quit: jgpawletko]
icebourg has joined #ruby
snockerton has joined #ruby
Rickmasta has joined #ruby
prefixed has quit [Changing host]
prefixed has joined #ruby
prefixed is now known as grill
quimrstorres has quit [Ping timeout: 260 seconds]
konsolebox has quit [Ping timeout: 246 seconds]
senayar has quit []
<DaniG2k> its weird but
devoldmx has joined #ruby
Thr3d has quit [Quit: Thr3d]
<DaniG2k> I'd have made an engine but configuring a Rails module to use rspec is much harder than I'd anticipated
<DaniG2k> and my tests are all in rspec now
<Igorshp> Hi guys, i have a massive directory (52gb) and trying to find a fast way to get a list of all files in ruby. "ls(path)" is taking 41 minutes
<Igorshp> are there any quicker alterinatives?
bricker has joined #ruby
<nzst> Igorshp: how long does ls take outside of ruby?
devoldmx has quit [Remote host closed the connection]
<ljarvis> Igorshp: don't use Ruby for it
<ljarvis> I'm afraid it's just not going to be fast
<abdulrehman> is there any difference, between some_array.each do end and some_array.each {}
<ljarvis> abdulrehman: no
<Igorshp> nzst: sec, i'll try
<DaniG2k> Igorshp: I'm not 100% sure but using backticks (i.e.: `ls /your/dir/`) might execute it in a shell rather than in Ruby
<DaniG2k> might be faster
<adaedra> ._.
<DaniG2k> wrong?
<adaedra> you'll assemble a huge list of files into memory
<ljarvis> no, but it's not very helpful (presumably they want an array of files which means they'll need to split the output)
ivanskie has joined #ruby
<DaniG2k> oops
<ljarvis> Dir.foreach would probably be fine
<adaedra> At this rate, I'd search a way of not assembling the list but doing the work directly
<ljarvis> yeah I think foreach won't build the list
Kyuujitsu has joined #ruby
Vile` has quit [Ping timeout: 255 seconds]
<abdulrehman> ljarvis: thanks,
<ljarvis> right yeah, foreach doesn't eager load and return an array so that's the best option
ivanskie has quit [Client Quit]
vdamewood has quit [Quit: Life beckons.]
<ljarvis> also, Find.find if you want super recursive winning
Soda has joined #ruby
<Igorshp> ljarvis: just realised that ls() is not native to ruby, found the underlying code it's "Dir.entries(path)"
bluOxigen has joined #ruby
ivanskie has joined #ruby
shtirlic has quit [Quit: ZNC - http://znc.in]
Vile` has joined #ruby
baweaver has joined #ruby
casadei_ has quit [Remote host closed the connection]
<ljarvis> Igorshp: yeah that's going to be slow and memory hungry, what exactly are you trying to do?
<Igorshp> this is part of opensource package
shtirlic has joined #ruby
<ljarvis> ok that tells me absolutely nothing
<Igorshp> it's getting list of all files, then subtracts ones it modifies. the remaining list is purged
Kyuujitsu has quit [Ping timeout: 246 seconds]
<Igorshp> basicaly removes all non-managed files
blueOxigen has quit [Ping timeout: 255 seconds]
<ljarvis> why do you have a 50+ gb directory? or is that just to test that it works on huge directories?
lannonbr has quit [Quit: WeeChat 1.2]
<Igorshp> it's jenkins install with all our jobs, builds and releases :)
linuxboy_ has quit [Remote host closed the connection]
Ilyas has quit [Quit: Leaving]
<ljarvis> can't you do this in a shell script?
<Igorshp> as i said, it's a function inside an opensource project
<Igorshp> i dont even need to purge the files, but it does this diff eveyr time
<ljarvis> ok
konsolebox has joined #ruby
<Igorshp> i could change it so it only does the diff if the purge flag is set, but the actuall diff would still take ages on large machines
<Igorshp> idealy it could be optimised
<Igorshp> just checked 'ls -R /path' takes 5.3 minutes in shell
<ljarvis> Igorshp: I believe what you're doing is probably fundamentally flawed so I don't have any suggestions for optimising it. It's never going to be fast because it's a bad idea
<Igorshp> that woudl be acceptable time
mrmargolis has quit []
DCameronMauch has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
<Igorshp> any suggestions how to easily delete all files but ones in a short list?
RobertBirnie has joined #ruby
<ljarvis> use Dir.entries to loop and then check each file against an array, if it's not in the array then delete it
<ljarvis> s/array/set/
rehat_ has joined #ruby
<Igorshp> hmm, i wonder if dir.entries works with a block
blueOxigen has joined #ruby
casadei_ has joined #ruby
<ljarvis> er I meant Dir.foreach not Dir.entries sorry
apt-get_ has quit [Ping timeout: 246 seconds]
snockerton has quit [Quit: Leaving.]
<ljarvis> Dir.foreach *is* Dir.entries with a block (and it doesn't build a giant array)
bluOxigen has quit [Ping timeout: 244 seconds]
<Igorshp> ok, yeah, that makes a lot more sense
<Igorshp> i'll give it a quick try
schaerli has quit [Remote host closed the connection]
<ljarvis> Dir.foreach { |f| File.unlink(f) unless keep.include?(f) || f == "." || f == ".." } # or something
mdavid613 has joined #ruby
<nzst> Igorshp: another channel suggested glob(3) or a directory walk (twb in #emacs)
<Igorshp> hmm, interesting
DaniG2k has quit [Quit: leaving]
poguez_ has joined #ruby
bonhoeffer has joined #ruby
<Igorshp> nzst: i think just not having to build the massive array and only walking through it once would give a sizable improvement
<Igorshp> trying that aproach now
phutchins has quit [Ping timeout: 246 seconds]
mister_solo has joined #ruby
Cache_Money has joined #ruby
<ljarvis> Igorshp: if you need it to work recursively I would look at Find.find
<ljarvis> &ri Find.find
Rollabunna has joined #ruby
mleung has joined #ruby
theery has joined #ruby
krz has quit [Ping timeout: 256 seconds]
mleung has quit [Client Quit]
_seanc_ has joined #ruby
imperator has joined #ruby
<imperator> good morning
jgpawletko has joined #ruby
<Igorshp> ljarvis: thanks
khebbie has joined #ruby
blue_deref has joined #ruby
<imperator> got a rexml <-> nokogiri compatibility issue i'm hoping someone can help me with
<jhass> drop rexml :P
krz has joined #ruby
NeverDie has joined #ruby
<ljarvis> ^
<imperator> jhass, i'm trying!
schaerli has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
apt-get_ has joined #ruby
<shevy> anyone of you knows a popular gem that defines either class Ruby or module Ruby? topnamespace
<ljarvis> imperator: root.elements.find { |e| e.name == "c" }
grios has joined #ruby
<jhass> imperator: ndoc.at("c")
<ljarvis> not the same thing
<ljarvis> but sure
Rollabunna has quit [Ping timeout: 244 seconds]
<ljarvis> if you can use search selectors you definitely should
<jhass> well, root.at("/c") if it matters
<ljarvis> .elements is often incorrect
<ljarvis> especially when filtering
<jhass> (or was it "./c"? I never remeber if / goes back to the root)
PierreRambaud has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 244 seconds]
<ljarvis> actually neither of them will work for this situation
<ljarvis> your first one was right
<imperator> has to work with both
<ljarvis> ...
<ljarvis> wat?
<ljarvis> you want api compatibility?
<imperator> yeah, so, they've got some code here where the xml parser is pluggable
<jhass> ndoc.root.at("./c") will work, just tried
pietr0 has joined #ruby
linuxboytoo has joined #ruby
<imperator> so, you can specify :nokogiri, :rexml, etc
<ljarvis> oh I misread .root
<ljarvis> imperator: that's an awful idea
schaerli has quit [Remote host closed the connection]
<imperator> ljarvis, i'm just dealing with the hand i was dealt ;)
tkuchiki has quit [Remote host closed the connection]
<ljarvis> imperator: ok so, my first suggestions will do what you want
* jhass hands imperator a machete
<ljarvis> but it's slow and terrible so there's that
curses has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bonhoeffer_ has joined #ruby
umgrosscol has quit [Ping timeout: 272 seconds]
mikecmpbll has quit [Ping timeout: 246 seconds]
polpak has joined #ruby
bonhoeffer has quit [Ping timeout: 244 seconds]
bonhoeffer_ is now known as bonhoeffer
joonty has quit [Quit: joonty]
<jhass> imperator: so you're handed some object and it's either an REXML::Document or an Nokogiri::Document and you don't know which it is?
michaeldeol has joined #ruby
<imperator> jhass, yup
dawkirst has joined #ruby
<jhass> what a terrible idea
<imperator> looks like rexml returns a plain string, while nokogiri returns an object - but it does work, thanks
mdavid613 has quit [Quit: Leaving.]
<ljarvis> :(
<imperator> we'll see if this works
amclain has joined #ruby
<jhass> I'd ponder case doc; when Nokogiri::Document; NokogiriParser.new(doc); when REXML::Document; REXMLParser.new(doc); end;
jamto11_ has quit [Ping timeout: 244 seconds]
<ljarvis> when REXML::Document; exit!
j4cknewt has joined #ruby
<imperator> haha
<jhass> when REXML::Document; "42"; # works here;
Rollabunna has joined #ruby
<imperator> oh,nm, rexml does return an Element, output tricked me
<ljarvis> when REXML::Document; require 'nokogiri'; Nokogiri.XML(doc.to_s)
dfockler has joined #ruby
<imperator> you guys crack me up
baweaver has quit [Remote host closed the connection]
curses has quit [Ping timeout: 252 seconds]
<imperator> believe me, i'd love to see rexml ripped out of here permanently
white_bear has quit [Quit: leaving]
quimrstorres has joined #ruby
<jhass> that last one is actually considerable :P
<imperator> unfortunately i think it would break other bits of the codebase
<imperator> i'm just going to worry about my piece for now
<Igorshp> ljarvis: wow, just changing from Dir.entries() to Find.find() and not touching ANYTHING else: time went down from 618 to 30 seconds
mdavid613 has joined #ruby
<ljarvis> yep sounds about right
willharrison has joined #ruby
* imperator should revisit file-find
khebbie has joined #ruby
willharrison has quit [Client Quit]
christiandsg has joined #ruby
<imperator> ljarvis, jhass, thanks for your help
hanmac has quit [Ping timeout: 244 seconds]
chills42 has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 256 seconds]
<ljarvis> :D
withnale___ has joined #ruby
impalle has joined #ruby
TeresaP has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ogpastaling has joined #ruby
<Igorshp> ljarvis: thanks for your help!
<TeresaP> Alright, I'm being dumb about Hashes again. What are you guys' favorite tutorials for creating Hashes beside the ruby-doc.org site. I need some more visual examples of adding elements to Hashes.
michaeldeol has quit [Quit: Textual IRC Client: www.textualapp.com]
<imperator> TeresaP, what language(s) are you coming from? perl perhaps?
<jhass> {foo: bar}, {foo => bar}, some_hash[foo] = bar
<TeresaP> imperator C#
withnale__ has quit [Ping timeout: 240 seconds]
<jhass> are there any variants I missed?
<TeresaP> But truthfully I never had reason to use Hashes before
<TeresaP> Or at least, i didn't know I did
<imperator> jhass, Hash.new :)
leesharma has joined #ruby
<Igorshp> ljarvis: do you know of any downsides of using Find.find() compared to Dir.entries()?
<jhass> imperator: "adding elements to", not "create a new"
<ljarvis> Igorshp: not if you need what Find.find provides
<Igorshp> i'm wondering whetehr that switch can be made global for the project
MasterPiece has joined #ruby
<TeresaP> Basically, I get the simple cases
<ljarvis> Igorshp: well, they obviously do 2 different things
[Butch] has joined #ruby
nzst has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<TeresaP> I'm trying to match a particular format defined by another developer
<TeresaP> the keys are repeated
<TeresaP> I'm just missing something obvious
<jhass> got some example?
<TeresaP> sure
withnale___ has quit [Ping timeout: 264 seconds]
segfalt has quit [Quit: segfalt]
umgrosscol has joined #ruby
<TeresaP> As I read in some source data, I need to generate a file like that
<ljarvis> i'm off, see ya
<TeresaP> But it's incremental
<jhass> TeresaP: that's an array ([]) containing two hashes ({})
<TeresaP> Oh damn
<TeresaP> See I knew it would be obvious
<jhass> or actually it's JSON I guess, so an array containing two JSON objects
<TeresaP> So I just need to create a new hash each time and append it to the array
<jhass> yeah
<TeresaP> Thank you!
<jhass> yw
<TeresaP> I don't know why it's tripping me up so bad
stan has quit [Ping timeout: 246 seconds]
linuxboytoo has quit [Ping timeout: 244 seconds]
<jhass> it's okay, if you come from something like C# the array & hash centric data handling in languages like Ruby & Python can take a while to get used to
<TeresaP> :)
kfpratt has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<TeresaP> I'll get there. Just need to sit down and pour over it for a bit, I think.
jesseherrick has joined #ruby
<TeresaP> I still haven't quite been able to let go of calling functions with this(format)
bonhoeffer has quit [Quit: bonhoeffer]
quimrstorres has quit [Remote host closed the connection]
dawkirst has quit [Ping timeout: 240 seconds]
<Igorshp> weird, Dir.entries is non recursive. i wonder why it takes so long then
mleung has joined #ruby
DCameronMauch has quit [Read error: Connection reset by peer]
DCameronMauch has joined #ruby
devoldmx has joined #ruby
<jhass> Igorshp: because it allocates an array in addition to all the strings
chadwtaylor has joined #ruby
<jhass> allocation is expensive as hell
kresk has joined #ruby
juanpaucar has quit [Remote host closed the connection]
podman has joined #ruby
<shevy> we need fruby... fast ruby
<adaedra> you mean c?
<jhass> shevy: you mean crystal or jruby 9k?
* adaedra runs
<Igorshp> jhass: somehow runnign the same command in irb is lighting fast, but when the project does it's painfuly slow
<jhass> seems unlikely
hanmac has joined #ruby
<jhass> or somebody did something really stupid
<Igorshp> aaarhrhH!!
<jhass> check if Dir.method(:entries).source_location inside the project still returns nil :P
<Igorshp> yes, the ls() function is defined in 2 places.... i was looking at the wrong one
<imperator> damn, root.attributes returns a value in rexml, but nokogiri returns a custom object
<eam> Igorshp: are you just calling Find.find() and not using the enumerator?
<ruboto> Igorshp, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/7869d02664efff2b3023
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<Igorshp> that's the slow function
c0m0 has quit [Ping timeout: 246 seconds]
<eam> because the reason it's slow in that case isn't the array allocation -- it's that you're not accessing the disk at all
<jhass> yes, I can see why it would be
<imperator> we need a common xml interface or something
<eam> the allocation of ruby datastructures is probably insignificant compared to the cost of interacting with the filesystem
<imperator> they're doing that for json i think
Channel6 has joined #ruby
<eam> there's a few orders of magnitude difference there
<jhass> JSON API? that's not code level
<jhass> and I think we need a sane XML API and still haven't found it really
<jhass> so standardizing would kinda harm innovation a bit there
rideh has quit [Quit: zap]
hololeap has joined #ruby
<jhass> but use my first case when suggestion then, just provide domain specific accessors, gimme_c, gimme_cs_foo_attribute
pauly_oc has joined #ruby
attamusc has joined #ruby
pengin has joined #ruby
<imperator> jhass, there was some formalization effort for json, can't remember the details now
benlieb has joined #ruby
hinbody has joined #ruby
ttilley has quit [Ping timeout: 256 seconds]
<jhass> imperator: json schema for basically XSD's for JSON and JSON API for standardizing data description
<imperator> thanks
<jhass> but neither has anything to do with code level APIs
<imperator> oic
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
impalle has quit [Ping timeout: 256 seconds]
Trynemjoel has quit [Ping timeout: 256 seconds]
christiandsg has quit [Read error: Connection reset by peer]
MatthewsFace has joined #ruby
lidenbrock has joined #ruby
christiandsg has joined #ruby
_blizzy_ has quit [Ping timeout: 265 seconds]
jesseherrick has quit [Quit: Lost terminal]
<Igorshp> so yeah, getting full list of files is actually rather fast. looping through 1.8 million of them to see if the name matches '.' or '..' takes a little longer...
jamto11_ has joined #ruby
Trynemjoel has joined #ruby
Guest80 has joined #ruby
nitrix has quit [Ping timeout: 256 seconds]
<eam> I would expect the opposite
Kyuujitsu has joined #ruby
zz_barkerd427 has joined #ruby
<eam> Igorshp: show code?
<Igorshp> 10 seconds to do Dir.glob()
<Igorshp> it's just above, 1 sec
KC9YDN has joined #ruby
KC9YDN has joined #ruby
DCameronMauch has quit [Quit: Leaving...]
psy_ has quit [Read error: Connection reset by peer]
<eam> Igorshp: pattern matching 1.8m strings on my system takes around one second
f4cl3y has quit [Ping timeout: 264 seconds]
<eam> it should take at least ten times that long to read 1.8m dirents
<Igorshp> it's currently doing the reject! step ..malreayd for about 4-5 minutes
towski_ has joined #ruby
rideh has joined #ruby
abyss has quit [Ping timeout: 264 seconds]
curses has joined #ruby
chills42 has joined #ruby
omegamike has quit [Remote host closed the connection]
<Igorshp> ok, done, 8 minutes to do the reject! step
curses has quit [Remote host closed the connection]
kresk has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
curses has joined #ruby
<Igorshp> and another 1.6 seconds to do the map step
<adaedra> \o
<Igorshp> 1.6 minutes
prestorium has joined #ruby
psy has joined #ruby
Kyuujitsu has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
<eam> Pathname is really slow, you're probably better served with a regex
gregf has quit [Quit: WeeChat 1.1.1]
leafybasil has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
<eam> something like /\/\.\.?$/
<eam> I think reject! might be screwing you too, it's probably faster to just reject
omegamike has joined #ruby
segfalt has joined #ruby
pengin has quit [Remote host closed the connection]
<eam> yeah it's MUCH faster to just use reject and allocate a new array
<eam> reject! probably has to reorder all elements for every deletion, so o(n^2) vs o(n) for just reject
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Jackneill has joined #ruby
cnngimenez has joined #ruby
malconis has joined #ruby
<eam> Igorshp: in general, the time it takes to process filenames should be much smaller than the time it takes to fetch them from the system
rakm has joined #ruby
psy has quit [Disconnected by services]
<Igorshp> eam: that's not what i'm seeing
psy_ has joined #ruby
<eam> Igorshp: I know, but did you try the fixes I suggested?
kfpratt has quit [Remote host closed the connection]
dgutierrez1287 has quit [Ping timeout: 264 seconds]
omegamike has quit [Remote host closed the connection]
<eam> you're using some very inefficient algorithms
Trynemjoel has quit [Ping timeout: 250 seconds]
jimms has joined #ruby
keeguon has quit [Quit: keeguon]
gregf has joined #ruby
<Igorshp> what's the differnece between reject and reject!
<hanmac> Igorshp: why using Pathname.new(name).basename().to_s when you can use File.basename() ?
<eam> reject! removes items in place, reject returns a new Array
jtdoncas has quit [Ping timeout: 246 seconds]
attamusc has quit [Read error: Connection reset by peer]
<eam> the removal of array items in place is MUCH slower than just constructing a new array
Trynemjoel has joined #ruby
<eam> because every element of the array must be copied for every deletion (probably)
<eam> I just ran a test using 1.8 million strings and reject takes 14 seconds
<eam> reject! is still running, has been for minutes
huko_ has joined #ruby
gwendall has joined #ruby
quimrstorres has joined #ruby
<eam> o(n) vs o(n^2)
<Igorshp> i see
<Igorshp> interesting, i'll give that a try
huko_ has quit [Remote host closed the connection]
mxrguspxrt has joined #ruby
<eam> hanmac's suggestion re: the code inside the match is good, or just use a single regex to filter, but I think this represents most of your issue
huko_ has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
juanpablo__ has joined #ruby
jamto11_ has quit [Remote host closed the connection]
paulcsmith_ has quit [Quit: Be back later ...]
jimms has quit [Remote host closed the connection]
christiandsg has quit [Remote host closed the connection]
<eam> reject! would be faster than reject if it rejected zero elements :)
fantazo has joined #ruby
pengin has joined #ruby
<eam> but since you're walking a tree you're gonna have . and .. pretty often throughout your dataset
scripore has quit [Quit: This computer has gone to sleep]
jtdoncas has joined #ruby
juanpablo_ has quit [Ping timeout: 252 seconds]
paulcsmith_ has joined #ruby
shadoi has joined #ruby
jamto11 has joined #ruby
quimrstorres has quit [Ping timeout: 264 seconds]
juanpablo___ has joined #ruby
linuxboytoo has joined #ruby
linuxboytoo has quit [Remote host closed the connection]
schaerli has joined #ruby
<eam> I killed that example, it didn't finish after 7 minutes. but with a 100k element dataset reject takes 0.5s and reject! takes 5.5s
linuxboytoo has joined #ruby
<eam> and it does appear to scale by n^2
juanpablo__ has quit [Read error: Connection reset by peer]
bronson has joined #ruby
sgambino has joined #ruby
khebbie has joined #ruby
<Igorshp> eam: wow... i've tried 'reject' and it's lighting fast now
<Igorshp> that step takes 6-7 seconds
<eam> bingo
rdark has quit [Ping timeout: 240 seconds]
<Igorshp> down from 650
<Igorshp> or so
jamto11 has quit [Ping timeout: 250 seconds]
<eam> Igorshp: generally in ruby you ignore the internals of what's going on, but sometimes when the dataset gets big it begins to matter a lot :)
<Igorshp> that's awesome, thank you
<Igorshp> yeah
<Igorshp> the last map step is still taking 1.5 minutes
<Igorshp> but in comparison to the rest it's relatively negilble :)
zacts has quit [Quit: leaving]
christiandsg has joined #ruby
casadei_ has quit [Remote host closed the connection]
juanpablo___ has quit [Ping timeout: 272 seconds]
Guest80 has quit [Ping timeout: 250 seconds]
<Igorshp> 'files.map {|f| Chef::Util::PathHelper.cleanpath(f)}'
jtdoncas has quit [Ping timeout: 264 seconds]
kies^ has quit [Ping timeout: 264 seconds]
<eam> Igorshp: cleanpath probably touches the filesystem
jtdoncas has joined #ruby
<eam> there are two kinds of path cleanup, pure lexical (which is pretty limited) and full canonicalization (which needs to walk each path element)
rdark has joined #ruby
<Igorshp> i'll check
<eam> though 1.5 minutes is pretty fast for the latter so maybe it's just a slow implementation of the former
juanpablo___ has joined #ruby
<eam> the other thing you might want to keep in mind is that when you're testing this, you're probably getting all your file metadata preloaded in the vfs cache -- this could be significantly slower on first-run
<eam> the difference of stat() fetching data from disk vs memory/cache
attamusc has joined #ruby
leafybasil has joined #ruby
phutchins has joined #ruby
<Igorshp> eam: doca say it doesn't access filesystem
<Igorshp> *docs
<eam> ok so that's a pure lexical cleanup if you're using a new enough ruby
<eam> Igorshp: consider_symlink used to be true
<eam> (by default)
<eam> what ruby version?
<Igorshp> actually reading that part righ tnow
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
werelivi_ has joined #ruby
That1Guy has joined #ruby
<Igorshp> eam: ruby 2.1.4p26
axl_ has quit [Ping timeout: 245 seconds]
axl__ is now known as axl_
bnizzle has joined #ruby
jimms has joined #ruby
sshuff is now known as sshuff|gone
<eam> ah wait I lied, it hasn't changed
<eam> yeah this never touches the fs, it's just slow
<eam> I was thinking of fixing the .. bug, but it looks like that fix was rejected so ruby just does the wrong thing by default https://bugs.ruby-lang.org/issues/7401
rippa has joined #ruby
paulcsmith_ has quit [Read error: Connection reset by peer]
drewo has joined #ruby
werelivinginthef has quit [Ping timeout: 255 seconds]
<eam> (which btw means cleanpath can result in invalidating your paths)
dfockler has quit [Remote host closed the connection]
Kyuujitsu has joined #ruby
Iskarlar has joined #ruby
juanpablo____ has joined #ruby
centrx has joined #ruby
kully3xf has quit [Ping timeout: 256 seconds]
<Igorshp> ouch
vickleton has joined #ruby
jgpawletko is now known as jgpawletko_away
<Igorshp> hmmm, do you ahve any suggestions for an alternative by any chance?
kirun has joined #ruby
<eam> if you set consider_symlink=true it becomes safe
<eam> (not faster, but safe)
rdark has quit [Ping timeout: 272 seconds]
<eam> you probably don't need to do path cleanup at all, though
DexterLB has joined #ruby
olistik has quit [Remote host closed the connection]
curses has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
<eam> I'd suggest omitting that entire step unless you have a specific reason for it
<Igorshp> hmm, i'll compare the output and see what it acutally does
<eam> since you're not doing symlink resolution (by walking each path element) the path cleanup should have no effect at all
lannonbr has joined #ruby
psy_ has quit [Ping timeout: 240 seconds]
<eam> (it'd be useful for other filename sources, say user input)
JoshL has quit []
juanpablo___ has quit [Ping timeout: 272 seconds]
dfockler has joined #ruby
JoshL has joined #ruby
JoshL has quit [Client Quit]
triangles2 has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
msnyon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
msnyon has joined #ruby
msnyon has quit [Client Quit]
ndrei has joined #ruby
gwendall has quit [Remote host closed the connection]
triangles has quit [Ping timeout: 246 seconds]
gambl0re has joined #ruby
platzhirsch has quit [Remote host closed the connection]
ych_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TeresaP has quit [Quit: Page closed]
gwendall has joined #ruby
j4cknewt_ has joined #ruby
JoshL has joined #ruby
j4cknewt has quit [Read error: Connection reset by peer]
jamto11 has joined #ruby
gwendall has quit [Remote host closed the connection]
postmodern has joined #ruby
beneggett has quit [Quit: (╯°□°)╯︵ ┻━┻) - keep on keeping on]
zz_Outlastsheep is now known as Outlastsheep
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
devoldmx has quit [Remote host closed the connection]
theery has quit [Remote host closed the connection]
kully3xf has joined #ruby
Miphix has quit [Quit: Leaving]
theery has joined #ruby
leat1 has quit [Remote host closed the connection]
leat1 has joined #ruby
That1Guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has joined #ruby
drewo has quit [Ping timeout: 244 seconds]
davejlon_ has quit [Remote host closed the connection]
abyss has joined #ruby
schaerli has quit [Remote host closed the connection]
<Igorshp> eam: actually, it could be running on ruby 1.9.3
davejlong has joined #ruby
<Igorshp> eam: doing random samples from 1.8kk files... it does not appear that cleanpath() does anything at all
Trynemjoel has quit [Ping timeout: 256 seconds]
bluOxigen has joined #ruby
Trynemjoel has joined #ruby
_seanc_ has quit [Quit: _seanc_]
That1Guy has joined #ruby
shterrett has quit [Quit: shterrett]
<Igorshp> eam: gotta wrap up for the day. Thank you very very much once again!
jhass has quit [Excess Flood]
jhass has joined #ruby
jimms has quit [Remote host closed the connection]
Rollabunna has quit [Remote host closed the connection]
moshee has joined #ruby
blaines has joined #ruby
davejlong has quit [Client Quit]
eggoez has quit [Ping timeout: 240 seconds]
user1138 has quit [Ping timeout: 246 seconds]
casadei_ has joined #ruby
Rollabunna has joined #ruby
Iskarlar has joined #ruby
Rollabun_ has joined #ruby
Rollabun_ has quit [Remote host closed the connection]
eggoez has joined #ruby
Rollabun_ has joined #ruby
That1Guy has quit [Client Quit]
<eam> Igorshp: nice, np!
user1138 has joined #ruby
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Soda has quit [Remote host closed the connection]
bnizzle has left #ruby [#ruby]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
Rollabunna has quit [Ping timeout: 265 seconds]
j4cknewt_ has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby
iateadonut has quit [Quit: Leaving.]
dfockler has quit [Remote host closed the connection]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
crdpink2 has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
crdpink has quit [Ping timeout: 246 seconds]
astrobunny has joined #ruby
linuxboytoo has quit [Quit: Leaving...]
bar_ has joined #ruby
sshuff|gone is now known as sshuff
<Igorshp> damn, the total chef run went down from 2600 seconds to 242 just from the above change. The best i could ever get it down to was 9 minutes
user has joined #ruby
<bar_> hello, i'm trying to istall json and get this error http://paste.ubuntu.com/11974664/ can someone help
casadei_ has quit [Remote host closed the connection]
dorei has quit [Ping timeout: 244 seconds]
user is now known as Guest35130
Guest35130 has quit [Client Quit]
<Igorshp> but as jenkins builds more and more the runs were slowing down
<Igorshp> so happy :)
Igorshp has quit [Remote host closed the connection]
<centrx> bar_, Looks like JSON 1.8.0 is from March 2013, it's possible Ruby 2.2.2 header files are incompatible with it
centrx has quit [Quit: 'Get out, you and all the people who follow you!' Then he went out from Pharaoh in hot anger.]
user___ has joined #ruby
chihhsin has quit [Quit: leaving]
<bar_> centrx: but when I do bundle install i get this error An error occurred while installing json (1.8.0), and Bundler cannot continue.
<bar_> Make sure that `gem install json -v '1.8.0'` succeeds before bundling.
user___ is now known as volhit
araujo has quit [Ping timeout: 272 seconds]
rbowlby has joined #ruby
volhit has quit [Client Quit]
casadei_ has joined #ruby
volhit has joined #ruby
chihhsin has joined #ruby
quimrstorres has joined #ruby
<bar_> can someone help me
impalle has joined #ruby
baweaver has joined #ruby
lwu_ has joined #ruby
baweaver has quit [Remote host closed the connection]
Blaguvest has joined #ruby
drewo has joined #ruby
<leitz> ping jhass
_blizzy_ has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
havenwood has quit [Ping timeout: 250 seconds]
apt-get_ has quit [Ping timeout: 272 seconds]
<shevy> ping jhass
quimrstorres has quit [Ping timeout: 265 seconds]
<jhass> ping jhass
<leitz> Hehe...just wanted to say thanks before I nap off. https://github.com/LeamHall/CT_Character_Generator/blob/master/ideas/unit/show_unit.rb
bodgix has quit [Quit: Leaving.]
<jhass> leitz: great. Note that we tend to leave get_ prefixes off in ruby and use foo? instead of is_foo
scripore has joined #ruby
volhit has quit [Quit: Textual IRC Client: www.textualapp.com]
psy_ has joined #ruby
krz has quit [Ping timeout: 240 seconds]
christiandsg has quit [Ping timeout: 265 seconds]
<jhass> leitz: to sum you can use .inject, unit["members"].inject(0) {|total, member| total + trooper_morale(member) }
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<jhass> a.fdiv(b) makes a nice replacement for a.to_f / b
Pupeno has quit [Remote host closed the connection]
_blizzy_ has quit [Read error: Connection reset by peer]
<jhass> leitz: and you should use File.write/File.read or at least the block form of File.open, if you have a file.close somewhere you likely have a potential file handle leak ;)
* leitz takes notes.
hfp_work has quit [Ping timeout: 264 seconds]
<jhass> that's about what I'd have :)
hfp has quit [Ping timeout: 244 seconds]
mxrguspxrt has joined #ruby
apt-get_ has joined #ruby
_blizzy_ has joined #ruby
araujo has joined #ruby
pengin has quit [Remote host closed the connection]
Muhannad has quit [Ping timeout: 246 seconds]
gambl0re has quit [Read error: Connection reset by peer]
dfockler has joined #ruby
gambl0re has joined #ruby
CustosLimen has quit [Ping timeout: 240 seconds]
CustosLimen has joined #ruby
bonhoeffer has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
baweaver has joined #ruby
mxrguspxrt has joined #ruby
<bar_> i'm trayin to istall pg with gem and I'm get this error http://paste.ubuntu.com/11974819/
<bar_> can someone help me pleas?
mxrguspxrt has quit [Remote host closed the connection]
<miah> bar_: Can't find the 'libpq-fe.h header
<shevy> checking for libpq-fe.h... no
<miah> bar_: you are probably missing the development libraries for postgresql
mxrguspxrt has joined #ruby
lkba_ has joined #ruby
sdothum has quit [Ping timeout: 252 seconds]
mxrguspxrt has quit [Remote host closed the connection]
ttilley has joined #ruby
ttilley has joined #ruby
<miah> bar_: i believe its 'libpq-dev' in ubuntu
lkba_ has quit [Client Quit]
freerobby has quit [Quit: Leaving.]
stamina has quit [Quit: WeeChat 1.2]
fantazo has quit [Ping timeout: 260 seconds]
freerobby has joined #ruby
<bar_> miah: thanks
mxrguspxrt has joined #ruby
niiamon has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 272 seconds]
jgpawletko_away is now known as jgpawletko
kies^ has joined #ruby
olistik has joined #ruby
kidoz has joined #ruby
mesamoo has quit [Quit: Konversation terminated!]
niiamon has quit [Ping timeout: 256 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
baroquebobcat has joined #ruby
jackjackdripper has joined #ruby
lkba has joined #ruby
Fire-Dragon-DoL has joined #ruby
<Fire-Dragon-DoL> mhhh I would love to evaluate minitest, but I need a good direction over good mocking library: rspec-mocks have been really good with spies, const stubs, doubles and methods stubs, I really don't know what should I use with minitest though
That1Guy has joined #ruby
lkba has quit [Client Quit]
rippa has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
DexterLB has quit [Ping timeout: 260 seconds]
olistik has quit [Ping timeout: 260 seconds]
krz has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
jaxxstorm has joined #ruby
DexterLB has joined #ruby
jaxxstorm has quit [Client Quit]
symm- has joined #ruby
Outlastsheep is now known as zz_Outlastsheep
jaxxstorm has joined #ruby
OrbitalKitten has joined #ruby
jenrzzz has joined #ruby
drewo has quit [Ping timeout: 264 seconds]
OrbitalKitten has quit [Client Quit]
phutchins has quit [Ping timeout: 246 seconds]
gambl0re has quit [Read error: Connection reset by peer]
willywos has joined #ruby
gambl0re has joined #ruby
s2013 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
OrbitalKitten has joined #ruby
diegoviola has quit [Ping timeout: 272 seconds]
benlieb has quit [Quit: benlieb]
diegoviola has joined #ruby
hj2007 has joined #ruby
baweaver has joined #ruby
pengin has joined #ruby
nitrix has joined #ruby
OrbitalKitten has quit [Ping timeout: 250 seconds]
NeverDie has joined #ruby
sdothum has joined #ruby
symm- has quit [Ping timeout: 264 seconds]
diegoviola has quit [Ping timeout: 256 seconds]
<hj2007> rbenv bundle issue: "which bundle" gives "/usr/bin/bundle" and not the one in shims. Hence, bundle install, installs gems in Gemfile in /Library/Ruby/Gems/2.0.0/gems instead of in shims.
PaulCapestany has quit [Quit: .]
baweaver has quit [Remote host closed the connection]
devoldmx has quit [Remote host closed the connection]
<hj2007> gem env, shows /Users/username/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0 in GEM PATHS
devoldmx has joined #ruby
devoldmx has quit [Remote host closed the connection]
nateberkopec has joined #ruby
devoldmx has joined #ruby
PaulCapestany has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
dimasg has joined #ruby
casadei_ has quit [Remote host closed the connection]
fantazo has joined #ruby
<hj2007> shevy
JoshL has quit []
mase-chatter has joined #ruby
<hj2007> Ox0dea
hfp has joined #ruby
hfp_work has joined #ruby
rideh has quit [Quit: zap]
hj2007 has quit [Quit: Leaving]
DoubleMalt has quit [Remote host closed the connection]
podman has quit [Quit: Connection closed for inactivity]
scripore has joined #ruby
<shevy> hj2007 I don't use rbenv, I always compile from source including different version of programs when necessary (though I am using only one ruby version nowadays, no longer need the old ones as I managed to update finally): wget ftp://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.xz
abdulrehman has quit [Quit: Page closed]
<jhass> no reason to quit >.<
AndChat|646809 has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
theery_ has joined #ruby
rideh has joined #ruby
theery has quit [Read error: Connection reset by peer]
someguy has joined #ruby
someguy has quit [Client Quit]
lxsameer has joined #ruby
dimasg has quit [Ping timeout: 240 seconds]
apt-get_ has quit [Read error: Connection reset by peer]
hfp has quit [Ping timeout: 246 seconds]
noname has joined #ruby
hfp_work has quit [Ping timeout: 246 seconds]
apt-get_ has joined #ruby
bounder has joined #ruby
symm- has joined #ruby
mary5030 has joined #ruby
frem has joined #ruby
fantazo has quit [Ping timeout: 246 seconds]
snockerton has joined #ruby
That1Guy has quit [Ping timeout: 246 seconds]
snockerton has quit [Client Quit]
snockerton has joined #ruby
hfp_work has joined #ruby
snockerton has left #ruby [#ruby]
hfp has joined #ruby
jobewan has joined #ruby
Igorshp has joined #ruby
hfp_ has joined #ruby
bounder has left #ruby [#ruby]
baweaver has joined #ruby
jeremy04 has joined #ruby
bounder has joined #ruby
mary5030 has quit [Remote host closed the connection]
AndChat-646809 has joined #ruby
hfp_work has quit [Ping timeout: 260 seconds]
hfp- has joined #ruby
mary5030 has joined #ruby
hfp has quit [Ping timeout: 272 seconds]
hfp_work has joined #ruby
AndChat|646809 has quit [Ping timeout: 240 seconds]
bricker has quit [Ping timeout: 260 seconds]
hfp_ has quit [Ping timeout: 264 seconds]
<bounder> Hello! Anyone experienced with the gc.c source code around? I currently need to force ruby to allocate a new heap page when it needs an allocation, so my current method is iterating through the objspace->heap_pages.sorted list and setting the free_slots count to zero, and setting the freelist to null in each page. After doing that, ruby does seem to be ending up calling the heap_page_allocate as expected, but it triggers an rb_bug for "same heap page is alloca
<bounder> Hello! Anyone experienced with the gc.c source code around? I currently need to force ruby to allocate a new heap page when it needs an allocation, so my current method is iterating through the objspace->heap_pages.sorted list and setting the free_slots count to zero, and setting the freelist to null in each page. After doing that, ruby does seem to be ending up calling the heap_page_allocate as expected, but it triggers an rb_bug for "same heap page is alloca
gambl0re has quit [Ping timeout: 255 seconds]
<bounder> Hello! Anyone experienced with the gc.c source code around? I currently need to force ruby to allocate a new heap page when it needs an allocation, so my current method is iterating through the objspace->heap_pages.sorted list and setting the free_slots count to zero, and setting the freelist to null in each page. After doing that, ruby does seem to be ending up calling the heap_page_allocate as expected, but it triggers an rb_bug for "same heap page is alloca
<bounder> Hello! Anyone experienced with the gc.c source code around? I currently need to force ruby to allocate a new heap page when it needs an allocation, so my current method is iterating through the objspace->heap_pages.sorted list and setting the free_slots count to zero, and setting the freelist to null in each page. After doing that, ruby does seem to be ending up calling the heap_page_allocate as expected, but it triggers an rb_bug for "same heap page is alloca
<dfockler> ops
<jhass> bounder: it came through the first time
curses has joined #ruby
hfp has joined #ruby
bounder has left #ruby [#ruby]
fantazo has joined #ruby
bounder has joined #ruby
<bounder> Hello! Anyone experienced with the gc.c source code around? I currently need to force ruby to allocate a new heap page when it needs an allocation, so my current method is iterating through the objspace->heap_pages.sorted list and setting the free_slots count to zero, and setting the freelist to null in each page. After doing that, ruby does seem to be ending up calling the heap_page_allocate as expected, but it triggers an rb_bug for "same heap page is alloca
lxsameer has quit [Ping timeout: 244 seconds]
arup_r has joined #ruby
bounder has left #ruby [#ruby]
hfp_work has quit [Ping timeout: 246 seconds]
<jhass> wth
bounder has joined #ruby
rodfersou has quit [Quit: leaving]
<jhass> bounder: no need to repeat it
rodfersou has joined #ruby
<bounder> i am sorry
<bounder> ive been using a web irc client and it's a little bit buggy. Didn't notice it went through.....
<bounder> I changed to a different one now.
rideh has quit [Quit: zap]
hfp- has quit [Ping timeout: 260 seconds]
rakm has joined #ruby
curses has quit [Ping timeout: 246 seconds]
<bounder> I couldn't see my messages nor yours. Now it's responsive
hfp_work has joined #ruby
devoldmx has quit [Remote host closed the connection]
hfp has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
hfp has joined #ruby
ishahnaz has quit []
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
momomomomo has joined #ruby
eminencehc has quit [Remote host closed the connection]
bohallor has joined #ruby
SuMo_D has joined #ruby
mary5030 has quit [Ping timeout: 260 seconds]
hfp_work has quit [Ping timeout: 244 seconds]
<Mon_Ouie> Also your message was truncated. It ends at "same heap page is alloca"
hfp_work has joined #ruby
hfp has quit [Ping timeout: 246 seconds]
DLSteve has joined #ruby
baweaver has quit [Remote host closed the connection]
lxsameer has joined #ruby
<bounder> Thanks for the notice, I'm in a better client now. should be "same heap page is allocated" (it's the call in gc.c line 1493 for the ruby 2.2 release)
ynroot has joined #ruby
<bar_> i'm trying to run rails server and get this error http://paste.ubuntu.com/11975233/ can someone please help
eminencehc has joined #ruby
hfp has joined #ruby
<jhass> ?rails bar_
<ruboto> bar_, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<bar_> ruboto: thanks
hfp__work has joined #ruby
<polpak> heh
<polpak> turing test passed!
hfp_ has joined #ruby
<lukas> is this a good place for rails questions?
<apeiros> I'm really baffled by how many people don't figure that ruboto is a bot…
<apeiros> ?rails lukas
<ruboto> lukas, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
bar_ is now known as slani
s2013 has joined #ruby
<lukas> thanks!
apeiros is now known as ruby_channelbot
ruby_channelbot is now known as apeiros
<apeiros> hm, or…
apeiros is now known as ruby[bot]
ruby[bot] is now known as apeiros
<jhass> apeiros: just strip the final o :P
user1138 has quit [Ping timeout: 246 seconds]
<apeiros> ruBot?
<jhass> something like that
<apeiros> not a robot, a rubot!
<apeiros> meh
* apeiros not like
hfp_work has quit [Ping timeout: 264 seconds]
hfp__work is now known as hfp_work
hololeap has joined #ruby
hfp has quit [Ping timeout: 256 seconds]
hfp_ is now known as hfp
<Mon_Ouie> ruboto passes the Turing test!
JoshL has joined #ruby
Kully3xf_ has joined #ruby
<apeiros> Mon_Ouie: no, no. the interacting channel members fail the turing test.
impalle has quit [Ping timeout: 256 seconds]
<apeiros> I think touring simply didn't expect the average attention and deductive capabilities to fall so sharply
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kidoz has quit [Quit: Ухожу я от вас]
kully3xf has quit [Ping timeout: 255 seconds]
nzst has joined #ruby
lxsameer has quit [Ping timeout: 250 seconds]
Azure has quit [Excess Flood]
Synthead has quit [Remote host closed the connection]
bumbar_ has quit [Ping timeout: 240 seconds]
Synthead has joined #ruby
chadwtaylor has quit [Quit: Leaving...]
pengin has quit [Remote host closed the connection]
AndChat|646809 has joined #ruby
nofxx has quit [Ping timeout: 250 seconds]
bruno- has joined #ruby
nofxx has joined #ruby
nofxx has joined #ruby
AndChat-646809 has quit [Ping timeout: 240 seconds]
fantazo has quit [Quit: Verlassend]
danzilio has joined #ruby
zz_Outlastsheep has quit [Ping timeout: 264 seconds]
shadoi has quit [Quit: Leaving.]
nzst has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
startupality has quit [Quit: startupality]
juanpablo_____ has joined #ruby
timonv has joined #ruby
juanpablo____ has quit [Read error: Connection reset by peer]
countryHick has quit [Quit: Connection closed for inactivity]
user1138 has joined #ruby
vyorkin has joined #ruby
schaerli has joined #ruby
dgutierrez1287 has joined #ruby
c0ncealed has quit [Remote host closed the connection]
baweaver has joined #ruby
lxsameer has joined #ruby
cmisenas has quit [Quit: cmisenas]
kully3xf has joined #ruby
c0ncealed has joined #ruby
bigbadbear has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
Kully3xf_ has quit [Ping timeout: 256 seconds]
schaerli has quit [Ping timeout: 246 seconds]
podman has joined #ruby
dgutierrez1287 has quit [Ping timeout: 256 seconds]
centrx has joined #ruby
choppington has quit [Ping timeout: 260 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jtdoncas has quit [Ping timeout: 265 seconds]
j4cknewt has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby
momomomomo has quit [Quit: momomomomo]
MatthewsFace has quit [Remote host closed the connection]
jtdoncas has joined #ruby
benlovell has joined #ruby
<shevy> Turing was a bot
bricker has joined #ruby
swgillespie has joined #ruby
kadoppe has quit [Ping timeout: 272 seconds]
momomomomo has joined #ruby
bluOxigen has quit [Ping timeout: 265 seconds]
<Ox0dea> > Every innovator in computer science is a bot except you.
jtdoncas has quit [Ping timeout: 250 seconds]
<shevy> Alan Kay is not a bot :)
benlovell has quit [Ping timeout: 244 seconds]
<centrx> Your mom's a bot
kadoppe has joined #ruby
quimrstorres has joined #ruby
blaines has joined #ruby
workmad3 has joined #ruby
blaines_ has joined #ruby
pengin_ has joined #ruby
rodferso1 has joined #ruby
j4cknewt has quit [Ping timeout: 246 seconds]
Igorshp has quit [Ping timeout: 252 seconds]
MasterPiece has quit [Quit: Leaving]
rodfersou has quit [Ping timeout: 252 seconds]
<slani> hello, i'm trying to creat db with rake db:create and get this error http://paste.ubuntu.com/11975515/
niiamon has joined #ruby
<mikecmpbll> slani: looks like postgres isn't running ..
ynroot has quit [Ping timeout: 244 seconds]
blaines has quit [Ping timeout: 246 seconds]
jtdoncas has joined #ruby
<slani> mikecmpbll: how can I run it?
workmad3 has quit [Ping timeout: 252 seconds]
<mikecmpbll> slani: no idea, i do not use postgres
<mikecmpbll> slani: !g starting postgres
<mikecmpbll> whaaaaat
jesseherrick has joined #ruby
texasmade has joined #ruby
sshuff is now known as sshuff|gone
<apeiros> weeeell
huko_ has quit [Quit: Lingo: www.lingoirc.com]
<apeiros> ?rails slani
<ruboto> slani, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
andersoldahl has joined #ruby
<mikecmpbll> oops
* mikecmpbll facepalms
riffraff has quit [Quit: This computer has gone to sleep]
<apeiros> happens ;-)
sdana has joined #ruby
baweaver has quit [Remote host closed the connection]
niiamon has quit [Ping timeout: 260 seconds]
countryHick has joined #ruby
foobar111 has joined #ruby
leafybasil has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
j4cknewt has joined #ruby
symm- has quit [Quit: Leaving...]
leesharma has quit [Ping timeout: 265 seconds]
jtdoncas has quit [Ping timeout: 260 seconds]
havenwood has joined #ruby
Azure has joined #ruby
foobar111 has quit [Ping timeout: 246 seconds]
cndiv has joined #ruby
<imperator> slani, pg_ctl --help
<cndiv> Dumb newbie question from someone learning: is there an offline 'glossary' of all Ruby related terms someplace I can download?
<apeiros> ?quickref cndiv
<apeiros> not really a glossary, but it's quite a concise piece of info
<cndiv> That's beautiful, thank you all. Perfect.
pengin_ has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
jamto11 has quit []
Azure has quit [Client Quit]
andersoldahl has quit [Quit: My Mac has gone to sleep.]
momomomomo has quit [Quit: momomomomo]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Mon_Ouie> ri also contains useful information (e.g. ri Regexp describes the syntax for regular expressions)
baweaver has joined #ruby
axl__ has joined #ruby
axl_ has quit [Ping timeout: 260 seconds]
axl__ is now known as axl_
centrx has quit [Quit: 'Get out, you and all the people who follow you!' Then he went out from Pharaoh in hot anger.]
dede has quit [Quit: Connection closed for inactivity]
sdana has quit [Quit: sdana]
symm- has joined #ruby
olistik has joined #ruby
reppard has joined #ruby
<reppard> hello all
<havenwood> redlegion: hi
<havenwood> reppard: hi
leesharma has joined #ruby
<havenwood> redlegion: sry, misstell
* havenwood can't tell a "p" from a "d"
<havenwood> just the same thing rotated...
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krz has quit [Quit: WeeChat 1.2]
k3asd` has joined #ruby
<shevy> coffee time again for havenwood
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<reppard> I want to create a gem that makes use of a system binary. What is the best practice here? Should I bundle the binary with the gem?
<shevy> zenspider's quickref is one of the most often cited link here :D
chills42 has quit [Remote host closed the connection]
olistik has quit [Ping timeout: 265 seconds]
<shevy> reppard well, depends what you want to have. if you distribute it, you can ensure that it will always be available. you could however had also check if it exists, and then branch out "if user has this binary, use it, else use the provided one". what binary is it or what does it do?
devoldmx has quit [Read error: Connection reset by peer]
<shevy> I myself would not distribute binaries like that btw
devoldmx has joined #ruby
leesharma has quit [Ping timeout: 264 seconds]
<Ox0dea> reppard: Are you sure there doesn't exist a library to emulate what you'd be using the binary for?
hashrock_ has joined #ruby
tmtwd has joined #ruby
cndiv has quit [Quit: Quit]
umgrosscol has quit [Remote host closed the connection]
<reppard> so I'm calling down to envconsul
kully3xf has quit [Read error: Connection reset by peer]
<reppard> for pulling key values from something like Consul or etcd
baroquebobcat has quit [Quit: baroquebobcat]
kully3xf has joined #ruby
<reppard> there is a gem called Dimplomat which does the same thing with rest connectors but I'd like to be able to grab all key values based on a prefix and the handle the parsing instead of multiple rest calls for each value
<reppard> s/Dimplomat/Diplomat
<reppard> It seems like the best thing to do is just check for envconsul on the system
juanpablo______ has joined #ruby
<Ox0dea> Well, it's really not the done thing to ship opaque binaries in gems.
juanpablo_____ has quit [Ping timeout: 240 seconds]
<reppard> yeah it felt bad if i were to distribute the gem. just thought i'd ask
blue_deref has quit [Quit: bbn]
<reppard> thanks for intertaining me =)
MatthewsFace has joined #ruby
<reppard> entertain even
<Ox0dea> You could try writing a C extension that calls into Go. It's technically feasible, but might end up more trouble than it'd be worth.
Channel6 has quit [Quit: Leaving]
<Ox0dea> It'd also have to be an older version of the Go ABI, since Go is now completely written in Go.
quimrstorres has quit [Remote host closed the connection]
<reppard> *mind blown*
<Ox0dea> Self-hosting languages are a dime a dozen these days.
<Ox0dea> It is tricky to wrap one's head around the first time through, though.
j4cknewt has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
vyorkin has quit [Quit: WeeChat 1.2]
devoldmx has joined #ruby
<jesseherrick> Just jumping in here, but Zeus is pretty much written totally in Go, but packaged into a gem
banister has joined #ruby
pauly_oc has quit [Quit: Textual IRC Client: www.textualapp.com]
<dfockler> hey I wrote a bloom filter in ruby, it was pretty simple
towski_ has quit [Remote host closed the connection]
jtdoncas has joined #ruby
<Ox0dea> dfockler: Cuckoo filter next?
<dfockler> I'll have to figure out what that is
jaxxstorm has quit [Remote host closed the connection]
jaxxstorm has joined #ruby
juanpablo______ has quit [Ping timeout: 250 seconds]
juanpablo_______ has joined #ruby
jaxxstorm has quit [Read error: Connection reset by peer]
<slani> I'm traying to initialize a database with rake db:migrate but geting this error http://paste.ubuntu.com/11975733/
<slani> can someone help
jaxxstorm has joined #ruby
<reppard> slani: did you rake db:create?
<havenwood> slani: The best place for Rails questions is the #RubyOnRails channel.
JoshL has quit []
r4do has quit [Quit: Leaving.]
hashrocket has quit []
hashrock_ is now known as hashrocket
arooni has joined #ruby
bohallor has quit [Ping timeout: 265 seconds]
tsvenson has quit [Ping timeout: 252 seconds]
troulouliou_dev has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
Azure has joined #ruby
lxsameer has quit [Quit: Leaving]
d10n-work has quit [Quit: Connection closed for inactivity]
baweaver has quit [Remote host closed the connection]
olistik has joined #ruby
tsvenson has joined #ruby
bounder has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
pengin has joined #ruby
baroquebobcat has joined #ruby
dorei has joined #ruby
swgillespie has joined #ruby
towski_ has joined #ruby
pietr0_ has joined #ruby
tsvenson has quit [Ping timeout: 240 seconds]
tsvenson has joined #ruby
pietr0 has quit [Ping timeout: 255 seconds]
pietr0_ is now known as pietr0
swgillespie has quit [Client Quit]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Igorshp has joined #ruby
ogpastal_ has joined #ruby
apt-get_ has quit [Ping timeout: 240 seconds]
reppard has quit [Ping timeout: 244 seconds]
sankaber has joined #ruby
ogpastal_ has quit [Remote host closed the connection]
<willywos> is anyone famliar with rake? is there a good way to pass arguments without having to use brackets?
imperator has left #ruby ["Leaving"]
diegoviola has joined #ruby
ogpasta__ has joined #ruby
<apeiros> willywos: the way before bracketed args was to use env vars
<apeiros> rake foo:bar ENVNAME=value
j3r0 has joined #ruby
ogpastaling has quit [Ping timeout: 246 seconds]
sankaber has quit [Client Quit]
Seich has quit [Ping timeout: 244 seconds]
_seanc_ has joined #ruby
<willywos> hmm ok i'm wondering if maybe just doing somehting like "rake foo MyArgument"
<j3r0> hi guys what is the channel for rails ?
<havenwood> ?rails j3r0
<ruboto> j3r0, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
bustrarm has joined #ruby
lele is now known as Guest24
jesseherrick has quit [Ping timeout: 244 seconds]
Igorshp has quit [Ping timeout: 260 seconds]
ogpasta__ has quit [Remote host closed the connection]
<shevy> havenwood! you are becoming bot-like :)
Seich has joined #ruby
<shevy> this is about the fifth time today that you tell people to go to rails, via ruboto or so :D
<havenwood> shevy: Slowly as the spice consumes me.
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
busterarm is now known as Guest15259
Guest15259 has quit [Killed (weber.freenode.net (Nickname regained by services))]
bustrarm is now known as busterarm
arup_r has quit [Quit: Leaving]
j3r0 has quit [Client Quit]
EagleDelta has joined #ruby
Jackneill has quit [Ping timeout: 255 seconds]
j3r0 has joined #ruby
apt-get_ has joined #ruby
blue_deref has joined #ruby
<cscheib> is net::smtp part of the base distribution? it's not finding it on my RHEL7.1 install, and it doesn't appear to be a gem, and it's pissing me off
j3r0 has quit [Client Quit]
Blaguvest has quit []
konsolebox has quit [Quit: Leaving]
ldnunes has quit [Quit: Leaving]
havenwood has quit [Ping timeout: 240 seconds]
pengin has quit [Remote host closed the connection]
reppard has joined #ruby
zz_Outlastsheep has joined #ruby
djbkd has quit [Remote host closed the connection]
j3r0 has joined #ruby
rodferso1 has quit [Quit: leaving]
graydot has joined #ruby
[Butch] has quit [Read error: Connection reset by peer]
<Ox0dea> 18>> require 'net/smtp' # cscheib
<ruboto> Ox0dea # => true (https://eval.in/409844)
<cscheib> yea, that's what I'm doing in my code
Trynemjoel has quit [Ping timeout: 250 seconds]
<cscheib> did more searching - it's in /usr/share/ruby/net
<reppard> exit
reppard has quit [Client Quit]
[Butch] has joined #ruby
Trynemjoel has joined #ruby
<cscheib> sec, I'll gist my error
AnoHito has quit [Quit: Leaving]
<cscheib> probably something to do with PATH or something.
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> cscheib: It's SMTP, not SNMP.
michael_mbp has quit [Excess Flood]
dvb_ua has quit [Ping timeout: 240 seconds]
michael_mbp has joined #ruby
<cscheib> ugh.
<cscheib> stupid mistakes.
AnoHito has joined #ruby
<cscheib> been looking at a screen too long
timonv has joined #ruby
leesharma has joined #ruby
j3r0 has quit [Quit: Leaving]
jero_ has joined #ruby
j3r0 has joined #ruby
EagleDelta has quit [Read error: Connection reset by peer]
huko_ has joined #ruby
yfeldblum has joined #ruby
tennis_ has quit [Remote host closed the connection]
_blizzy_ has quit [Ping timeout: 246 seconds]
gamename has joined #ruby
austin-philp has joined #ruby
diegoviola has quit [Remote host closed the connection]
abdulrehman has joined #ruby
texasmade has quit [Ping timeout: 240 seconds]
pengin has joined #ruby
Jarboe has quit []
j3r0 has quit [Client Quit]
leesharma has quit [Ping timeout: 264 seconds]
j3r0 has joined #ruby
j3r0 has quit [Read error: Connection reset by peer]
art-solopov has joined #ruby
gamename has quit [Read error: Connection reset by peer]
huko_ has quit [Remote host closed the connection]
j3r0 has joined #ruby
j3r0 has quit [Client Quit]
abdulrehman has left #ruby [#ruby]
j3r0 has joined #ruby
devoldmx has quit [Remote host closed the connection]
devoldmx has joined #ruby
huko_ has joined #ruby
banister has quit [Ping timeout: 265 seconds]
chouhoulis has quit [Remote host closed the connection]
htmldrum has joined #ruby
baweaver has joined #ruby
Jarboe has joined #ruby
apt-get_ has quit [Quit: Quit]
banister has joined #ruby
austin-philp has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
sarkyniin has joined #ruby
banister has quit [Client Quit]
_ht has quit [Quit: Konversation terminated!]
allie has joined #ruby
lidenbrock has quit [Ping timeout: 246 seconds]
AbdulRehman_ has joined #ruby
exadeci has joined #ruby
theery_ has quit [Remote host closed the connection]
graydot has quit [Quit: graydot]
Mia has joined #ruby
Mia has joined #ruby
Rollabunna has joined #ruby
banister has joined #ruby
Axy has quit [Ping timeout: 255 seconds]
olistik has quit [Remote host closed the connection]
Rollabun_ has quit [Ping timeout: 265 seconds]
Igorshp has joined #ruby
cajone has quit [Ping timeout: 265 seconds]
devdazed has quit [Quit: Computer has gone to sleep.]
AbdulRehman_ has quit [Quit: AbdulRehman_]
graydot has joined #ruby
codecop has quit [Remote host closed the connection]
lwu_ has quit [Ping timeout: 252 seconds]
grill has quit [Quit: ( www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )]
niiamon has joined #ruby
k3asd` has quit [Ping timeout: 244 seconds]
arooni has quit [Ping timeout: 246 seconds]
njs126 has quit [Quit: Leaving]
icebourg has quit []
freerobby has joined #ruby
graydot has quit [Quit: graydot]
huko_ has quit [Quit: Lingo: www.lingoirc.com]
devoldmx has quit [Remote host closed the connection]
decoponio has quit [Read error: Connection reset by peer]
willywos has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
graydot has joined #ruby
devoldmx has joined #ruby
niiamon has quit [Ping timeout: 260 seconds]
decoponio has joined #ruby
bigbadbear has quit [Ping timeout: 256 seconds]
shinnya has joined #ruby
HoppingMadMan has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
scripore has quit [Quit: This computer has gone to sleep]
hashrocket has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cajone has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
baweaver has quit [Remote host closed the connection]
jenrzzz has joined #ruby
user1138_ has joined #ruby
user1138 has quit [Ping timeout: 246 seconds]
Vile` has quit [Ping timeout: 252 seconds]
dgutierrez1287 has joined #ruby
baweaver has joined #ruby
Vile` has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<leitz> If you are using OptionParser to set options, is there an issue with opening files based on those same options? Moving lines 21 and 22 to 11 and 12.
abdulrehman has joined #ruby
viralRF has joined #ruby
tenderlove has joined #ruby
<polpak> leitz: it's a scoping problem
ogpastaling has joined #ruby
graydot has quit [Quit: graydot]
dgutierrez1287 has quit [Ping timeout: 250 seconds]
swgillespie has joined #ruby
<leitz> polpak, line 3 sets the hash outside of the options scope for line 12. Is that what you mean?
<polpak> leitz: variables defined within the block can't be accessed after you're out of the block again
mistym has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
WillAmes has joined #ruby
jgt has joined #ruby
<polpak> >> [1,2].each { |i| b = i }; puts b
<ruboto> polpak # => undefined local variable or method `b' for main:Object (NameError) ...check link for more (https://eval.in/409894)
<apeiros> polpak: but they define all variables outside the block
<apeiros> ah
crdpink has joined #ruby
<apeiros> they talk about the outcommented code
crdpink2 has quit [Ping timeout: 244 seconds]
<apeiros> ok, right on :D
<polpak> leitz: ^^
<polpak> >> b = nil; [1,2].each { |i| b = i }; puts b
<ruboto> polpak # => 2 ...check link for more (https://eval.in/409895)
devoldmx has quit [Remote host closed the connection]
jgt1 has joined #ruby
devoldmx has joined #ruby
<leitz> So far it seems that anything with the options requires something to be defined before the options block. Either an options hash, or whatever.
axl_ has quit [Quit: axl_]
<polpak> leitz: it has nothing to do with options, or OptionParser
<polpak> leitz: see my code snippets above
<polpak> leitz: it's a scoping issue with the variables
<polpak> leitz: if you define the variable within the block it only has scope within the block
axl_ has joined #ruby
devdazed has joined #ruby
<leitz> That's what I said about line 3. It is defined outside the block, and used after the block is ended.
jobewan has quit [Quit: Leaving]
vickleton has quit [Ping timeout: 255 seconds]
jgt has quit [Ping timeout: 240 seconds]
diegoviola has joined #ruby
kies^ has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
djbkd has joined #ruby
art-solopov has quit [Quit: Konversation terminated!]
irctc711 has joined #ruby
<polpak> leitz: I'm not sure what your question is
scripore has joined #ruby
graydot has joined #ruby
<leitz> polpak, you said the scoping issue would prevent the code from working.
ogpastaling has quit [Remote host closed the connection]
ogpastaling has joined #ruby
<leitz> That was my understanding, anyway. With declaring the two options before the OptionParser block, it seems to work.
<polpak> leitz: you can't access variables that aren
<polpak> nt in scope
<polpak> leitz: if you give them scope outside the block then you can still access them outside the block
<irctc711> hello im trying to create a log in form in rails, here is my form: https://gist.github.com/anonymous/69bbe062b7593806f347 ,here is my the next controller for the new view https://gist.github.com/anonymous/c0a830c1678525fc2791, im confused on what to do. I have two controllers with two views. the root has the log in form, is that where i also put the logic to log in?
<leitz> polpak, yup. That's what's happening, I think.
<irctc711> currently i get a error of "No route matches [POST] "/welcome/index" " when i click log in
<leitz> At least, it works. :)
RobertBirnie has quit [Ping timeout: 272 seconds]
user1138_ has quit [Ping timeout: 255 seconds]
devoldmx has quit [Remote host closed the connection]
devoldmx has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
ogpastaling has quit [Ping timeout: 250 seconds]
Senjai has quit [Ping timeout: 264 seconds]
poguez_ has quit [Quit: Connection closed for inactivity]
Exuma has joined #ruby
abdulrehman has quit [Quit: AbdulRehman]
timonv has quit [Ping timeout: 264 seconds]
<BraddPitt> irctc711 this would be better suited for #rails
<BraddPitt> but, can you post your routes and/or output of `rake routes`?
Exuma has quit [Client Quit]
hashrocket has joined #ruby
Thomas-0725 has joined #ruby
curses has joined #ruby
chouhoulis has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
neoseeker has joined #ruby
<shevy> what does Errno::ENOENT stand for? the ENOENT shortcut
<apeiros> E = Error, NO = well, NO, ENT = Entity
<ljarvis> NO ENTry
<apeiros> oh, ENTry? not Entity? sad
hashrocket has quit [Client Quit]
<ljarvis> iirc
<ljarvis> might be entity?
<ljarvis> 8shrug*
<ljarvis> eh
<ljarvis> it's late
<apeiros> na
<apeiros> entry seems right
devoldmx has quit [Remote host closed the connection]
<apeiros> at least google says same
towski_ has quit [Remote host closed the connection]
devoldmx has joined #ruby
<apeiros> and yeah, late, hence: n8! :D
s00pcan has quit [Quit: Lost terminal]
<ljarvis> nn :D
olistik has joined #ruby
spider-mario has quit [Remote host closed the connection]
yqt has joined #ruby
curses has quit [Ping timeout: 244 seconds]
Zai00 has quit [Quit: Zai00]
Senjai has joined #ruby
hinbody has quit [Quit: leaving]
axl_ has quit [Quit: axl_]
s00pcan has joined #ruby
olistik has quit [Ping timeout: 244 seconds]
OrbitalKitten has joined #ruby
ReK2 has joined #ruby
ReK2 has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
HoppingMadMan has quit [Ping timeout: 246 seconds]
Cache_Money has quit [Quit: Cache_Money]
OrbitalKitten has quit [Client Quit]
<BraddPitt> Is there an ActionController equivalent to ActiveSupport::Notifications?
<BraddPitt> (maybe this is better suited for #rails)
DLSteve has quit [Quit: Leaving]
irctc711 has quit [Quit: Page closed]
bodgix has joined #ruby
chouhoulis has quit [Remote host closed the connection]
charliesome has joined #ruby
charliesome has quit [Client Quit]
<adaedra> yes it is
<adaedra> #RubyOnRails, in fact
quimrstorres has joined #ruby
juanpablo_______ has quit [Quit: (null)]
djstorm has quit [Ping timeout: 250 seconds]
Mendenhall has joined #ruby
<BraddPitt> is that the official freenode channel?
charliesome has joined #ruby
juanpablo_______ has joined #ruby
triangles2 has quit [Read error: Connection reset by peer]
pauly_oc has joined #ruby
juanpablo_______ has quit [Ping timeout: 240 seconds]
<adaedra> well, official, I don't know, it's the one we always refer to from here
s00pcan has quit [Remote host closed the connection]
<ljarvis> yeah it's official
<ljarvis> as official as it gets
casadei_ has joined #ruby
mleung has quit [Quit: mleung]
grios has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz has joined #ruby
jesseherrick has joined #ruby
abdulrehman has joined #ruby
sarkyniin has quit [Ping timeout: 265 seconds]
frem has quit [Quit: Connection closed for inactivity]
Mon_Ouie has quit [Ping timeout: 246 seconds]
casadei_ has quit [Ping timeout: 272 seconds]
Thomas-0725 has quit [Ping timeout: 240 seconds]
Thomas-0725 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
neoseeker has quit [Remote host closed the connection]
iceyec has quit [Ping timeout: 240 seconds]
_seanc_ has quit [Quit: _seanc_]
diegoviola has quit [Quit: WeeChat 1.2]
wldcordeiro_ has quit [Quit: Konversation terminated!]
kirun has quit [Quit: Client exiting]
_seanc_ has joined #ruby
bricker has quit [Read error: Connection reset by peer]
s00pcan has joined #ruby
Igorshp has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
yfeldblum has quit [Remote host closed the connection]
nsuke has joined #ruby
MatrixBridge has quit [Ping timeout: 256 seconds]
f3ttX] has quit [Quit: Lost terminal]
yfeldblum has joined #ruby
theery has joined #ruby
sarkyniin has joined #ruby
Fire-Dragon-DoL has quit []
marr has quit []
Igorshp has quit [Remote host closed the connection]
Bloodshot has quit []
zacts has joined #ruby
MatrixBridge has joined #ruby
podman has joined #ruby
bricker has joined #ruby
SuMo_D has quit [Remote host closed the connection]
rcvalle has quit [Quit: rcvalle]
Yzguy has joined #ruby
rehat_ has quit [Remote host closed the connection]
SCHAAP137 has quit [Remote host closed the connection]
jgt1 has quit [Ping timeout: 244 seconds]
abdulrehman has quit [Quit: AbdulRehman]
drewo has joined #ruby
abdulrehman has joined #ruby
theery has quit [Remote host closed the connection]
Kasey has joined #ruby
xNoodles has joined #ruby
xNoodles has quit []
scripore has quit [Quit: This computer has gone to sleep]
SuMo_D has joined #ruby
dfockler has quit [Remote host closed the connection]
abdulrehman has quit [Quit: AbdulRehman]
abdulrehman has joined #ruby
devoldmx has quit [Ping timeout: 272 seconds]
<Antiarc> ?rails
<ruboto> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
abdulrehman has quit [Client Quit]
baroquebobcat has quit [Quit: baroquebobcat]
jesseherrick has quit [Ping timeout: 240 seconds]
abdulrehman has joined #ruby
niiamon has joined #ruby
danzilio has quit [Quit: My computer has fallen asleep!]
<abdulrehman> :d
havenwood has joined #ruby
schaerli has joined #ruby
bonhoeffer has joined #ruby
niiamon has quit [Ping timeout: 240 seconds]
jesseherrick has joined #ruby
baweaver has quit [Remote host closed the connection]
danzilio has joined #ruby
davedev24 has quit [Ping timeout: 265 seconds]
charlenopires has joined #ruby
Yzguy has quit [Quit: Zzz...]
schaerli has quit [Ping timeout: 240 seconds]
davedev24 has joined #ruby
kfpratt has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
SuMo_D has quit [Remote host closed the connection]
elfuego has joined #ruby
towski_ has joined #ruby
s00pcan has quit [Remote host closed the connection]
polpak has quit [Quit: leaving]
bricker has quit [Ping timeout: 240 seconds]
werelivi_ has quit [Remote host closed the connection]
werelivi_ has joined #ruby
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
kfpratt has quit [Remote host closed the connection]
tkuchiki has joined #ruby