__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
__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 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]
<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]
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
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..
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]
<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.
<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
<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
<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
<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]
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]
<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:
<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'