havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.0, 2.3.3 & 2.2.6: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby
brent__ has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brent___ has quit [Ping timeout: 256 seconds]
ferr1 has quit [Quit: WeeChat 1.6]
gusrub has joined #ruby
n0equal has joined #ruby
gigetoo has quit [Ping timeout: 264 seconds]
dc4 has joined #ruby
mim1k|wo1k has joined #ruby
gigetoo has joined #ruby
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k|work has quit [Ping timeout: 240 seconds]
kht has joined #ruby
<raspado> is there a way to print the results in my array loop, instead of how i am doing it outside? (it doesnt work that way) http://pastebin.com/Jrr2YP76
<ruby[bot]> raspado: as I told you already, please use https://gist.github.com
choke has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AndBobsYourUncle has joined #ruby
saneax is now known as saneax-_-|AFK
nertzy has joined #ruby
JeanCarloMachado has joined #ruby
brent__ has quit [Ping timeout: 245 seconds]
guacamole has quit [Quit: leaving]
patarr has quit [Ping timeout: 256 seconds]
hahuang61 has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
nofxx has quit [Remote host closed the connection]
Lucky_ABA has joined #ruby
nofxx has joined #ruby
xen0fon has joined #ruby
nofxxxx has joined #ruby
__Yiota has joined #ruby
kht has quit [Ping timeout: 260 seconds]
mwlang has quit [Ping timeout: 255 seconds]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
montanonic has joined #ruby
jinie has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gigetoo has quit [Read error: Connection reset by peer]
youch has joined #ruby
gigetoo has joined #ruby
guacamole has joined #ruby
ecuanaso has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
statelesscode has joined #ruby
AndrewIsHere has quit []
JeanCarloMachado has joined #ruby
cdg has joined #ruby
youch has quit [Ping timeout: 240 seconds]
<havenwood> raspado: It seems from your example that you're expecting #each to work like #map, but it doesn't.
<havenwood> >> [1, 2, 3].each { |n| n + 42 } # raspado
<ruby[bot]> havenwood: # => [1, 2, 3] (https://eval.in/725859)
<havenwood> >> [1, 2, 3].map { |n| n + 42 } # raspado
<ruby[bot]> havenwood: # => [43, 44, 45] (https://eval.in/725860)
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
fnljk has quit [Disconnected by services]
fnljk_ has joined #ruby
gigetoo has quit [Ping timeout: 255 seconds]
duckpupp1 has joined #ruby
n0equal has quit [Ping timeout: 255 seconds]
Julianee has quit [Remote host closed the connection]
gigetoo has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maddmaxx has joined #ruby
BackEndCoder has quit [Excess Flood]
__Yiota has joined #ruby
kht has joined #ruby
BackEndCoder has joined #ruby
duckpupp1 has quit [Ping timeout: 264 seconds]
xlegoman has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
pavshn has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
gigetoo has joined #ruby
mostlybadfly has joined #ruby
cibs has quit [Ping timeout: 256 seconds]
benlieb has quit [Quit: benlieb]
agent_white has quit [Quit: leaving]
scootaloo has quit [Quit: Textual IRC Client: www.textualapp.com]
cdg has quit [Remote host closed the connection]
cibs has joined #ruby
chouhoulis has joined #ruby
zeroDi has quit [Quit: WeeChat 1.6]
choke has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
al2o3-cr has joined #ruby
chouhoulis has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
username_ has quit [Ping timeout: 260 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
benlieb has joined #ruby
gigetoo has joined #ruby
dopamean_ has joined #ruby
choke has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brent__ has joined #ruby
polyidus has joined #ruby
Lucky_ABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brent__ has quit [Ping timeout: 240 seconds]
gigetoo has quit [Ping timeout: 248 seconds]
gigetoo has joined #ruby
benlieb has quit [Quit: benlieb]
raul782 has joined #ruby
nankyokusei has joined #ruby
Lucky_ABA has joined #ruby
raul782 has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 240 seconds]
jessiepuls has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gigetoo has quit [Ping timeout: 245 seconds]
gusrub has quit []
gigetoo has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
Meeh has quit [Remote host closed the connection]
jenrzzz has joined #ruby
Meeh has joined #ruby
kht has quit [Ping timeout: 255 seconds]
fnljk has joined #ruby
brybeecher has quit [Ping timeout: 255 seconds]
fnljk_ has quit [Ping timeout: 252 seconds]
Takumo has quit [Remote host closed the connection]
gigetoo has quit [Ping timeout: 255 seconds]
<raspado> is there a way to add strings to keys from an array ? for example: key = "idx_" + row.values_at('tablename') + "_custkey"
duckpupp1 has joined #ruby
Meeh has quit [Remote host closed the connection]
Meeh has joined #ruby
gigetoo has joined #ruby
<raspado> if I do "idx_" + row.values_at('tablename').to_s + "_custkey" I get "idx_["f_0_key"]_custkey" which is not right
<al2o3-cr> rasp pi boats gotta b a way yo
duckpupp1 has quit [Ping timeout: 248 seconds]
fnljk has quit [Disconnected by services]
bruce_lee has quit [Read error: Connection reset by peer]
patarr has joined #ruby
blackwind_123 has quit [Ping timeout: 240 seconds]
mrwn has joined #ruby
<al2o3-cr> ?gist raspado example?
<ruby[bot]> raspado: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
gigetoo has quit [Ping timeout: 260 seconds]
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<toretore> ?xy raspado
<ruby[bot]> raspado: 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
gigetoo has joined #ruby
Xiti has quit [Quit: Xiti]
<raspado> each one of my keys in my array is an array within an array?
Xiti has joined #ruby
<raspado> is there a way to eliminate that so its ["1","2","3"] ?
despai has quit [Quit: This computer has gone to sleep]
<raspado> and not [["1"], ["2"], ["3"], ["4"]]
<al2o3-cr> raspado: flatten?
<raspado> let me try
patarr has quit [Ping timeout: 276 seconds]
redhedded1 has joined #ruby
<al2o3-cr> but i'm guessing here
<raspado> heh, nope didnt work hmmm
antgel has quit [Ping timeout: 276 seconds]
<al2o3-cr> raspado: do a little gist then
mrwn has quit [Remote host closed the connection]
<al2o3-cr> raspado: what you've got and what the expected output
__Yiota has joined #ruby
mrwn has joined #ruby
<raspado> im doing a for loop and adding each value into an empty array. Thats adding each value as an array within my array
<raspado> looking to just clean it up to remove all those single arrays in my example, i tried flatten(1) and flatten(0) but that didnt work :\
<al2o3-cr> raspado: i'd suggest giving real code
montanonic has quit [Ping timeout: 240 seconds]
braderhart has quit [Quit: Connection closed for inactivity]
gigetoo has quit [Ping timeout: 256 seconds]
<raspado> ahh i got it to work
<raspado> .reduce(:concat)
gigetoo has joined #ruby
<al2o3-cr> raspado: absolutley brilliant, well done sire
<al2o3-cr> raspado: how'd ya come up with that?
<toretore> >> [[1],[2],[3]].reduce(:concat) == [[1],[2],[3]].flatten(1)
<ruby[bot]> toretore: # => true (https://eval.in/725869)
jenrzzz has quit [Ping timeout: 240 seconds]
<al2o3-cr> amazing!!!
<raspado> ;)
Lucky_ABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<al2o3-cr> well fuck me (i still can't believe this shit)
<toretore> reduce(:concat) is stupid, don't do that
dopamean1 has joined #ruby
<raspado> toretore: shit works yo :)
<toretore> >> a=[[1],[2],[3]]; a.reduce(:concat); a
<ruby[bot]> toretore: # => [[1, 2, 3], [2], [3]] (https://eval.in/725870)
<sonOfRa> raspado: can you show what happens in your gist between line 3 and 5?
<toretore> raspado: you think you've solved the problem, but don't understand it
<sonOfRa> Because that's the relevant part, and you omitted that
<al2o3-cr> raspado: thats like doing `a=1; b=1; [a,b].inject(:==)`
<sonOfRa> err, between lines 2 and 4
polyidus has quit [Quit: ZZZzzz…]
dopamean_ has quit [Ping timeout: 245 seconds]
hightower3 has quit [Ping timeout: 264 seconds]
hanmac has quit [Ping timeout: 240 seconds]
hightower3 has joined #ruby
<al2o3-cr> >> String.new == ''
<ruby[bot]> al2o3-cr: # => true (https://eval.in/725871)
polyidus has joined #ruby
<al2o3-cr> >> String.new.encoding == ''.encoding
<ruby[bot]> al2o3-cr: # => false (https://eval.in/725875)
tvw has quit [Ping timeout: 255 seconds]
gigetoo has quit [Ping timeout: 245 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gigetoo has joined #ruby
MyMind has joined #ruby
Sembei has quit [Ping timeout: 240 seconds]
<al2o3-cr> >> "\0"b * 5
<ruby[bot]> al2o3-cr: # => /tmp/execpad-9efbd79503ae/source-9efbd79503ae:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/725879)
<al2o3-cr> >> "\0".b * 5
<ruby[bot]> al2o3-cr: # => "\x00\x00\x00\x00\x00" (https://eval.in/725880)
<al2o3-cr> >> "\0" * 5
<ruby[bot]> al2o3-cr: # => "\u0000\u0000\u0000\u0000\u0000" (https://eval.in/725881)
splud has quit [Quit: splud]
<al2o3-cr> jemima pddle duck
splud has joined #ruby
splud has quit [Client Quit]
dopamean1 has quit [Ping timeout: 240 seconds]
myk267 has joined #ruby
polyidus has quit [Quit: ZZZzzz…]
brent__ has joined #ruby
hanmac has joined #ruby
racso has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
<racso> hey
gigetoo has joined #ruby
kazlock has quit [Quit: This computer has gone to sleep]
<racso> is there an installable version of hpc ruby?
<al2o3-cr> anyone on ruby 2.4.0 x86_64
<racso> yes
<al2o3-cr> racso: can you check something for me
<racso> yes?
<al2o3-cr> b = "\0".b * 23; [1,2,3,4,5].pack('cslqj', buffer: b); [1,2,3,4,5].pack('@0cslqj', buffer: b)
<al2o3-cr> paste this into irb
gloscombe has quit [Quit: gloscombe]
<racso> irb(main):001:0> b = "\0".b * 23; [1,2,3,4,5].pack('cslqj', buffer: b); [1,2,3,4,5].pack('@0cslqj', buffer: b)
<racso> => "\x01\x02\x00\x03\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00"
<nofxxxx> same here
<nofxxxx> linux*
<racso> on linux mint 64 bit
<al2o3-cr> ok do b = "\0".b * 23; [1,2,3,4,5].pack('cslqj', buffer: b)
<al2o3-cr> then [1,2,3,4,5].pack('@0cslqj', buffer: b)
<racso> irb(main):002:0> b = "\0".b * 23; [1,2,3,4,5].pack('cslqj', buffer: b)
<racso> => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x00\x03\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00"
gigetoo has quit [Ping timeout: 245 seconds]
<racso> irb(main):003:0> [1,2,3,4,5].pack('@0cslqj', buffer: b)
<racso> irb(main):004:0>
<racso> => "\x01\x02\x00\x03\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00"
<al2o3-cr> hmm... thanks racso
<racso> np
harai_ has quit [Ping timeout: 258 seconds]
<racso> can i sleep now?
gigetoo has joined #ruby
<al2o3-cr> you can
<racso> thx :D
<al2o3-cr> wait
<racso> wow
raul782 has joined #ruby
<racso> one more?
<al2o3-cr> did you copy this in irb; b = "\0".b * 23; [1,2,3,4,5].pack('cslqj', buffer: b)
duckpupp1 has joined #ruby
<al2o3-cr> then paste this; [1,2,3,4,5].pack('@0cslqj', buffer: b)
<racso> i copy this in my editor
browndawg has joined #ruby
<racso> i saved it, but whats the problem_?
<al2o3-cr> try them in that order
<al2o3-cr> no wait
BackEndCoder has quit [Excess Flood]
brent__ has quit [Remote host closed the connection]
hirvi has quit [Ping timeout: 240 seconds]
duckpupp1 has quit [Ping timeout: 252 seconds]
gix has quit [Ping timeout: 252 seconds]
<al2o3-cr> racso: you got 2 mins?
BackEndCoder has joined #ruby
<racso> yes
blowfish has quit [Quit: Lost terminal]
roflmyeggo has joined #ruby
<al2o3-cr> racso: reset irb
<racso> ok
<al2o3-cr> k
d^sh has quit [Ping timeout: 240 seconds]
<al2o3-cr> paste this into irb; b = "\0".b * 23
polyidus has joined #ruby
govg has quit [Ping timeout: 276 seconds]
<racso> irb(main):001:0> b = "\0".b * 23
<racso> => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
jameser has joined #ruby
<al2o3-cr> now this; [1,2,3,4,5].pack('cslqj', buffer: b)
d^sh has joined #ruby
<racso> irb(main):002:0> [1,2,3,4,5].pack('cslqj', buffer: b)
<racso> => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
<al2o3-cr> racso: and lastly; [1,2,3,4,5].pack('@0cslqj', buffer: b)
hahuang62 has joined #ruby
<racso> irb(main):003:0> [1,2,3,4,5].pack('@0cslqj', buffer: b)
<racso> => "\x01\x02\x00\x03\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00"
gigetoo has quit [Ping timeout: 276 seconds]
raul782 has quit [Remote host closed the connection]
<al2o3-cr> hmm, thanks racso :)
<racso> np
gix has joined #ruby
racso has quit [Quit: Leaving]
raspado has quit [Quit: Leaving...]
gigetoo has joined #ruby
hahuang61 has quit [Ping timeout: 245 seconds]
roflmyeggo has quit [Remote host closed the connection]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
optiz0r has quit [Ping timeout: 255 seconds]
brent__ has joined #ruby
<al2o3-cr> thanks too nofxxxx
sneakerhax has joined #ruby
<nofxxxx> al2o3-cr, did nothing... what's the issue? out of curiosity hehe
<al2o3-cr> i get `RuntimeError: can't set length of shared string` in ruby2.4.0p0 arch linux
jameser_ has joined #ruby
<pragmatism> immutable strings finally make its way in?
<al2o3-cr> pragmatism: freeze baby
<pragmatism> fuck yeah
<pragmatism> al2o3-cr is that the latest patch version available?
optiz0r has joined #ruby
<al2o3-cr> nah p69
<al2o3-cr> women only
jameser has quit [Ping timeout: 255 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
dc4 has quit [Ping timeout: 258 seconds]
<al2o3-cr> last one; c = ''; IO.new(1).tap { |io| io.read(1, c) }; c
hfp_work has quit [Ping timeout: 240 seconds]
brent__ has quit [Remote host closed the connection]
Derperpe1 has quit [Ping timeout: 247 seconds]
hfp_work has joined #ruby
gigetoo has quit [Ping timeout: 256 seconds]
patarr has joined #ruby
gigetoo has joined #ruby
patarr has quit [Ping timeout: 276 seconds]
nankyokusei has joined #ruby
JoshS has joined #ruby
ramfjord_ has quit [Ping timeout: 245 seconds]
jameser_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 260 seconds]
gigetoo has quit [Ping timeout: 258 seconds]
duderonomy has quit [Ping timeout: 255 seconds]
gigetoo has joined #ruby
dubalubdub has joined #ruby
nankyokusei has quit [Ping timeout: 255 seconds]
Channel6 has joined #ruby
cibs has quit [Ping timeout: 252 seconds]
Lucky_ABA has joined #ruby
cibs has joined #ruby
kazlock has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
skweek has joined #ruby
bkxd has joined #ruby
eclm has quit [Quit: WeeChat 1.4]
gigetoo has joined #ruby
kht has joined #ruby
raspado has joined #ruby
eclm has joined #ruby
BackEndCoder has quit [Excess Flood]
bkxd has quit [Ping timeout: 240 seconds]
raspado has quit [Client Quit]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duckpupp1 has joined #ruby
BackEndCoder has joined #ruby
slappy161 has quit [Quit: Leaving.]
kht has quit [Ping timeout: 240 seconds]
phoo1234567 has quit [Quit: Gotta go]
harai_ has joined #ruby
duckpupp1 has quit [Ping timeout: 256 seconds]
gigetoo has quit [Ping timeout: 264 seconds]
gigetoo has joined #ruby
npgm has joined #ruby
bkxd has joined #ruby
maloik has quit [Remote host closed the connection]
__Yiota has joined #ruby
maloik has joined #ruby
Rodya_ has joined #ruby
raul782 has joined #ruby
__Yiota has quit [Client Quit]
bkxd has quit [Ping timeout: 245 seconds]
croberts has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
montanonic has joined #ruby
raul782 has quit [Ping timeout: 248 seconds]
gigetoo has quit [Read error: Connection reset by peer]
UnknownSoldier has quit [Remote host closed the connection]
gigetoo has joined #ruby
millerti has quit [Ping timeout: 240 seconds]
UnknownSoldier has joined #ruby
millerti has joined #ruby
UnknownSoldier has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
Derperpe1 has joined #ruby
duckpupp1 has joined #ruby
gigetoo has quit [Ping timeout: 264 seconds]
gigetoo has joined #ruby
Derperpe1 has quit [Ping timeout: 255 seconds]
nanoz has joined #ruby
polyidus has quit [Quit: Gone]
duderonomy has joined #ruby
myk267 has quit [Quit: Uh oh!]
A124 has quit [Ping timeout: 264 seconds]
bkxd has quit [Ping timeout: 255 seconds]
gigetoo has quit [Ping timeout: 252 seconds]
duckpupp1 has quit [Ping timeout: 248 seconds]
gigetoo has joined #ruby
tlahtoani has quit [Quit: Connection closed for inactivity]
msmith has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
dc4 has joined #ruby
xlegoman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xlegoman has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
youch has joined #ruby
eizua has joined #ruby
Phenix has quit [Quit: Connection closed for inactivity]
A124 has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
montanonic has quit [Ping timeout: 255 seconds]
gigetoo has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
youch has quit [Ping timeout: 276 seconds]
dc4 has quit [Ping timeout: 276 seconds]
M4dH4TT3r has joined #ruby
M4dH4TT3r is now known as Guest81173
rippa has joined #ruby
msmith has quit [Remote host closed the connection]
msmith has joined #ruby
msmith has quit [Remote host closed the connection]
gigetoo has quit [Ping timeout: 240 seconds]
gix has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
vikaton has joined #ruby
gix has joined #ruby
choke has joined #ruby
pilne has quit [Quit: Quitting!]
ramfjord has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
choke has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duckpupp1 has joined #ruby
nofxx has quit []
ramfjord has quit [Ping timeout: 276 seconds]
Derperpe1 has joined #ruby
duckpupp1 has quit [Ping timeout: 258 seconds]
brent__ has joined #ruby
xlegoman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gigetoo has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Read error: No route to host]
Derperpe1 has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
Rodya_ has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
brent__ has quit [Ping timeout: 258 seconds]
patarr has joined #ruby
mim1k|wo1k has quit [Ping timeout: 248 seconds]
patarr has quit [Ping timeout: 255 seconds]
gigetoo has quit [Ping timeout: 252 seconds]
nankyokusei has joined #ruby
raspado has joined #ruby
gigetoo has joined #ruby
<raspado> I have an empty hash which I am adding key values to. The issue is that when im adding keys and values, I have multiple values for one key. This is not for all my keys, just a few. So I am noticing that im missing values, presumably because the key was identical
<raspado> What is a good way to add values to an array on a key?
Technodrome has joined #ruby
nankyokusei has quit [Ping timeout: 255 seconds]
wotm8 has quit [Ping timeout: 264 seconds]
Silex has quit [Quit: WeeChat 1.4]
<nofxxxx> raspado, need to check if it exists and is_an?(Array)
gix has quit [Read error: Connection reset by peer]
<nofxxxx> or maybe respond_to?(:<<) , :push...
<nofxxxx> are you hispanic btw? sorry to tell but your nickname sounds very funny in portuguese
<raspado> heh
<raspado> so for my values, do I have to turn all my values into arrays?
amclain has quit [Quit: Leaving]
gigetoo has quit [Ping timeout: 256 seconds]
nofxxxx has quit [Remote host closed the connection]
gix has joined #ruby
<raspado> this is basically what im doing now https://gist.github.com/anonymous/3e54baf9097790a532a8b20f34f9336c
gigetoo has joined #ruby
<raspado> as it loops through, the appcycle, the k can return multiple keys and the values would be different, not sure how I can add the keys if the value already exists in my case
nofxx has joined #ruby
jenrzzz has joined #ruby
duckpupp1 has joined #ruby
nofxx has quit [Remote host closed the connection]
gigetoo has quit [Ping timeout: 240 seconds]
msmith has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gigetoo has joined #ruby
montanonic has joined #ruby
nofxx has joined #ruby
duckpupp1 has quit [Ping timeout: 245 seconds]
<raspado> ehhh i think i got it
duckpupp1 has joined #ruby
Rodya_ has quit [Read error: No route to host]
Rodya_ has joined #ruby
saneax-_-|AFK is now known as saneax
duckpupp1 has quit [Ping timeout: 245 seconds]
dc4 has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
Cohedri__ has joined #ruby
Cohedrin_ has quit [Read error: Connection reset by peer]
gigetoo has quit [Ping timeout: 240 seconds]
Derperpe1 has joined #ruby
gigetoo has joined #ruby
shinnya has joined #ruby
dubalubdub has quit [Read error: Connection reset by peer]
aidalgol has joined #ruby
Derperpe1 has quit [Ping timeout: 260 seconds]
duckpupp1 has joined #ruby
nanoz has quit [Quit: <3]
msmith has quit [Ping timeout: 276 seconds]
Guest81173 has quit [Ping timeout: 256 seconds]
bkxd has joined #ruby
duckpupp1 has quit [Ping timeout: 264 seconds]
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
saneax is now known as saneax-_-|AFK
eizua has quit [Quit: Leaving]
bkxd has quit [Ping timeout: 255 seconds]
mrwn has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Remote host closed the connection]
anilekm has joined #ruby
anilekm has left #ruby [#ruby]
dc4 has quit [Ping timeout: 260 seconds]
bocaneri has joined #ruby
Rodya_ has joined #ruby
gigetoo has quit [Ping timeout: 245 seconds]
gigetoo has joined #ruby
zapata has quit [Quit: WeeChat 1.7]
mikecmpbll has quit [Quit: inabit. zz.]
browndawg has quit [Quit: Leaving]
browndawg has joined #ruby
browndawg has quit [Client Quit]
browndawg has joined #ruby
ur5us has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Julianee has joined #ruby
browndawg has quit [Client Quit]
browndawg has joined #ruby
harfangk has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
Julianee has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
duckpupp1 has joined #ruby
jackjackdripper has joined #ruby
Technodrome has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
kazlock has quit [Quit: This computer has gone to sleep]
Cohedri__ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vikaton has quit [Quit: Connection closed for inactivity]
ifctj has joined #ruby
empty_cup has quit [Ping timeout: 248 seconds]
braderhart has joined #ruby
gigetoo has quit [Ping timeout: 255 seconds]
JoshS has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
Technodrome has quit [Quit: Textual IRC Client: www.textualapp.com]
JoshS has joined #ruby
Derperpe1 has joined #ruby
empty_cup has joined #ruby
Derperpe1 has quit [Max SendQ exceeded]
Derperpe1 has joined #ruby
Cohedrin_ has joined #ruby
patarr has joined #ruby
gigetoo has quit [Ping timeout: 276 seconds]
danielpclark has joined #ruby
gigetoo has joined #ruby
nofxxx has joined #ruby
ledestin has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
nofxx has quit [Ping timeout: 258 seconds]
nankyokusei has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
nankyokusei has quit [Ping timeout: 240 seconds]
raspado has quit [Quit: Leaving...]
jenrzzz has quit [Ping timeout: 252 seconds]
duckpupp1 has quit [Ping timeout: 240 seconds]
gigetoo has quit [Read error: Connection reset by peer]
maddmaxx has quit [Quit: Going offline, see ya! (www.adiirc.com)]
gigetoo has joined #ruby
<apeiros> oh, raspado is gone… too bad
duckpupp1 has joined #ruby
Channel6 has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 256 seconds]
ifctj has quit [Quit: Konversation terminated!]
ifctj has joined #ruby
McSoFake has joined #ruby
gigetoo has quit [Ping timeout: 258 seconds]
gigetoo has joined #ruby
ifctj has quit [Ping timeout: 248 seconds]
Rodya_ has quit [Read error: No route to host]
Rodya_ has joined #ruby
gigetoo has quit [Ping timeout: 248 seconds]
nowz has joined #ruby
choke has joined #ruby
gigetoo has joined #ruby
raspado has joined #ruby
tdy has quit [Read error: Connection reset by peer]
<raspado> how can I get a total could of a hash that is like hash = {"key1" => ["value1"."value2"], "key2" => ["value1"]}
<raspado> id like to get a total count of all the keys
<raspado> keys are in arrays inside a hash
skweek has quit [Ping timeout: 240 seconds]
<apeiros> raspado: ah, you're back
<raspado> yeah -_-
<apeiros> re your earlier gist: `k = row.values_at('schemaname').reduce(:concat)` can almost certainly written as `k = row['schemaname']`
dagelf has quit [Read error: Connection reset by peer]
<raspado> hehe yeah i got past that part
<raspado> just not sure how to count all the keys in a hash now
<apeiros> raspado: um, in `{"key1" => ["value1"."value2"], "key2" => ["value1"]}`, the keys are key1 and key2…
gigetoo has quit [Ping timeout: 240 seconds]
<apeiros> as for the total number of items in your values: hash.values.flatten(1).size, or hash.values.map(&:size).inject(:+)
choke has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dagelf has joined #ruby
gigetoo has joined #ruby
<raspado> apeiros: awesome! let me try that
<havenwood> Or in Ruby 2.4: hash.values.sum(&:size)
<raspado> im on 2.0 -_-
brent__ has joined #ruby
<raspado> nice apeiros worked like a champ
<raspado> saved me
youch has joined #ruby
govg has joined #ruby
brent__ has quit [Ping timeout: 256 seconds]
duckpupp1 has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Quit: Leaving...]
msmith has joined #ruby
<apeiros> any reason you're on 2.0 and not at least on 2.3.3?
gigetoo has quit [Ping timeout: 260 seconds]
matp has quit [Remote host closed the connection]
gigetoo has joined #ruby
youch has quit [Ping timeout: 264 seconds]
djbkd_ has joined #ruby
matp has joined #ruby
<raspado> not sure, its some production box
<raspado> im trying to calculate two numbers, is this possible? "puts "some math: " + "#{pgtables.values.flatten(1).size.to_i}" - "#{missing_keys.values.flatten(1).size.to_i}" "
<apeiros> what do you think .size returns?
<raspado> integer?
bkxd has joined #ruby
<apeiros> yes. so why do you call .to_i on an integer?
<raspado> oh, was troubleshooting the error im getting "custkey_check:71:in `<main>': undefined method `-' for "57":String (NoMethodError)"
<apeiros> ok. but that error is not from the code you just pasted.
<apeiros> oh, it is…
<raspado> yeah heh
<apeiros> that first " was to indicate start of code
<apeiros> I use `` to delimit code in irc messages
<raspado> ahh valid point
JoshS has quit [Ping timeout: 276 seconds]
<apeiros> >> "some math: #{1 + 2 - 5}"
<ruby[bot]> apeiros: # => "some math: -2" (https://eval.in/725943)
<apeiros> "foo" - "bar" # this is calling the #- method on a String, subtraction with string makes no sense, so ruby doesn't implement that
<raspado> ahhhh shit kk
<raspado> let me try
<apeiros> but you can have any valid ruby code within #{} in a string
<raspado> oh its taking it literally
<raspado> ``"some math: " + "#{pgtables.values.flatten(1).size} - #{missing_keys.values.flatten(1).size}" ``
<raspado> some math: 57 - 23
jenrzzz has joined #ruby
<apeiros> the execution happens within #{}
bkxd has quit [Ping timeout: 260 seconds]
<apeiros> >> "math: #{5} - #{3}"
<ruby[bot]> apeiros: # => "math: 5 - 3" (https://eval.in/725944)
<apeiros> >> "math: #{5 - 3}"
<ruby[bot]> apeiros: # => "math: 2" (https://eval.in/725945)
<raspado> oh i got it to work
<raspado> ``"#{pgtables.values.flatten(1).size - missing_keys.values.flatten(1).size}"``
<raspado> nice thx apeiros!
<raspado> f-in awesome ;)
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
montanonic has quit [Ping timeout: 248 seconds]
JoshS has joined #ruby
djbkd_ has quit []
xen0fon has quit [Quit: xen0fon]
harai_ has quit [Ping timeout: 276 seconds]
last_staff has joined #ruby
nofxxx has quit [Ping timeout: 256 seconds]
gigetoo has quit [Ping timeout: 264 seconds]
gigetoo has joined #ruby
<blackbombay> apeiros: "foobar" - "foo" # => "bar" makes sense to me.
tdy has joined #ruby
<havenwood> >> class String; def - this; self.sub this, '' end end; 'foobar' - 'foo'
<ruby[bot]> havenwood: # => "bar" (https://eval.in/725947)
montanonic has joined #ruby
gusrub has joined #ruby
gusrub__ has joined #ruby
msmith has quit [Ping timeout: 258 seconds]
gusrub__ has quit [Client Quit]
gigetoo has quit [Ping timeout: 255 seconds]
redhedded1 has quit [Quit: Textual IRC Client: www.textualapp.com]
gigetoo has joined #ruby
choke has joined #ruby
choke has quit [Client Quit]
marr has joined #ruby
n0equal has joined #ruby
gusrub has quit [Quit: Leaving]
n0equal has quit [Client Quit]
jenrzzz has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
hotpancakes has joined #ruby
gigetoo has quit [Ping timeout: 256 seconds]
gingray has joined #ruby
gigetoo has joined #ruby
gingray has quit [Quit: Mutter: www.mutterirc.com]
gloscombe has joined #ruby
McSoFake has quit [Ping timeout: 240 seconds]
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
duckpupp1 has joined #ruby
raspado has quit [Quit: Leaving...]
youch has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
patarr has joined #ruby
duckpupp1 has quit [Ping timeout: 240 seconds]
M-Techni1 has quit [Ping timeout: 264 seconds]
minimalism has quit [Ping timeout: 240 seconds]
youch has quit [Ping timeout: 252 seconds]
M-Technic has joined #ruby
minimalism has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
braderhart has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
gigetoo has quit [Ping timeout: 252 seconds]
gigetoo has joined #ruby
szulak has joined #ruby
montanonic has quit [Ping timeout: 255 seconds]
nankyokusei has quit [Ping timeout: 248 seconds]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
gigetoo has quit [Ping timeout: 245 seconds]
Axy has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
bkxd has quit [Ping timeout: 252 seconds]
msmith has joined #ruby
bkxd has joined #ruby
Snickers has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
gigetoo has quit [Ping timeout: 255 seconds]
msmith has quit [Ping timeout: 240 seconds]
Fernando-Basso has joined #ruby
ShoaibJahejo has joined #ruby
ShoaibJahejo has quit [Max SendQ exceeded]
gigetoo has joined #ruby
govg has quit [Ping timeout: 248 seconds]
nowz has quit [Quit: Leaving]
ShoaibJahejo has joined #ruby
ShoaibJahejo has quit [Max SendQ exceeded]
govg has joined #ruby
ShoaibJahejo has joined #ruby
ShoaibJahejo has quit [Max SendQ exceeded]
szulak has joined #ruby
ShoaibJahejo has joined #ruby
ShoaibJahejo has quit [Max SendQ exceeded]
ShoaibJahejo has joined #ruby
gigetoo has quit [Ping timeout: 252 seconds]
agit0 has joined #ruby
johnny56 has joined #ruby
gigetoo has joined #ruby
grh has joined #ruby
flying has joined #ruby
flying has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
gingray has joined #ruby
hotpancakes has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
govg has quit [Ping timeout: 240 seconds]
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
edwinvdg_ has quit [Ping timeout: 276 seconds]
gingray has quit [Client Quit]
govg has joined #ruby
duckpupp1 has joined #ruby
troulouliou_div2 has joined #ruby
Mon_Ouie has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 245 seconds]
gigetoo has joined #ruby
duckpupp1 has quit [Ping timeout: 260 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
govg has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
nowhere_man has joined #ruby
renchan has joined #ruby
grh has quit [Ping timeout: 240 seconds]
govg has quit [Remote host closed the connection]
govg has joined #ruby
artoftheselfless has joined #ruby
alehander42 has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
ruby271 has joined #ruby
<ruby271> Hi guys
<havenwood> ruby271: hi
<ruby271> is there somebody
<havenwood> ruby271: yes
<alehander42> do we exist
<alehander42> is this real
<alehander42> MAYBE
<ruby271> :) no, a friend of mine gave me this irc and said that people still use it and I decided to log in just to check :D
<ruby271> it is cool :)
Azulinho has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
Azulinho has quit [Client Quit]
gigetoo has quit [Ping timeout: 255 seconds]
FastJack has joined #ruby
gigetoo has joined #ruby
alehander42 has quit [Ping timeout: 260 seconds]
nowhere_man has quit [Ping timeout: 255 seconds]
hotpanca_ has joined #ruby
marr has quit [Ping timeout: 245 seconds]
achamian has joined #ruby
hotpancakes has quit [Ping timeout: 264 seconds]
browndawg has quit [Quit: Leaving]
browndawg has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
hotpanca_ has quit []
gingray has joined #ruby
tockitj has quit [Ping timeout: 240 seconds]
gingray has quit [Client Quit]
koldbrutality has quit [Ping timeout: 240 seconds]
szulak has joined #ruby
gigetoo has quit [Ping timeout: 248 seconds]
gigetoo has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
Azulinho has joined #ruby
bauruine has quit [Read error: Connection reset by peer]
bauruine has joined #ruby
renchan has quit [Remote host closed the connection]
grh has joined #ruby
Azulinho has quit [Client Quit]
Azulinho has joined #ruby
Azulinho has quit [Client Quit]
danielpclark has quit [Remote host closed the connection]
tockitj has joined #ruby
gigetoo has quit [Ping timeout: 264 seconds]
gigetoo has joined #ruby
aidalgol has quit [Quit: zZZZzzz]
bkxd has quit [Ping timeout: 240 seconds]
conta has joined #ruby
achamian has quit []
CloCkWeRX has quit [Ping timeout: 276 seconds]
renchan has joined #ruby
duckpupp1 has joined #ruby
gigetoo has quit [Ping timeout: 264 seconds]
Snickers has quit [Quit: Snickers]
gigetoo has joined #ruby
patarr has joined #ruby
duckpupp1 has quit [Ping timeout: 256 seconds]
last_staff has quit [Quit: last_staff]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
johnny56 has quit [Remote host closed the connection]
nankyokusei has joined #ruby
agit0 has quit [Ping timeout: 248 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
nankyokusei has quit [Ping timeout: 255 seconds]
gigetoo has quit [Ping timeout: 255 seconds]
gigetoo has joined #ruby
Puffball has quit [Remote host closed the connection]
ARCADIVS has joined #ruby
Puffball has joined #ruby
msmith has joined #ruby
msmith has quit [Remote host closed the connection]
msmith has joined #ruby
msmith has quit [Remote host closed the connection]
gigetoo has quit [Ping timeout: 276 seconds]
gigetoo has joined #ruby
acalycine has joined #ruby
<acalycine> Any reason why this wouldn't work? https://gist.github.com/anonymous/e6ad19775c77fdc6827e1bff5cb4f56d
JeanCarloMachado has joined #ruby
CloCkWeRX has joined #ruby
JeanCarloMachado has quit [Ping timeout: 255 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
Puffball has quit [Remote host closed the connection]
libastral has quit [Quit: ZNC - http://znc.in]
biberu has joined #ruby
laphoriag75 has quit [Remote host closed the connection]
jessiepuls has joined #ruby
gigetoo has joined #ruby
troulouliou_dev has joined #ruby
Puffball has joined #ruby
szulak has quit [Quit: Textual IRC Client: www.textualapp.com]
lxsameer has joined #ruby
JeanCarloMachado has joined #ruby
foxxx0 has quit [Quit: WeeChat 1.6]
despai has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
kirun has joined #ruby
duckpupp1 has joined #ruby
libastral has joined #ruby
foxxx0 has joined #ruby
duckpupp1 has quit [Ping timeout: 240 seconds]
<blackbombay> acalycine: isn't it obvious?
<jokke> ruby271: lol "still use it"
<jokke> irc is the shit!
<blackbombay> the keys are all symbols but you reference them as strings.
<acalycine> Exclude? is the wrong command to see if a string doesn't include something?
<acalycine> Oh.
<jokke> it's like a good wine, it ripens and gets better and better :D
ruby271 has quit [Ping timeout: 260 seconds]
<blackbombay> acalycine: use HashWithIndifferentAccess from activesupport if you want to use strings and symbols interchangeably
gigetoo has quit [Ping timeout: 240 seconds]
<blackbombay> as keys
<acalycine> Right. Thanks. :)
<blackbombay> yw
renchan has quit [Remote host closed the connection]
gigetoo has joined #ruby
electrostat has quit [Quit: uwotm8]
electrostat has joined #ruby
ddffg has joined #ruby
libastral has quit [Quit: ZNC - http://znc.in]
mikecmpbll has joined #ruby
libastral has joined #ruby
gigetoo has quit [Ping timeout: 260 seconds]
CloCkWeRX has quit [Ping timeout: 245 seconds]
ddffg has quit [Ping timeout: 248 seconds]
saneax-_-|AFK is now known as saneax
Sammichmaker has quit [Ping timeout: 255 seconds]
gigetoo has joined #ruby
sameerynho has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
johnny56 has joined #ruby
harfangk has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
libastral has quit [Quit: ZNC - http://znc.in]
sdothum has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
cibs has quit [Ping timeout: 240 seconds]
libastral has joined #ruby
cibs has joined #ruby
CloCkWeRX has joined #ruby
JeanCarloMachado has quit [Ping timeout: 256 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
minimalism has quit [Quit: WeeChat 1.4]
gigetoo has joined #ruby
JeanCarloMachado has joined #ruby
ocbtec has joined #ruby
conta has quit [Ping timeout: 240 seconds]
Pupeno has joined #ruby
Pupeno has joined #ruby
shinnya has joined #ruby
gigetoo has quit [Ping timeout: 276 seconds]
gigetoo has joined #ruby
johnny56_ has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
nankyokusei has joined #ruby
duckpupp1 has joined #ruby
youch has joined #ruby
dionysus69 has joined #ruby
grh has quit [Ping timeout: 240 seconds]
johnny56 has joined #ruby
nankyokusei has quit [Ping timeout: 264 seconds]
johnny56_ has quit [Ping timeout: 264 seconds]
duckpupp1 has quit [Ping timeout: 240 seconds]
youch has quit [Ping timeout: 240 seconds]
gigetoo has quit [Ping timeout: 252 seconds]
gigetoo has joined #ruby
psychicist__ has joined #ruby
jenrzzz has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
ecuanaso has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
JeanCarloMachado has quit [Ping timeout: 264 seconds]
gigetoo has quit [Ping timeout: 248 seconds]
JeanCarloMachado has joined #ruby
gigetoo has joined #ruby
Lord_of_Life has quit [Excess Flood]
spider-mario has quit [Quit: WeeChat 1.6]
spider-mario has joined #ruby
ta__ has joined #ruby
Jackneill_ has joined #ruby
ta has quit [Ping timeout: 240 seconds]
Lord_of_Life has joined #ruby
gloscombe has quit [Quit: gloscombe]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
gigetoo has quit [Ping timeout: 255 seconds]
Snickers has quit [Client Quit]
Snickers has joined #ruby
davezd has quit [Quit: Leaving]
gigetoo has joined #ruby
Snickers has quit [Client Quit]
msmith has joined #ruby
ta__ has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
ruby564 has joined #ruby
Azure has quit [Ping timeout: 255 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Azure has joined #ruby
raul782 has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
Snickers has joined #ruby
c355e3b has joined #ruby
raul782 has quit [Remote host closed the connection]
renchan has joined #ruby
gigetoo has quit [Ping timeout: 252 seconds]
conta has joined #ruby
tdy has quit [Quit: WeeChat 1.7]
gigetoo has joined #ruby
Bob8989|3 has joined #ruby
Bob89893 has joined #ruby
Bob89895 has joined #ruby
JeanCarloMachado has joined #ruby
kies has quit [Read error: Connection reset by peer]
kies has joined #ruby
kies has quit [Remote host closed the connection]
kies has joined #ruby
duckpupp1 has joined #ruby
conta has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
pilne has joined #ruby
tdy has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
duckpupp1 has quit [Ping timeout: 248 seconds]
gigetoo has joined #ruby
msmith has quit [Ping timeout: 240 seconds]
Pupeno has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
Axy has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Ishido has joined #ruby
Mia has quit [Ping timeout: 255 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
phoo1234567 has joined #ruby
Fernando-Basso has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
splud has joined #ruby
ddffg has joined #ruby
ncthom91 has joined #ruby
ncthom91 has quit [Max SendQ exceeded]
hogetaro has joined #ruby
ncthom91 has joined #ruby
ncthom91 has quit [Max SendQ exceeded]
ncthom91 has joined #ruby
mikecmpbll has joined #ruby
ncthom91 has quit [Max SendQ exceeded]
kristofferR has joined #ruby
ncthom91 has joined #ruby
<acalycine> I'm getting "activesupport-5.0.1 requires ruby version > 2.2.2, which is incompatible with the current version, ruby 2.1.5p273". Do I have update it or something? It's all of a sudden given this error.
<acalycine> And with `gem install activesupport` I get "activesupport requires Ruby version >2.2.2."
Fernando-Basso has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
gigetoo has joined #ruby
artoftheselfless has quit [Ping timeout: 255 seconds]
CloCkWeRX has quit [Quit: Leaving.]
nankyokusei has quit [Ping timeout: 258 seconds]
Drakevr has quit [Changing host]
Drakevr has joined #ruby
unshadow_ has joined #ruby
brent__ has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
cibs has quit [Ping timeout: 240 seconds]
unshadow has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
cibs has joined #ruby
brent__ has quit [Ping timeout: 258 seconds]
Trynemjoel has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Quit: dionysus69]
Trynemjoel has joined #ruby
duckpupp1 has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
duckpupp1 has quit [Ping timeout: 276 seconds]
gigetoo has joined #ruby
gheegh has joined #ruby
__Yiota has joined #ruby
<gheegh> hey all, I think i asked this a few days ago. .but i still don't seem to have it nailed down. i'm trying to optionally match in Regex in ruby 2.3.1 (new regex parser).
<gheegh> basically, the optional syntax seems to work if i'm mathcing JUST that phrase in the entire string.. but if the string is a full address, tehn it doesn't match..
<gheegh> this "repl.it" has running ruby code for what i'm describing..
<gheegh> both cases should match, but only the test string that has ONLY the matching parameters are matching..
JeanCarloMachado has quit [Ping timeout: 248 seconds]
gloscombe has joined #ruby
<go|dfish> gheegh: if you want to match west or western can't you just use: (?:west|north|east|south)(?:ern)?
gigetoo has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
<gheegh> yes, i can. that's much better than mine.. thank.s
Bob8989|2 has joined #ruby
Bob89896 has joined #ruby
Bob89897 has joined #ruby
gigetoo has joined #ruby
Bob8989|3 has quit [Ping timeout: 248 seconds]
Bob89895 has quit [Ping timeout: 258 seconds]
Bob89893 has quit [Ping timeout: 255 seconds]
Bob89896 has quit [K-Lined]
Bob89897 has quit [K-Lined]
Bob8989|2 has quit [K-Lined]
<gheegh> on the first matching part (), why is the ?: required?
dopamean_ has joined #ruby
<gheegh> i guess I don't understand the syntax of :?
<blackbombay> acalycine: you have to downgrade activesupport or upgrade ruby :p
<gheegh> i it as an optional check on the second match set, but why is it needed on the first?
<acalycine> I fixed it, thanks though. :)
troulouliou_dev has quit [Quit: Leaving]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
<blackbombay> cool +1
gigetoo has quit [Ping timeout: 255 seconds]
gigetoo has joined #ruby
bkxd has joined #ruby
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
bkxd has quit [Ping timeout: 260 seconds]
ruby-lang064 has joined #ruby
ruby-lang064 has quit [Client Quit]
msmith has joined #ruby
msmith has quit [Client Quit]
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
chouhoulis has joined #ruby
nowhere_man has joined #ruby
<Mon_Ouie> '?:' just makes a group non-capturing. That means it won't create a capture group (so $1 will not contain "west" in the example, but still be nil instead)
ARCADIVS has quit [Quit: ARCADIVS]
__Yiota has quit [Read error: Connection reset by peer]
__Yiota has joined #ruby
<hanmac> >> "abc" =~ /(?:\w)(\w)(?:\w)/; [$1, $2, $3]
<ruby[bot]> hanmac: # => ["b", nil, nil] (https://eval.in/726037)
koldbrutality has joined #ruby
gigetoo has quit [Ping timeout: 276 seconds]
xlegoman has joined #ruby
Xentil has joined #ruby
gigetoo has joined #ruby
choke has joined #ruby
last_staff has joined #ruby
JeanCarloMachado has quit [Ping timeout: 256 seconds]
last_staff is now known as makebelieveMonst
makebelieveMonst is now known as last_staff
JeanCarloMachado has joined #ruby
govg has quit [Ping timeout: 260 seconds]
Channel6 has joined #ruby
chouhoulis has quit [Remote host closed the connection]
duckpupp1 has joined #ruby
choke has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gigetoo has quit [Ping timeout: 255 seconds]
gigetoo has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duckpupp1 has quit [Ping timeout: 256 seconds]
psychicist__ has quit [Quit: Lost terminal]
Snickers has quit [Quit: Snickers]
jenrzzz has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
doublemalt_ has joined #ruby
acalycine has quit [Quit: bye]
acalycine has joined #ruby
__Yiota has quit [Ping timeout: 240 seconds]
Trynemjoel has joined #ruby
chouhoulis has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
DoubleMalt has quit [Ping timeout: 260 seconds]
<acalycine> Can you restart a loop? I've tried it here with "retry if <condition> but I'm getting a void value expression. https://gist.github.com/f6dbfbd348527a9b41e0e9e995316e58
gigetoo has joined #ruby
<elomatreb> acalycine: You can't use a modifier if with elseif like that
<acalycine> Ah.
<elomatreb> Move the retry into the first block of that if and it should work
<dminuoso> That's interesting.
<dminuoso> Why is that grammatically unsound?
<acalycine> The input is coming from that `elsif correct_number = user_number`, though?
<dminuoso> elomatreb: I know that the compiler has some silly logic with states to identify whether it ends up inside a void value expression, but I just can't see it here.
<dminuoso> acalycine: Stare at that line.
<dminuoso> For a while.
shinnya has quit [Ping timeout: 264 seconds]
<elomatreb> I was just thinking the same, shouldn't those elsifs be associated with the if started in line 8?
__Yiota has joined #ruby
hanmac has quit [Ping timeout: 258 seconds]
<dminuoso> >> if nil; retry if nil; end;
<ruby[bot]> dminuoso: # => /tmp/execpad-49bd24fd994b/source-49bd24fd994b: /tmp/execpad-49bd24fd994b/source-49bd24fd994b:2: Inva ...check link for more (https://eval.in/726059)
harai_ has joined #ruby
<dminuoso> >> while nil; if nil; retry if nil; end; end
<ruby[bot]> dminuoso: # => /tmp/execpad-02cc5f306d3a/source-02cc5f306d3a: /tmp/execpad-02cc5f306d3a/source-02cc5f306d3a:2: Inva ...check link for more (https://eval.in/726063)
<dminuoso> huh
<dminuoso> >> while; if nil; retry if nil; end; end
<ruby[bot]> dminuoso: # => /tmp/execpad-a94fc357593b/source-a94fc357593b:2: syntax error, unexpected ';' ...check link for more (https://eval.in/726064)
<dminuoso> OH.
<dminuoso> Now I see the issue.
* dminuoso slaps acalycine
<acalycine> Yes?
<acalycine> I've been staring.
youch has joined #ruby
* acalycine grins
Silthias has joined #ruby
<dminuoso> acalycine: Well, there's quite a few things wrong with your code
<dminuoso> acalycine: The line I mentioned uses an assignment when you probably intended to compare
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
Silthias1 has quit [Ping timeout: 258 seconds]
<dminuoso> acalycine: Next up, while requires a condition that gets tested, it uses the next expression it sees
vikaton has joined #ruby
<dminuoso> acalycine: Next up, "retry" is only for exceptions since 1.9
<acalycine> Ah.
<acalycine> I must have read old StackExchange questions
nankyokusei has joined #ruby
<dminuoso> acalycine: Get a good book instead.
<acalycine> Good idea.
<dminuoso> ?books
<ruby[bot]> You can find a list of recommended books at http://ruby-community.com/pages/links
<dminuoso> acalycine: Eloquent Ruby is one of the best picks in there.
gp5st has joined #ruby
youch has quit [Ping timeout: 258 seconds]
bkxd has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grh has joined #ruby
bkxd has quit [Ping timeout: 252 seconds]
gigetoo has quit [Ping timeout: 264 seconds]
Kug3lis has joined #ruby
gigetoo has joined #ruby
montanonic has joined #ruby
<acalycine> Sounds good.
<acalycine> So what's an alternative to "retry"?
<dminuoso> acalycine: next
Lord_of_Life has quit [Excess Flood]
<acalycine> next if <condition>
<dminuoso> acalycine: For example, yes
<acalycine> Cool.
hanmac has joined #ruby
<acalycine> My code runs perfectly if I comment out the bits under the `puts "Correct!"etc` code. The issues you pointed out were above that, right?
sepp2k has joined #ruby
Lord_of_Life has joined #ruby
JeanCarloMachado has quit [Remote host closed the connection]
<gheegh> Hey all. almost there. i'm trying to match city names by their endings ('town|ville') .etc. My regex isn't matching.. could use another set of eyes.. https://repl.it/FYPY/3
cdg has joined #ruby
__Yiota has joined #ruby
<gheegh> or an eval.in if you prefer that.. :-) https://eval.in/726075
<dminuoso> We do.
UnknownSoldier has joined #ruby
<dminuoso> gheegh: Look at your regex string.
<dminuoso> gheegh: Ideally at the first two characters.
<dminuoso> Im wondering about something
<gheegh> the \w+
<gheegh> ?
renchan has quit [Remote host closed the connection]
gigetoo has quit [Ping timeout: 260 seconds]
<dminuoso> gheegh: What's that \b doing there?
<dminuoso> gheegh: Or at the end?
gigetoo has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
<dminuoso> gheegh: Just get rid of them, and watch your regex match like it's never matched before.
<gheegh> https://eval.in/726081 this one matches, but it doesn't match the entire word.. it just matches the trailing item ('more")
rt has quit [Quit: Life is too short to wait.]
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
kazlock has joined #ruby
benlieb has joined #ruby
saneax is now known as saneax-_-|AFK
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
browndawg has quit [Quit: Leaving]
duckpupp1 has joined #ruby
mniip has quit [Ping timeout: 600 seconds]
duckpupp1 has quit [Ping timeout: 256 seconds]
rt has joined #ruby
kristofferR has joined #ruby
jenrzzz has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
skweek has joined #ruby
gigetoo has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
szulak has joined #ruby
renchan has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
Lord_of_Life has quit [Excess Flood]
kristofferR has joined #ruby
youch has joined #ruby
Lord_of_Life has joined #ruby
matp has quit [Remote host closed the connection]
matp has joined #ruby
enterprisey has joined #ruby
youch has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
conta has joined #ruby
gigetoo has quit [Ping timeout: 248 seconds]
KeyJoo has joined #ruby
<ruby564> if I have function = def calc and it has a calculator inside, how can I implement it in the browser with input and button YES but how to put the code from index.rb to the html code? Advice please
KeyJoo has quit [Client Quit]
gigetoo has joined #ruby
<acalycine> So you PMed me and I'm assuming others instead?
bkxd has quit [Ping timeout: 276 seconds]
KeyJoo has joined #ruby
KeyJoo has left #ruby [#ruby]
KeyJoo has joined #ruby
KeyJoo has left #ruby [#ruby]
KeyJoo has joined #ruby
<ruby564> if I have function = def calc and it has a calculator inside, how can I implement it in the browser with input and button YES but how to put the code from index.rb to the html code? Advice please
Snickers has joined #ruby
scootaloo has joined #ruby
<acalycine> Don't spam your question, that won't work...
<acalycine> Does anybody know if you can use `next` twice? So you can jump back two loops.
govg has joined #ruby
gigetoo has quit [Ping timeout: 245 seconds]
gigetoo has joined #ruby
grh has quit [Ping timeout: 240 seconds]
jhack has joined #ruby
ruby564 has quit [Quit: Page closed]
<KeyJoo> what is the best of today: IRC or stackoverflow?
jhack has quit [Client Quit]
cpruitt has joined #ruby
kegster has quit [Quit: Shiner, TX makes good beer.]
Snickers has quit [Quit: Snickers]
cpruitt has quit [Client Quit]
gigetoo has quit [Ping timeout: 276 seconds]
gigetoo has joined #ruby
gp5st has quit [Quit: gp5st]
duckpupp1 has joined #ruby
JeanCarloMachado has joined #ruby
rfoust has joined #ruby
ookiecookies has joined #ruby
<ookiecookies> how does the interpreter know what values to pass into a function?
duckpupp1 has quit [Ping timeout: 252 seconds]
<dminuoso> ookiecookies: The Ruby language uses a lexer and a parser to build a syntax tree to understand how to do things. Based on that syntax tree it will later execute expressions in such a fashion, that it will evaluate the value of an argument before passing it.
Snickers has joined #ruby
Kug3lis is now known as Kug3lis_off
Snickers has quit [Client Quit]
gigetoo has quit [Ping timeout: 255 seconds]
gigetoo has joined #ruby
nankyokusei has joined #ruby
dionysus69 has joined #ruby
gp5st has joined #ruby
gp5st has quit [Client Quit]
rfoust has quit [Ping timeout: 240 seconds]
gp5st has joined #ruby
chouhoulis has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 245 seconds]
rfoust has joined #ruby
chouhoulis has joined #ruby
ookiecookies has quit [Ping timeout: 260 seconds]
Kug3lis_off is now known as Kug3lis
chouhoulis has quit [Ping timeout: 240 seconds]
gigetoo has quit [Ping timeout: 264 seconds]
gigetoo has joined #ruby
antgel has joined #ruby
<zacts> hi rubyists
SuperLag has quit [Ping timeout: 240 seconds]
<havenwood> zacts: hi!
<zacts> yo yo :-)
<zacts> I'm at ch 8 of the well grounded rubyist
<zacts> it's good thus far
<zacts> filling in the gaps of my knowledge
SuperLag has joined #ruby
<zacts> 2nd edition
<dminuoso> If only you had bought a real book. I highly recommend "dminuoso magical journey through the unicorn covered rainbow land of Ruby" - you can preorder it for just $69.95
<zacts> :-)
despai has quit [Quit: This computer has gone to sleep]
<SerialDev> i've got that book!
<SerialDev> reading it now and also "The Ruby Programming Language" which is a bit dated, but still great for getting a real sense of the language
bkxd has joined #ruby
<zacts> I think I learn the most by using the language, however.
<zacts> So I've got little cli apps planned, and a game
<zacts> and then a sinatra web app, and then finally rails
<SerialDev> sinatra did it his way, remember
<SerialDev> ;-)
<zacts> heh yeah
<zacts> =)
<zacts> the rat pack
<SerialDev> sinatra, lewis, davis, and faulkner?
<SerialDev> or is my memory too dim?
gigetoo has quit [Ping timeout: 264 seconds]
gigetoo has joined #ruby
<zacts> It's on WikiPedia
bkxd has quit [Ping timeout: 258 seconds]
chouhoulis has joined #ruby
<SerialDev> too lazy to look, besides didn't i hire you to look at it for me? ;-)
montanonic has quit [Ping timeout: 240 seconds]
<zacts> no, I charge by the second!
<zacts> anyway, back to #ruby
<zacts> :-P
<SerialDev> i'm new to Ruby as a language in particular
<SerialDev> but i was attracted to it by it's clean syntax
<SerialDev> it makes Java look creaky and old
<SerialDev> are jRuby and Shoes still viable tools for Ruby GUIs?
<zacts> indeed, that's what I'm like
<zacts> From what I recall many here don't recommend shoes
<zacts> but that was like 6 months ago when I asked
<zacts> jruby is a great platform though, from what I hear
<zacts> SerialDev: also if you ever want to get into functional programming with Ruby syntax there is the Elixir language, just fwiw
<SerialDev> <--- still an oop guy
slappy161 has joined #ruby
<zacts> yeah I like OOP too
<zacts> I'm still learning OOP though
chouhoulis has quit [Ping timeout: 240 seconds]
jshjsh has joined #ruby
<SerialDev> i've never had a career in IT or Computer Science, i'm a recent grad of IT trying to do a midlife career change
JoshS has quit [Ping timeout: 276 seconds]
renchan_ has joined #ruby
renchan_ has quit [Remote host closed the connection]
renchan has quit [Remote host closed the connection]
renchan has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
<zacts> oh cool
<dminuoso> 20:02 < SerialDev> are jRuby and Shoes still viable tools for Ruby GUIs?
scootaloo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> No.
renchan has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
<dminuoso> If you want to do serious GUIs, either take the web-based approach, or look into a different language.
<dminuoso> Or embed Ruby inside say a Qt application
<zacts> by 'jruby is a great platform' I meant in general, and not specifically for GUI
laphoriag75 has joined #ruby
<zacts> but yeah. :-)
Kug3lis has quit [Quit: Textual IRC Client: www.textualapp.com]
<dminuoso> jruby is stable and great yes.
<dminuoso> if it wasnt for the high warmup time the JRE incurs, I would be using it.
<dminuoso> performance wise its great otherwise
msmith has joined #ruby
renchan has joined #ruby
<zacts> dminuoso: oh wait so are you actually writing a book, or was that a joke?
renchan has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
<SerialDev> web based approach it is, then
benlieb has joined #ruby
benlieb has quit [Client Quit]
<elomatreb> That's often a good idea anyway, free platform independence and much less Weird Stuff (tm) to worry about
benlieb has joined #ruby
benlieb has quit [Client Quit]
tlahtoani has joined #ruby
benlieb has joined #ruby
<zacts> yeah
benlieb has quit [Client Quit]
renchan has joined #ruby
<zacts> there is Electron for desktop apps
JoshS has joined #ruby
<zacts> if they port that to Android and iOS it might be a cool framework for apps
benlieb has joined #ruby
<zacts> there is a javascript equivalent to Electron for mobile already too iirc
<zacts> but this is HTML/CSS/JavaScript and not Ruby
<tlahtoani> They are okay
<zacts> unless you can figure out how to hook opal into them
<zacts> the opal gem
jshjsh has quit [Ping timeout: 256 seconds]
<zacts> https://www.nativescript.org/ <-- nativescript
gigetoo has quit [Ping timeout: 276 seconds]
<Papierkorb> Sometimes you wonder, what went wrong that Android Apps waste >20MiB/s of space and god knows how much RAM for simple tasks, where in the old days, apps looked bad but did lots of things with much much less resource usage
<Papierkorb> Same goes for desktop applications
gigetoo has joined #ruby
benlieb has quit [Quit: benlieb]
benjaminmaygay has joined #ruby
<tlahtoani> It's sad but w/e
<Papierkorb> I sometimes wonder if people actually still know, how much a megabyte, or even a gigabyte of RAM actually is. Or how powerful a single core of a modern CPU is (TL;DR: Insanely powerful). Looking at Postgres, I'd wager that most databases will barely cross 2GiB in size. And it's insanely fast too.
renchan has quit [Remote host closed the connection]
libastral has quit [Quit: ZNC - http://znc.in]
<benjaminmaygay> is utilizing stripe hard to do?
<tlahtoani> My DB is over 5GB
<tlahtoani> :P
libastral has joined #ruby
<Papierkorb> tlahtoani: I think you got my point though ;)
<tlahtoani> I dod
<tlahtoani> Did
<havenwood> benjaminmaygay: Nope, give it a try.
<Papierkorb> (Don't mind the horrible mess that one calls grammar in my lil rant above *cough*)
Ishido has quit [Read error: Connection reset by peer]
conta has quit [Ping timeout: 255 seconds]
Ishido has joined #ruby
renchan has joined #ruby
<SerialDev> oops, wrong channel, lol
olspookishmagus has quit [Ping timeout: 258 seconds]
gigetoo has quit [Read error: Connection reset by peer]
olspookishmagus has joined #ruby
gigetoo has joined #ruby
olspookishmagus is now known as Guest99782
Devalo has joined #ruby
xen0fon has joined #ruby
Cohedrin_ has joined #ruby
libastral has quit [Quit: ZNC - http://znc.in]
libastral has joined #ruby
renchan has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
montanonic has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
danguita has joined #ruby
<SerialDev> it's interesting that everything in Ruby is an object, even a simple number literal like 3 or 1.023
jenrzzz has quit [Ping timeout: 240 seconds]
brybeecher has joined #ruby
Elrond_ has joined #ruby
mic_e has quit [Read error: Connection reset by peer]
gix has quit [Quit: Client exiting]
mic_e has joined #ruby
gix has joined #ruby
gigetoo has quit [Ping timeout: 255 seconds]
gigetoo has joined #ruby
danguita has quit [Quit: WeeChat 1.7]
matp has quit [Remote host closed the connection]
matp has joined #ruby
ur5us has joined #ruby
Elrond_ has quit [Remote host closed the connection]
tomphp has joined #ruby
duckpupp1 has joined #ruby
_geoff has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
gigetoo has quit [Ping timeout: 240 seconds]
Jackneill_ has quit [Ping timeout: 276 seconds]
bkxd has joined #ruby
gigetoo has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brybeecher has quit [Ping timeout: 255 seconds]
banisterfiend has joined #ruby
zapata has joined #ruby
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
bkxd has quit [Ping timeout: 248 seconds]
enterprisey has quit [Ping timeout: 276 seconds]
aidalgol has joined #ruby
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Devalo has quit [Ping timeout: 240 seconds]
AndBobsYourUncle has joined #ruby
_geoff has quit [Ping timeout: 240 seconds]
benjaminmaygay has quit [Ping timeout: 260 seconds]
slappy161 has quit [Quit: Leaving.]
AndBobsYourUncle has quit [Client Quit]
gigetoo has quit [Ping timeout: 240 seconds]
ta has joined #ruby
szulak has joined #ruby
gigetoo has joined #ruby
brybeecher has joined #ruby
UnknownSoldier has quit [Ping timeout: 248 seconds]
JoshS has quit [Quit: Leaving]
ifctj has joined #ruby
Cohedrin_ has joined #ruby
Cohedrin_ has quit [Client Quit]
xlegoman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cohedrin_ has joined #ruby
nankyokusei has joined #ruby
duckpupp1 has quit [Ping timeout: 240 seconds]
xlegoman has joined #ruby
szulak has quit [Quit: Textual IRC Client: www.textualapp.com]
brendan- has quit [Ping timeout: 260 seconds]
benlieb has joined #ruby
boombox_ has joined #ruby
gigetoo has quit [Ping timeout: 248 seconds]
nankyokusei has quit [Ping timeout: 240 seconds]
brybeecher has quit [Ping timeout: 255 seconds]
gigetoo has joined #ruby
Jackneill_ has joined #ruby
boombox_ has quit [Remote host closed the connection]
boombox_ has joined #ruby
johnmilton has joined #ruby
boombox_ has quit [Ping timeout: 258 seconds]
marcdel has quit [Ping timeout: 240 seconds]
gp5st has quit [Quit: gp5st]
msmith has quit [Remote host closed the connection]
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
msmith has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
JeanCarloMachado has quit [Ping timeout: 255 seconds]
nettoweb has joined #ruby
gp5st has joined #ruby
JeanCarloMachado has joined #ruby
araujo has quit [Read error: Connection timed out]
msmith has quit [Ping timeout: 255 seconds]
araujo has joined #ruby
ResidentBiscuit has joined #ruby
xen0fon has quit [Quit: xen0fon]
tristanp has quit [Remote host closed the connection]
gigetoo has quit [Ping timeout: 256 seconds]
gigetoo has joined #ruby
vuoto has joined #ruby
ta has quit [Remote host closed the connection]
frezy has joined #ruby
johnmilton has quit [Quit: Namaste]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ReK2 has quit [Remote host closed the connection]
ocbtec has quit [Quit: leaving]
brent__ has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
gigetoo has joined #ruby
braderhart has joined #ruby
ReK2 has joined #ruby
ReK2 has quit [Changing host]
ReK2 has joined #ruby
bkxd has quit [Ping timeout: 248 seconds]
ByronJohnson has quit [Ping timeout: 240 seconds]
KeyJoo has quit [Quit: Page closed]
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
toretore has quit [Ping timeout: 260 seconds]
gp5st has quit [Quit: gp5st]
jhack has joined #ruby
psychicist__ has joined #ruby
nofxxx has joined #ruby
duckpupp1 has joined #ruby
gp5st has joined #ruby
conta has joined #ruby
duckpupp1 has quit [Ping timeout: 276 seconds]
jhack has quit [Quit: jhack]
gigetoo has quit [Ping timeout: 255 seconds]
araujo has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
dimasg has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
jeffreylevesque_ has joined #ruby
jhack has joined #ruby
JeanCarloMachado has joined #ruby
Xentil has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Xentil has joined #ruby
RickHull has joined #ruby
UnknownSoldier has joined #ruby
Xentil has quit [Client Quit]
vali has joined #ruby
tomphp has joined #ruby
vuoto has quit [Remote host closed the connection]
gigetoo has quit [Ping timeout: 264 seconds]
jeffreylevesque_ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
cdg has quit [Read error: Connection reset by peer]
Xentil has joined #ruby
cdg has joined #ruby
gigetoo has joined #ruby
Asher has quit [Read error: No route to host]
Asher has joined #ruby
gp5st has quit [Quit: gp5st]
scootaloo has joined #ruby
dionysus69 has quit [Quit: dionysus69]
cdg has quit [Remote host closed the connection]
jhack has quit [Quit: jhack]
antgel has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
jhack has joined #ruby
dimasg has quit [Ping timeout: 240 seconds]
ResidentBiscuit has quit [Remote host closed the connection]
ResidentBiscuit has joined #ruby
__Yiota has joined #ruby
kht has joined #ruby
vuoto has joined #ruby
bennofs has joined #ruby
dagda1 has joined #ruby
<bennofs> I'm trying to install 'travis-build', which is a ruby command line plugin for 'travis.rb', the CLI interface to travis
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<bennofs> so, I did bundle install --path vendor/bundle in the directory to which I cloned travis-build, but somehow, when called from travis cli, ruby won't find travis-build's deps
montanonic has quit [Ping timeout: 276 seconds]
<bennofs> what is the recommended way to solve this in ruby/bundler?
gigetoo has quit [Read error: Connection reset by peer]
brent__ has quit [Remote host closed the connection]
gigetoo has joined #ruby
<bennofs> so basically, I have two ruby apps: travis-cli and travis-build, where travis-cli requires travis-build. travis-cli does not know anything about travis-build, so how can I make travis-build find its deps (since travis-cli does not include the deps of travis-build, because travis-build is only a plugin which might have different dependencies?)
ResidentBiscuit has quit [Remote host closed the connection]
ResidentBiscuit has joined #ruby
bkxd has joined #ruby
youch has joined #ruby
agent_white has joined #ruby
machinewar has joined #ruby
vuoto has quit [Quit: Lost terminal]
vuoto has joined #ruby
youch has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
dagda1 has quit [Quit: Textual IRC Client: www.textualapp.com]
vali has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
gp5st has joined #ruby
gp5st has quit [Client Quit]
vali has joined #ruby
gigetoo has quit [Ping timeout: 276 seconds]
xen0fon has joined #ruby
nankyokusei has joined #ruby
gigetoo has joined #ruby
tomphp has joined #ruby
dionysus70 has joined #ruby
Devalo has joined #ruby
AndBobsYourUncle has joined #ruby
dionysus69 has quit [Ping timeout: 255 seconds]
dionysus70 is now known as dionysus69
conta has quit [Ping timeout: 256 seconds]
unshadow_ has quit [Ping timeout: 252 seconds]
nankyokusei has quit [Ping timeout: 240 seconds]
AndroUser123 has joined #ruby
<AndroUser123> hello
<AndroUser123> can someone help me
<AndroUser123> this should sum all numbers like if there is an array 1 2 3
<AndroUser123> 1+2, 1+3,2+3,3
Devalo has quit [Ping timeout: 264 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Zarthus> irb(main):004:0> [1,2,3,4].reduce(:+) # => 10
<kazlock> AndroUser123, Are you trying to find the sum of all combinations of 2? https://ruby-doc.org/core-2.2.0/Array.html#method-i-combination
<AndroUser123> hmm
<AndroUser123> nope
<AndroUser123> can be any numbers
<AndroUser123> max 100 elements
<AndroUser123> if the sum is divisible by k
<AndroUser123> d+=1
[reed] has quit [Ping timeout: 260 seconds]
<kazlock> What is this for?
gigetoo has quit [Ping timeout: 252 seconds]
<AndroUser123> competition
<AndroUser123> unranked
<kazlock> what is the problem statement?
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> >> [1,2,3].combination(2).to_a
<ruby[bot]> apeiros: # => [[1, 2], [1, 3], [2, 3]] (https://eval.in/726134)
<apeiros> you want the sums of those?
Guest81173 has joined #ruby
gigetoo has joined #ruby
<apeiros> >> [1,2,3].combination(2).select { |i,j| i < j && (i+j) % k == 0 }.size
<ruby[bot]> apeiros: # => undefined local variable or method `k' for main:Object (NameError) ...check link for more (https://eval.in/726135)
<apeiros> meh, forgot to define k
<kazlock> could reduce the complexity by sorting first
gheegh has quit [Ping timeout: 240 seconds]
<AndroUser123> i undertsnad your code
<AndroUser123> hmm
<AndroUser123> it shows -1
last_staff has quit [Quit: last_staff]
<AndroUser123> doesnt seem to work
duckpupp1 has joined #ruby
<AndroUser123> idk why
<apeiros> my condition is wrong
<AndroUser123> hmm
<apeiros> i & j are the value in my code, not the index
<AndroUser123> ah
<AndroUser123> yes
<apeiros> and i < j is meant with i & j being the index
antgel has joined #ruby
<apeiros> anyway, Array#combination already satisfies the i < j condition. no need to code it out.
<AndroUser123> still doesnt work
<apeiros> >> k=3; [1,3,2,6,1,2].combination(2).select { |i,j| (i+j) % k == 0 }.size
<ruby[bot]> apeiros: # => 5 (https://eval.in/726136)
<apeiros> works fine
<AndroUser123> puts a.combination(2).select { |i,j| a.index(i) < a.index(j) && (i+j) % k == 0 }.size
<apeiros> because that doesn't work if values are repeated
[reed] has joined #ruby
[reed] has quit [Changing host]
[reed] has joined #ruby
<AndroUser123> .uniq
<AndroUser123> ?
ifctj has quit [Ping timeout: 248 seconds]
<apeiros> you misunderstand
<apeiros> >> a = [1,3,2,6,1,2]; i = 4; {i: a[i], idx: a.index(1)}
<ruby[bot]> apeiros: # => {:i=>1, :idx=>0} (https://eval.in/726137)
<AndroUser123> solved it
<AndroUser123> somehow
<AndroUser123> combination sleects 2 elments that arent the same
<AndroUser123> ?
<apeiros> as you can see, index 0 and 4 are both 1. so a.index(1) will never return 4. it'll return the index of the first occurrence.
<AndroUser123> yes
<apeiros> hence `i < j` != `a.index(a[i]) < a.index(a[j])`
duckpupp1 has quit [Ping timeout: 258 seconds]
<apeiros> &ri Array#combination
gigetoo has quit [Ping timeout: 252 seconds]
<apeiros> the i < j condition exists to avoid that you test the pairs i=4,j=5 and i=5,j=4 - which would be twice the same. combination already avoids that.
<apeiros> kazlock: and because of ^, sorting won't help. the < is about the index, not the value.
<AndroUser123> oh i get it
<kazlock> apeiros, i see now
<AndroUser123> thanks man
<apeiros> AndroUser123: note, I normally don't provide solutions :-p
<AndroUser123> ok
gigetoo has joined #ruby
<AndroUser123> :)
<apeiros> (help != solve)
<AndroUser123> i see you are in good mood
<AndroUser123> can you recommend me a book about networking with ruby
<apeiros> na, just bored and almost asleep
<AndroUser123> servers and stuff
<AndroUser123> ruby docs enough?
<AndroUser123> well im also almost alseep lol
<apeiros> no. but if you find one, please drop us a line over in #ruby-community so we can put it up on this:
<AndroUser123> whats the time there
<apeiros> ?books
<ruby[bot]> You can find a list of recommended books at http://ruby-community.com/pages/links
<apeiros> 23:23
<havenwood> AndroUser123: For an intro to Sockets in Ruby: http://www.jstorimer.com/products/working-with-tcp-sockets
<AndroUser123> same time here
machinewar has quit []
<AndroUser123> can i make a simple chat server
<AndroUser123> with that knowledge
tristanp has joined #ruby
<AndroUser123> also do you think ruby is good for game hacking
<havenwood> AndroUser123: Yes, or an even more brisk intro: https://www6.software.ibm.com/developerworks/education/l-rubysocks/l-rubysocks-a4.pdf
<AndroUser123> i found a book and all examples are in c++
<AndroUser123> and asm
<AndroUser123> thanks bookmarked
<AndroUser123> ruby is slow when compared to c
<AndroUser123> ?
<apeiros> yes
vali has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> AndroUser123: Take a look at some random benchmarks: https://github.com/kostya/benchmarks#readme
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
<apeiros> in general, ruby code will run much slower than C
<AndroUser123> you wont recommend it for game hacks?
<apeiros> depends
jenrzzz has joined #ruby
<havenwood> AndroUser123: mruby is in the embeddable space that lua is in
<apeiros> it's still fast enough for a lot of things. with games, GC is more an issue afaik.
grh has joined #ruby
<havenwood> AndroUser123: They're working on making Ruby faster, see this canonical benchmark for progress: https://github.com/mame/optcarrot
<AndroUser123> what is ruby topaz
ByronJohnson has joined #ruby
<Papierkorb> that is ruby running on the Python VM
<Papierkorb> that is = topaz
<havenwood> AndroUser123: An experimental proof-of-concept showing that RPython can make a fast Ruby.
<AndroUser123> why would anyone want that
<AndroUser123> ah ok
<AndroUser123> jruby is mix of java and ruby?
<apeiros> shits and giggles
<apeiros> jruby is ruby on the jvm
<apeiros> that one is a serious contender
<Papierkorb> AndroUser123: Not a mix, it's ruby on the JVM, but it can in fact interface with Java code just fine
<apeiros> truffleruby shapes up to be one too - ruby on the graalvm
* havenwood AndroUser123: TruffleRuby is now further along, faster, and is actively developed by a large team. See: http://jruby.org/bench9000/
<havenwood> AndroUser123: https://github.com/graalvm/truffleruby
<AndroUser123> nice
<AndroUser123> will check it
<AndroUser123> and what about kotlin
<havenwood> AndroUser123: Not Ruby.
<Nilium> Also, it's generally useful to have multiple implementations just for experience in seeing how different approaches work.
<AndroUser123> i know its not ruby
<Nilium> They might go up in smoke but knowledge gained is nice.
ecuanaso has joined #ruby
<AndroUser123> can someone recommend me a good gui for ruby
<Nilium> For which OS?
vuoto has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
<AndroUser123> linux
<AndroUser123> and windows
JeanCarloMachado has joined #ruby
<Nilium> One of the gtk gems may work. Haven't done anything with them, though.
<Nilium> I think I still hold the gui gem, but it was intended as an in-OpenGL GUI.
<RickHull> having an issue with minitest/spec #wont_be_nil https://gist.github.com/rickhull/0dfed104dc8196a804ad105afd753ce2
gigetoo has quit [Read error: Connection reset by peer]
<RickHull> undefined method refute_nil for nil
gigetoo has joined #ruby
<AndroUser123> ok thanks
ur5us has quit [Remote host closed the connection]
tristanp has quit []
tristanp has joined #ruby
AndroUser123 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
AndBobsYourUncle has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
edwinvdg_ has joined #ruby
edwinvdgraaf has quit [Ping timeout: 240 seconds]
kht has quit [Ping timeout: 245 seconds]
gigetoo has joined #ruby
AndroUser123 has joined #ruby
AndBobsYourUncle has quit [Client Quit]
AndroUser123 is now known as AndroUser1234
saneax-_-|AFK is now known as saneax
<RickHull> gist updated. this is ridiculous: ruby -e "require 'minitest/autorun'; Array.new.must_be_instance_of(Array)" # FAILS
<RickHull> can anyone confirm? I must be doing something wrong
splud has quit [Quit: splud]
gigetoo has quit [Ping timeout: 264 seconds]
psychicist__ has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
JeanCarloMachado has quit [Ping timeout: 256 seconds]
JeanCarloMachado has joined #ruby
AndroUser1234 has quit [Quit: Leaving]
<havenwood> RickHull: ruby -r minitest/autorun -e "describe('RickHulls') { it('RickHulls') { [].must_be_instance_of Array } }"
<RickHull> oh duh
ledestin has joined #ruby
<havenwood> >> require 'minitest'; include Minitest::Assertions; module Minitest::Assertions; attr_accessor :assertions end; @assertions = 0; assert 'RickHull, but you can do some contortions for top level if you want'
<ruby[bot]> havenwood: # => true (https://eval.in/726154)
<RickHull> nah, just forgot that pesky it block :) thanks
<havenwood> RickHull: No prob!
ledestin has quit [Client Quit]
braderhart has quit [Quit: Connection closed for inactivity]
bennofs has quit [Ping timeout: 276 seconds]
jhack has quit [Quit: jhack]
gigetoo has quit [Ping timeout: 255 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
gigetoo has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.7]
dionysus69 has quit [Ping timeout: 240 seconds]
duckpupp1 has joined #ruby
ledestin has joined #ruby
FastJack has quit [Remote host closed the connection]
biberu has quit []
Coldblackice has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
duckpupp1 has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ledestin has quit [Ping timeout: 264 seconds]
Guest81173 has quit [Ping timeout: 240 seconds]
CloCkWeRX has joined #ruby
unshadow has joined #ruby
Jackneill_ has quit [Remote host closed the connection]
xen0fon has quit [Quit: xen0fon]
Coldblackice has quit []
Julianee has joined #ruby
ResidentBiscuit has quit [Remote host closed the connection]
ResidentBiscuit has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
Coldblackice has joined #ruby
teclator_ has quit [Ping timeout: 256 seconds]
marsjaninzmarsa has quit [Quit: ZNC 1.7.x-git-487-cbf5c38 - http://znc.in]
antgel has quit [Ping timeout: 240 seconds]
ResidentBiscuit has quit [Remote host closed the connection]
ResidentBiscuit has joined #ruby
jenrzzz has joined #ruby
hightower3 has quit [Remote host closed the connection]
FastJack has joined #ruby
JeanCarloMachado has quit [Ping timeout: 255 seconds]
JeanCarloMachado has joined #ruby
nankyokusei has joined #ruby
ResidentBiscuit has quit [Remote host closed the connection]
Derperperd has joined #ruby
ResidentBiscuit has joined #ruby
AnoHito has joined #ruby
msmith has joined #ruby
tristanp_ has joined #ruby
gigetoo_ has joined #ruby
ResidentBiscuit has quit [Remote host closed the connection]
grh has quit [Ping timeout: 255 seconds]
ResidentBiscuit has joined #ruby
cpt_yossarian has joined #ruby
xen0fon has joined #ruby
nankyokusei has quit [Ping timeout: 255 seconds]
armyriad has quit [Read error: Connection reset by peer]
AnoHito_ has quit [Read error: Connection reset by peer]
Derperpe1 has quit [Read error: Connection reset by peer]
gigetoo has quit [Ping timeout: 258 seconds]
tristanp has quit [Read error: Connection reset by peer]
yonatankoren has quit [Ping timeout: 258 seconds]
levifig has quit [Quit: Farewell]
woodruffw has quit [Excess Flood]
Prira_ has quit [Remote host closed the connection]
Gnubie_ has quit [Quit: No Ping reply in 180 seconds.]
\13k has quit [Ping timeout: 258 seconds]
webnanners has quit [Ping timeout: 258 seconds]
spectra has quit [Ping timeout: 258 seconds]
Gnubie_ has joined #ruby
olblak__ has quit [Ping timeout: 258 seconds]
destructure has quit [Ping timeout: 258 seconds]
rgs has quit [Ping timeout: 258 seconds]
webnanners has joined #ruby
armyriad has joined #ruby
olblak has joined #ruby
destructure has joined #ruby
\13k has joined #ruby
Prira has joined #ruby
rgs has joined #ruby
rheddry has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
yonatankoren has joined #ruby
kirun has quit [Quit: Konversation terminated!]
johnny56 has joined #ruby
marsjaninzmarsa has joined #ruby
tristanp_ has quit [Remote host closed the connection]
spectra has joined #ruby
spectra has quit [Changing host]
spectra has joined #ruby
tristanp has joined #ruby
tristanp has quit [Remote host closed the connection]
gigetoo_ is now known as gigetoo
tristanp has joined #ruby