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 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…]
<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]
<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
<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>
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?
<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]
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)
<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'
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
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)
<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…]
<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…]
<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?
<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
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
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
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
<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?
<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?
<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. :)
<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.]
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]
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
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]
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
<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: 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! :-)
<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]
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
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>
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.
<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?
<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...
<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
<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]
<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]
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]
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)
<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
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]
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.