2015-05-26 17:42
drbrain changed the topic of #ruby-lang to: this channel will redirect to #ruby the morning of June 1, Pacific Time
00:04
Fooster has quit [Remote host closed the connection]
00:04
nofxx has joined #ruby-lang
00:04
nofxx has joined #ruby-lang
00:05
<
BanzaiJoe >
if I wanted to know the number of differences of two arrays, I would think I would subtract them, so I did...
00:06
<
VinnyBoy >
and now you broke everything?
00:06
<
BanzaiJoe >
(c-d).count but what happens instead is the count of the c and the count of d are subtracted and I get 0 no matter what
00:06
<
BanzaiJoe >
what's wrong with my thinking
00:06
<
BanzaiJoe >
c and d have the same amount in each array
00:06
<
VinnyBoy >
k, i dont know ruby
00:06
<
VinnyBoy >
but heeeh
00:07
<
VinnyBoy >
id do "c.count - d.count"
00:07
<
pipework >
BanzaiJoe: What do you want to see?
00:07
<
BanzaiJoe >
I don't want the differences in the count, I want to know how many things in the array are different
00:07
wallerdev_ has joined #ruby-lang
00:07
baweaver has joined #ruby-lang
00:07
<
BanzaiJoe >
if c = [1,3,4] and d= [2,3,4], I would hope for a difference count of 1, but I get zero
00:08
<
pipework >
BanzaiJoe: You could get a union and then remove that.
00:08
zendrix has quit [Ping timeout: 276 seconds]
00:08
<
BanzaiJoe >
so my thinking isn't borked, it's just my Ruby?
00:09
<
VinnyBoy >
theres 3 items in C and 3 items in D
00:09
<
BanzaiJoe >
it's subtracting n-n instead of
00:09
jgpawletko has joined #ruby-lang
00:09
<
pipework >
VinnyBoy: What if there's 3 in each, but all the items are different?
00:09
<
nofxx >
>> c = [1,3,4] and d= [2,3,4]; (c-d).count
00:09
<
BanzaiJoe >
but the difference of the array
*should* happen before the method appleis to it, correct?
00:09
<
pipework >
He wants to know which items across both arrays are different.
00:09
<
VinnyBoy >
in c++, count only determine how many items in an array
00:09
<
BanzaiJoe >
not so concern about which as the count
00:10
<
VinnyBoy >
it doesnt matter WHAT the items are
00:10
<
nofxx >
BanzaiJoe, it works as you want
00:10
bantic has joined #ruby-lang
00:10
<
BanzaiJoe >
nofxx yea, it's my code... thanks
00:10
<
BanzaiJoe >
time to hit the traffic anyways
00:10
<
VinnyBoy >
but then again, i know nothing of ruby so i shouldnt talk much
00:10
<
pipework >
>> a = %|1 2 3|; b = %|1 4 5|; a + b - (a & b)
00:11
<
pipework >
Oh right array lul
00:11
<
BanzaiJoe >
and that might be my problem I'm doing a genky c = a.split "" to cast the string to array
00:11
<
pipework >
>> a = %w|1 2 3|; b = %w|1 4 5|; a + b - (a & b)
00:11
<
pipework >
Those are the unique elements across both arrays.
00:11
<
nofxx >
pipework, haha pipes looks somewhat good for that ;)
00:12
<
nofxx >
pipework, no, just substract
00:12
wallerdev_ has quit [Ping timeout: 255 seconds]
00:12
jwaldrip_ has quit [Quit: Be back later ...]
00:12
<
BanzaiJoe >
catch ya later, thanks for the help
00:13
<
nofxx >
BanzaiJoe, to cast something use &: helper
00:13
<
pipework >
nofxx: Just subtract what?
00:13
<
pipework >
nofxx: It's called Symbol#to_proc
00:13
<
nofxx >
like: ary(&:to_s)
00:13
chouhoulis has joined #ruby-lang
00:13
<
nofxx >
to cast collections*
00:13
<
nofxx >
pipework, to get the unique between 2 arrays, just substract
00:14
<
BanzaiJoe >
errrr, I want to subtract arrays not strings
00:14
<
BanzaiJoe >
catch y'all later
00:14
<
pipework >
nofxx: We didn't want the unique between the two.
00:14
<
pipework >
We wanted the things that aren't unique between the two.
00:16
<
nofxx >
duh! I see, sorry.
00:17
aaeron has joined #ruby-lang
00:19
BanzaiJoe has quit [Ping timeout: 265 seconds]
00:20
Petruchio has joined #ruby-lang
00:21
chouhoulis has quit []
00:22
skammer|afk is now known as skammer
00:23
skammer has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
00:24
benlovell has joined #ruby-lang
00:24
chouhoulis has joined #ruby-lang
00:24
caseypatrickdris has quit [Remote host closed the connection]
00:26
codelurker has joined #ruby-lang
00:27
JEG2 has quit [Quit: Connection closed for inactivity]
00:28
benlovell has quit [Ping timeout: 258 seconds]
00:30
fujimura has joined #ruby-lang
00:34
charliesome has joined #ruby-lang
00:34
gambl0re has quit [Ping timeout: 245 seconds]
00:35
fujimura has quit [Ping timeout: 272 seconds]
00:37
mkosaki has quit [Ping timeout: 256 seconds]
00:37
scottschecter has joined #ruby-lang
00:37
mkosaki has joined #ruby-lang
00:37
michael_mbp has quit [Excess Flood]
00:37
mikecmpbll has quit [Quit: i've nodded off.]
00:37
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
00:38
codelurker has quit [Quit: codelurker]
00:41
michael_mbp has joined #ruby-lang
00:52
sankaber has joined #ruby-lang
00:56
lampshades has joined #ruby-lang
00:56
caseypatrickdris has joined #ruby-lang
00:59
b_hoffman has joined #ruby-lang
01:01
prereflect has joined #ruby-lang
01:03
jacor has joined #ruby-lang
01:03
jacor has quit [Client Quit]
01:04
b_hoffman has quit [Ping timeout: 256 seconds]
01:08
Petruchio has quit [Ping timeout: 264 seconds]
01:08
wallerdev_ has joined #ruby-lang
01:10
mkosaki has quit [Ping timeout: 264 seconds]
01:10
j4cknewt has joined #ruby-lang
01:11
Petruchio has joined #ruby-lang
01:12
wallerdev_ has quit [Ping timeout: 240 seconds]
01:13
caseypatrickdris has quit [Remote host closed the connection]
01:15
duderonomy has quit [Ping timeout: 256 seconds]
01:16
amclain has joined #ruby-lang
01:17
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:19
tkuchiki has joined #ruby-lang
01:30
fujimura_ has joined #ruby-lang
01:33
symm- has quit [Ping timeout: 255 seconds]
01:34
shtirlic has quit [K-Lined]
01:35
shtirlic has joined #ruby-lang
01:35
fujimura_ has quit [Ping timeout: 265 seconds]
01:38
drefined has joined #ruby-lang
01:42
caseypatrickdris has joined #ruby-lang
01:45
joaomdmoura has joined #ruby-lang
01:46
wallerdev has quit [Quit: wallerdev]
01:46
duderonomy has joined #ruby-lang
01:47
joaomdmoura has quit [Remote host closed the connection]
01:48
joaomdmoura has joined #ruby-lang
01:50
j4cknewt has quit [Remote host closed the connection]
01:51
Respek has joined #ruby-lang
01:58
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
02:00
shinnya has quit [Ping timeout: 265 seconds]
02:01
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
02:01
baweaver has quit [Remote host closed the connection]
02:02
charliesome has quit [Quit: zzz]
02:04
charliesome has joined #ruby-lang
02:08
mkosaki has joined #ruby-lang
02:09
wallerdev has joined #ruby-lang
02:14
wallerdev has quit [Ping timeout: 252 seconds]
02:14
fujimura has joined #ruby-lang
02:15
bantic has quit [Quit: bantic]
02:17
lampshades has quit [Quit: lampshades]
02:17
caseypatrickdris has quit [Remote host closed the connection]
02:33
duderonomy has joined #ruby-lang
02:39
shreeve has joined #ruby-lang
02:40
<
shreeve >
ruby has a debugging api that isn't exposed... can I use ffi to access it?
02:45
aaeron has quit [Quit: aaeron]
02:48
jwaldrip_ has joined #ruby-lang
02:48
mcclurmc has quit [Remote host closed the connection]
02:49
mcclurmc has joined #ruby-lang
02:50
mcclurmc_ has joined #ruby-lang
02:51
mcclurmc has quit [Read error: Connection reset by peer]
02:51
GPrime has joined #ruby-lang
02:51
drefined has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
02:51
drefined has joined #ruby-lang
02:52
drefined has quit [Client Quit]
02:54
gambl0re has joined #ruby-lang
03:00
StephenOTT has joined #ruby-lang
03:01
bantic has joined #ruby-lang
03:02
crdpink has joined #ruby-lang
03:03
crdpink2 has quit [Ping timeout: 256 seconds]
03:10
wallerdev has joined #ruby-lang
03:13
benlovell has joined #ruby-lang
03:14
wallerdev has quit [Ping timeout: 240 seconds]
03:17
iamninja has quit [Ping timeout: 250 seconds]
03:18
benlovell has quit [Ping timeout: 265 seconds]
03:25
crankharder has quit [Ping timeout: 246 seconds]
03:26
bantic has quit [Quit: bantic]
03:27
crankharder has joined #ruby-lang
03:28
gianlucadv has joined #ruby-lang
03:30
djbkd has quit [Quit: My people need me...]
03:31
iamninja has joined #ruby-lang
03:31
aaeron has joined #ruby-lang
03:34
baweaver has joined #ruby-lang
03:34
shtirlic has quit [K-Lined]
03:35
shtirlic has joined #ruby-lang
03:35
gix has quit [Ping timeout: 246 seconds]
03:37
aaeron has quit [Quit: aaeron]
03:40
gix has joined #ruby-lang
03:53
StephenOTT has quit [Quit: StephenOTT]
03:57
gianlucadv has quit [Ping timeout: 264 seconds]
04:04
ledestin has joined #ruby-lang
04:06
jwaldrip_ has quit [Quit: Be back later ...]
04:11
wallerdev has joined #ruby-lang
04:16
michael_mbp has quit [Excess Flood]
04:16
wallerdev has quit [Ping timeout: 256 seconds]
04:18
michael_mbp has joined #ruby-lang
04:21
revath has joined #ruby-lang
04:23
nofxx_ has joined #ruby-lang
04:24
charliesome has quit [Quit: zzz]
04:25
Respek has quit [Read error: Connection reset by peer]
04:26
nofxx has quit [Ping timeout: 256 seconds]
04:27
mcclurmc_ has quit [Remote host closed the connection]
04:29
djbkd has joined #ruby-lang
04:37
charliesome has joined #ruby-lang
04:39
riotjones has joined #ruby-lang
04:41
revath has quit [Ping timeout: 256 seconds]
04:42
stevednd has quit [Ping timeout: 256 seconds]
04:43
riotjones has quit [Ping timeout: 245 seconds]
04:45
workmad3 has joined #ruby-lang
04:50
workmad3 has quit [Ping timeout: 240 seconds]
04:55
stevednd has joined #ruby-lang
04:58
arBmind has joined #ruby-lang
05:05
djbkd has quit [Remote host closed the connection]
05:12
arBmind has quit [Quit: Leaving.]
05:15
djbkd has joined #ruby-lang
05:20
gambl0re has quit [Ping timeout: 258 seconds]
05:20
chouhoulis has quit [Remote host closed the connection]
05:24
erichmenge has quit [Quit: Arrivederci!]
05:26
revath has joined #ruby-lang
05:28
hahuang61 has joined #ruby-lang
05:28
hahuang61 has quit [Remote host closed the connection]
05:29
hahuang61 has joined #ruby-lang
05:30
rbowlby has joined #ruby-lang
05:30
ur5us has quit [Remote host closed the connection]
05:32
hahuang61 has quit [Client Quit]
05:34
chinmay_dd has joined #ruby-lang
05:40
benlovell has joined #ruby-lang
05:43
hahuang65 has quit [Ping timeout: 244 seconds]
05:44
benlovell has quit [Ping timeout: 245 seconds]
05:51
David_H__ has joined #ruby-lang
05:53
David_H_Smith has quit [Ping timeout: 244 seconds]
05:54
revath has quit [Quit: Leaving.]
05:55
revath has joined #ruby-lang
06:00
riotjones has joined #ruby-lang
06:04
cornerma1 has joined #ruby-lang
06:05
fusillicode has quit [Quit: Leaving.]
06:05
fusillicode has joined #ruby-lang
06:06
hahuang65 has joined #ruby-lang
06:07
hahuang65 has quit [Remote host closed the connection]
06:07
cornerman has quit [Ping timeout: 264 seconds]
06:07
hahuang65 has joined #ruby-lang
06:07
cornerma1 is now known as cornerman
06:08
revath has quit [Ping timeout: 276 seconds]
06:10
hahuang65 has quit [Remote host closed the connection]
06:10
hahuang65 has joined #ruby-lang
06:13
hahuang65 has quit [Remote host closed the connection]
06:14
charliesome has quit [Ping timeout: 256 seconds]
06:14
iamninja has quit [Read error: Connection reset by peer]
06:15
hahuang65 has joined #ruby-lang
06:15
revath has joined #ruby-lang
06:16
hahuang65 has quit [Client Quit]
06:17
wallerdev has joined #ruby-lang
06:17
skade has joined #ruby-lang
06:19
j4cknewt has joined #ruby-lang
06:20
skade has quit [Client Quit]
06:22
iamninja has joined #ruby-lang
06:25
kerunaru has joined #ruby-lang
06:28
crdpink2 has joined #ruby-lang
06:28
crdpink has quit [Ping timeout: 256 seconds]
06:28
TvL2386 has joined #ruby-lang
06:29
chinmay__ has joined #ruby-lang
06:31
chinmay_dd has quit [Ping timeout: 264 seconds]
06:31
sandelius has joined #ruby-lang
06:34
workmad3 has joined #ruby-lang
06:36
ta has joined #ruby-lang
06:37
ta has quit [Remote host closed the connection]
06:37
_ht has joined #ruby-lang
06:39
revath has quit [Read error: No route to host]
06:39
workmad3 has quit [Ping timeout: 265 seconds]
06:39
revath has joined #ruby-lang
06:41
micmus has joined #ruby-lang
06:42
pyo_ has joined #ruby-lang
06:42
ruby-lang075 has joined #ruby-lang
06:43
ruby-lang075 has quit [Client Quit]
06:44
<
shreeve >
can 'ffi' be used with static libraries?
06:44
amclain has quit [Quit: Leaving]
06:44
charliesome has joined #ruby-lang
06:45
allomov has joined #ruby-lang
06:46
kerunaru has quit [Ping timeout: 265 seconds]
06:48
michael_mbp has quit [Excess Flood]
06:49
michael_mbp has joined #ruby-lang
06:49
chinmay__ is now known as chinmay_dd
06:50
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
06:51
scottschecter has quit [Ping timeout: 244 seconds]
06:52
dzejrou has joined #ruby-lang
07:02
skade has joined #ruby-lang
07:05
solars has joined #ruby-lang
07:07
micmus has quit [Ping timeout: 276 seconds]
07:08
dhjondoh has joined #ruby-lang
07:09
wallerdev has quit [Quit: wallerdev]
07:10
benlovell has joined #ruby-lang
07:12
wallerdev has joined #ruby-lang
07:13
Ilyes512 has joined #ruby-lang
07:14
ruurd has joined #ruby-lang
07:15
Iskarlar has joined #ruby-lang
07:16
vassy has joined #ruby-lang
07:18
revath has quit [Ping timeout: 265 seconds]
07:18
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
07:19
<
vassy >
Hi...I have a question about ruby gem Koala...Is this the right forum to ask?
07:19
dzejrou has quit [Read error: Connection reset by peer]
07:20
<
maloik >
we won't know until you ask ;-)
07:22
<
vassy >
Ok...I am using Koala gem for reading facebook posts on my wall
07:22
<
vassy >
I am trying to get all the posts on my facebook profile using Koala. I am using the following method - feed = graph.get_connections("me", "feed")
07:22
<
vassy >
feed = graph.get_connections("me", "feed")
07:23
<
vassy >
ut this method returns an array of hash whose element is -
07:23
djbkd has quit [Quit: Leaving...]
07:23
<
vassy >
{"updated_time"=>"some time", "is_hidden"=>false, "story"=>"someone and 10 others wrote on your timeline.", "from"=>{"id"=>"some id", "name"=>"some name"}, "id"=>"some id", "privacy"=>{"deny"=>"", "value"=>"", "friends"=>"", "description"=>"", "allow"=>""}, "type"=>"status", "created_time"=>"some time", "status_type"=>"wall_post"}
07:23
<
vassy >
The problem in this case is I am not able to retrieve individual posts on timeline.
07:24
<
vassy >
There is "story" present in the hash but no "Message". I expected that there would be 11 elements in the array as 11 friends posted on timeline.
07:25
<
maloik >
you should probably gist your code and show the proper output
07:26
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
07:26
<
vassy >
Following is my code
07:26
<
vassy >
Koala.config.api_version = "v2.3"
07:26
<
vassy >
@graph = Koala::Facebook::API.new("access token")
07:26
Musashi007 has joined #ruby-lang
07:27
baweaver has quit [Remote host closed the connection]
07:27
Iskarlar has joined #ruby-lang
07:28
<
maloik >
it's a lot easier to read and less spam in the channel
07:28
wallerdev has quit [Quit: wallerdev]
07:30
<
maloik >
now add the output in there and give the file a name ending in .rb so syntax highlighting is active ;)
07:31
<
maloik >
bit tedious but you'll thank me in the long run, it helps people to help you
07:31
Iskarlar has quit [Client Quit]
07:31
joaomdmoura has quit [Remote host closed the connection]
07:36
charliesome has quit [Quit: zzz]
07:37
<
vassy >
If you look at the output has
07:37
<
vassy >
there is "story" present in there
07:38
<
vassy >
"story" => "someone and 10 others wrote on your timeline"
07:38
Iskarlar has joined #ruby-lang
07:38
<
vassy >
how do I get all the individual 11 posts?
07:39
<
vassy >
If I retrieve just one post there is "message" present in the hash
07:40
skade has quit [Quit: Computer has gone to sleep.]
07:41
skammer has joined #ruby-lang
07:42
rippa has joined #ruby-lang
07:43
<
maloik >
did you try the second one?
07:43
<
maloik >
that sentence sounds like a notification at the top of the page, it sounds familiar
07:44
<
vassy >
yes...these posts are at the top of the page
07:44
<
vassy >
the second element in the hash is something else
07:44
<
vassy >
not related to these 11 posts
07:44
<
vassy >
it skips them
07:45
shreeve has quit [Ping timeout: 246 seconds]
07:45
revath has joined #ruby-lang
07:45
elia has joined #ruby-lang
07:48
Musashi007 has quit [Quit: Musashi007]
07:49
kerunaru has joined #ruby-lang
07:49
<
maloik >
not sure what you mean by that
07:49
<
maloik >
don't really have time to try it out myself right now, I need to get some actual work done :/
07:50
<
vassy >
I expected the output to array to have 11 elements
07:50
<
maloik >
I'd dig into their wiki, maybe install their sample application to see if they display the posts somehow and then find the relevant piece of code to see how it's done
07:50
<
vassy >
each element correspoding to something posted by a friend
07:50
<
vassy >
instead it contains only one element
07:51
<
vassy >
and the key "story" is present in the hash
07:51
ta has joined #ruby-lang
07:51
<
vassy >
whereas if 11 elements had been present in the hash the key "message" would be present with the particular message
07:51
<
vassy >
anyways thanks a lot!
07:52
charliesome has joined #ruby-lang
07:52
<
maloik >
I spotted a kind of filter in the api docs just earlier
07:53
<
maloik >
where you could say which fields you want returned
07:53
<
maloik >
maybe that's the problem with the object only having one attribute
07:54
rbowlby has quit [Remote host closed the connection]
07:54
rbowlby has joined #ruby-lang
07:54
<
vassy >
can you explain a bit more?
07:55
skammer is now known as skammer|afk
07:55
skammer|afk is now known as skammer
07:55
rbowlby has quit [Remote host closed the connection]
07:57
<
maloik >
search the page for "fields"
07:57
<
maloik >
only one result
07:58
dudedudeman has quit [Ping timeout: 272 seconds]
07:58
VinnyBoy has quit [Read error: Connection reset by peer]
07:58
langlands has joined #ruby-lang
07:58
iamninja has quit [Read error: Connection reset by peer]
08:00
ta has quit [Remote host closed the connection]
08:00
chinmay_dd has quit []
08:01
iamninja has joined #ruby-lang
08:04
<
vassy >
will try it out...thanks a lot!
08:05
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
08:06
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
08:06
rbowlby has joined #ruby-lang
08:09
Iskarlar has joined #ruby-lang
08:09
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
08:12
dudedudeman has joined #ruby-lang
08:16
mikecmpbll has joined #ruby-lang
08:17
<
vassy >
nope...it is still returning as one message
08:17
dudedudeman has quit [Ping timeout: 264 seconds]
08:17
<
maloik >
I don't quite understand "returning as one message"
08:18
<
vassy >
I mean those 11 message are returned only in one element
08:18
<
vassy >
without the key "message"
08:18
skammer is now known as skammer|afk
08:18
<
maloik >
the hash you show there
08:18
<
maloik >
that's only one line of output in your terminal, right?
08:19
<
maloik >
the feed.each { } should display something 11 times if there are 11 elements present
08:20
<
vassy >
feed.each should display 11 times
08:20
<
vassy >
but it actually displays those first 11 messages in one
08:20
dudedudeman has joined #ruby-lang
08:21
<
vassy >
with the output shown
08:21
<
maloik >
okay hang on this isn't working, let me try it out myself then
08:21
<
vassy >
these posts are related thats its clubbing them
08:22
<
vassy >
*thats why its clubbing them into one
08:22
<
vassy >
if the posts are unrelated it retrieves the 11 messages
08:22
<
vassy >
for e.g. the posts can be birthday messages
08:23
workmad3 has joined #ruby-lang
08:27
skammer|afk is now known as skammer
08:28
<
maloik >
I don't see the problem
08:28
<
maloik >
each object in the feed array represents one of my posts
08:28
workmad3 has quit [Ping timeout: 264 seconds]
08:30
<
vassy >
yeah...but in your case the posts may not be related
08:30
<
vassy >
for e.g. if the posts are birthday messages
08:30
<
vassy >
facebook clubs them...I think so...
08:31
<
maloik >
if they do, then the related messages can be found as part of that first message
08:31
<
maloik >
for instance through feed[0]['comments']
08:31
<
vassy >
nope...for me feed[0]['message'] is nil
08:31
<
maloik >
that's not what I said
08:32
<
maloik >
also, we won't be able to help you unless our timeline happens to be the same as yours
08:32
<
maloik >
you'll just need to dig into the object and find what you need
08:32
<
vassy >
yeah...its my timeline
08:32
<
vassy >
I am trying to make a program to automatically reply to birthday posts
08:33
<
vassy >
so I tried my program with just one post and it worked fine
08:35
rikkipitt has joined #ruby-lang
08:37
dudedudeman has quit [Ping timeout: 256 seconds]
08:37
<
maloik >
I've found an example I think
08:37
<
vassy >
oh...great!
08:39
chinmay_dd has joined #ruby-lang
08:41
dudedudeman has joined #ruby-lang
08:44
ArchRogem has joined #ruby-lang
08:49
ur5us has joined #ruby-lang
08:50
banister has joined #ruby-lang
08:52
dudedudeman has quit [Ping timeout: 250 seconds]
08:52
<
maloik >
95% certain /feed is simply not what you need
08:52
<
maloik >
feed is what your profile displays to others... so "XXX and Y others posted to your_name's wall" is something "you" would post to your friends
08:52
<
maloik >
hence why it shows up in /feed
08:53
<
maloik >
to find whatever messages that contains you'll need another api endpoint, and possibly your friends' permission to read said posts using the api
08:53
<
maloik >
can't help you anymore im afraid, this has taken up too much time already :)
08:53
<
maloik >
if you use /posts you'll see your own posts, so the one I described above won't even be included
08:54
<
vassy >
oh...ok ok...
08:54
<
vassy >
thanks a lot though!
08:57
nofxx_ has quit [Ping timeout: 264 seconds]
08:59
ledestin has joined #ruby-lang
09:03
workmad3 has joined #ruby-lang
09:04
chussenot has joined #ruby-lang
09:04
skammer is now known as skammer|afk
09:05
mkosaki_ has joined #ruby-lang
09:06
dudedudeman has joined #ruby-lang
09:06
mkosaki has quit [Ping timeout: 265 seconds]
09:07
skammer|afk is now known as skammer
09:07
skammer has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
09:07
revath has quit [Ping timeout: 252 seconds]
09:11
stan has joined #ruby-lang
09:17
Musashi007 has joined #ruby-lang
09:32
fu2ristiq has joined #ruby-lang
09:32
<
fu2ristiq >
hello everybody
09:33
<
fu2ristiq >
I hope you're having a nice day
09:33
skade has joined #ruby-lang
09:33
revath has joined #ruby-lang
09:35
fu2ristiq has left #ruby-lang [#ruby-lang]
09:35
rbowlby has quit [Remote host closed the connection]
09:37
marr has joined #ruby-lang
09:39
Musashi007 has quit [Quit: Musashi007]
09:40
maxshelley has joined #ruby-lang
09:46
langlands has joined #ruby-lang
09:47
skade has quit [Quit: Computer has gone to sleep.]
09:53
intinig has joined #ruby-lang
09:55
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
09:57
sandelius has joined #ruby-lang
09:59
stamina has joined #ruby-lang
10:00
centrx has joined #ruby-lang
10:02
rikkipitt has quit [Remote host closed the connection]
10:04
rikkipitt has joined #ruby-lang
10:08
ta has joined #ruby-lang
10:08
skade has joined #ruby-lang
10:09
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
10:11
iamninja has quit [Read error: Connection reset by peer]
10:12
benlovell has quit [Ping timeout: 256 seconds]
10:14
skade has quit [Quit: Computer has gone to sleep.]
10:21
jack_ has joined #ruby-lang
10:22
jack_ has quit [Client Quit]
10:23
jack_ has joined #ruby-lang
10:24
iamninja has joined #ruby-lang
10:27
skammer has joined #ruby-lang
10:28
benlovell has joined #ruby-lang
10:30
cazku has joined #ruby-lang
10:33
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
10:35
Musashi007 has joined #ruby-lang
10:36
rbowlby has joined #ruby-lang
10:36
Iskarlar has joined #ruby-lang
10:37
cazku has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0/20150511103818]]
10:40
Iskarlar has quit [Client Quit]
10:41
Iskarlar has joined #ruby-lang
10:43
rikkipitt has quit [Quit: Leaving...]
10:44
iamninja has quit [Read error: Connection reset by peer]
10:44
rbowlby has quit [Ping timeout: 252 seconds]
10:47
Paradox has quit [Ping timeout: 256 seconds]
10:47
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
10:48
dudedudeman has quit [Ping timeout: 264 seconds]
10:48
Iskarlar has joined #ruby-lang
10:51
symm- has joined #ruby-lang
10:52
vassy has quit [Ping timeout: 246 seconds]
10:53
Paradox has joined #ruby-lang
10:54
dudedudeman has joined #ruby-lang
10:56
Ilyes512 has joined #ruby-lang
10:57
Ilyes512 has quit [Max SendQ exceeded]
10:57
k3asd` has joined #ruby-lang
10:57
Ilyes512 has joined #ruby-lang
10:59
nux443 has joined #ruby-lang
10:59
ruurd has quit [Quit: Leaving...]
11:01
jack_ has quit [Quit: Leaving...]
11:03
fujimura has quit [Remote host closed the connection]
11:07
j4cknewt has quit [Remote host closed the connection]
11:08
iamninja has joined #ruby-lang
11:17
Paradox has quit [Ping timeout: 265 seconds]
11:18
jeeves555 has joined #ruby-lang
11:18
thebastl has joined #ruby-lang
11:18
k3asd` has quit [Ping timeout: 246 seconds]
11:19
ur5us has quit [Remote host closed the connection]
11:19
dorei has joined #ruby-lang
11:20
djinni` has quit [Ping timeout: 246 seconds]
11:20
k3asd` has joined #ruby-lang
11:21
dudedudeman has quit [Ping timeout: 256 seconds]
11:23
Paradox has joined #ruby-lang
11:24
djinni` has joined #ruby-lang
11:26
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
11:27
dudedudeman has joined #ruby-lang
11:27
kerunaru has joined #ruby-lang
11:29
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:32
Bertg has joined #ruby-lang
11:33
Bertg has quit [Client Quit]
11:33
ldnunes has joined #ruby-lang
11:34
k3asd` has quit [Ping timeout: 272 seconds]
11:34
skade has joined #ruby-lang
11:34
dudedudeman has quit [Ping timeout: 246 seconds]
11:39
tkuchiki has quit [Ping timeout: 264 seconds]
11:39
djinni` has quit [Ping timeout: 248 seconds]
11:40
dudedudeman has joined #ruby-lang
11:40
benlovell has quit [Ping timeout: 240 seconds]
11:41
maxshelley has joined #ruby-lang
11:42
djinni` has joined #ruby-lang
11:42
Musashi007 has quit [Quit: Musashi007]
11:43
djinni` has quit [Excess Flood]
11:44
benlovell has joined #ruby-lang
11:44
djinni` has joined #ruby-lang
11:45
sgambino has joined #ruby-lang
11:46
charliesome has quit [Quit: zzz]
11:48
arBmind has joined #ruby-lang
11:49
benlovell has quit [Ping timeout: 265 seconds]
11:53
tomaz_b has joined #ruby-lang
11:55
Guest29816 has joined #ruby-lang
11:56
jack_ has joined #ruby-lang
11:57
micmus has joined #ruby-lang
11:59
banister has joined #ruby-lang
11:59
banister has quit [Max SendQ exceeded]
12:01
banister has joined #ruby-lang
12:01
sepp2k has joined #ruby-lang
12:02
ta has quit [Read error: Connection reset by peer]
12:02
ta has joined #ruby-lang
12:03
benlovell has joined #ruby-lang
12:03
allomov has quit [Read error: Connection reset by peer]
12:03
allomov has joined #ruby-lang
12:08
k3asd` has joined #ruby-lang
12:15
jeeves555 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
12:15
langlands has quit [Read error: Connection reset by peer]
12:19
sluukkonen has joined #ruby-lang
12:20
thebastl has quit [Remote host closed the connection]
12:20
mehdi1 has left #ruby-lang [#ruby-lang]
12:20
k3asd` has quit [Ping timeout: 244 seconds]
12:20
chinmay_dd has quit []
12:23
thebastl has joined #ruby-lang
12:23
langlands has joined #ruby-lang
12:27
chouhoulis has joined #ruby-lang
12:28
banister is now known as banisterfiend
12:29
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
12:29
lapide_viridi has joined #ruby-lang
12:32
hinbody has joined #ruby-lang
12:34
Guest29816 has quit [Quit: Leaving]
12:34
mike has joined #ruby-lang
12:35
mike is now known as Guest8804
12:35
Ilyes512 has joined #ruby-lang
12:38
thebastl has quit [Quit: Leaving...]
12:39
kerunaru has quit [Read error: Connection reset by peer]
12:44
SalexW has joined #ruby-lang
12:44
banisterfiend has quit [Ping timeout: 255 seconds]
12:45
imperator has joined #ruby-lang
12:47
langlands has quit [Ping timeout: 245 seconds]
12:51
benlovell has quit [Ping timeout: 252 seconds]
12:51
jwaldrip_ has joined #ruby-lang
12:52
langlands has joined #ruby-lang
12:54
Guest8804 has quit [Quit: Leaving]
12:54
mike___1234 has joined #ruby-lang
12:57
ajnabi has joined #ruby-lang
12:58
ajnabi has quit [Client Quit]
12:59
gambl0re has joined #ruby-lang
13:00
banister has joined #ruby-lang
13:01
benlovell has joined #ruby-lang
13:03
haraoka has joined #ruby-lang
13:04
revath1 has joined #ruby-lang
13:06
benlovell has quit [Ping timeout: 258 seconds]
13:06
revath has quit [Ping timeout: 245 seconds]
13:07
[k- has joined #ruby-lang
13:09
benlovell has joined #ruby-lang
13:10
ruby-lang541 has joined #ruby-lang
13:11
<
ruby-lang541 >
Hi, I've been using Ruby in Rails form two months now but there are some things I'm not sure to understand, about forms mainly, can anyone help me please ?
13:11
k3asd` has joined #ruby-lang
13:11
<
jhass >
ruby-lang541: check #RubyOnRails
13:11
<
ruby-lang541 >
thanks
13:12
ruby-lang541 has quit [Client Quit]
13:13
dudedudeman has quit [Ping timeout: 276 seconds]
13:15
banister is now known as banisterfiend
13:16
centrx has quit [Quit: Shutting down, Please wait...]
13:18
dudedudeman has joined #ruby-lang
13:21
jack_ has quit [Quit: Leaving...]
13:21
michael_mbp has quit [Excess Flood]
13:23
dudedudeman has quit [Ping timeout: 256 seconds]
13:25
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
13:25
skade has quit [Quit: Computer has gone to sleep.]
13:25
michael_mbp has joined #ruby-lang
13:27
michael_mbp has quit [Excess Flood]
13:27
Voker57 has quit [Read error: Connection reset by peer]
13:28
gambl0re has quit [Ping timeout: 250 seconds]
13:28
dudedudeman has joined #ruby-lang
13:29
michael_mbp has joined #ruby-lang
13:29
malconis has joined #ruby-lang
13:30
lapide_viridi has quit [Quit: Leaving]
13:30
skade has joined #ruby-lang
13:31
atomical_ has joined #ruby-lang
13:32
Iskarlar has joined #ruby-lang
13:32
michael_mbp has quit [Excess Flood]
13:32
michael_mbp has joined #ruby-lang
13:35
atomical has quit [Ping timeout: 248 seconds]
13:36
sankaber has joined #ruby-lang
13:37
michael_mbp has quit [Excess Flood]
13:38
agarie has joined #ruby-lang
13:40
malconis has quit [Remote host closed the connection]
13:40
malconis has joined #ruby-lang
13:40
dudedudeman has quit [Ping timeout: 256 seconds]
13:41
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
13:41
michael_mbp has joined #ruby-lang
13:42
baweaver has joined #ruby-lang
13:44
symm- has quit [Ping timeout: 264 seconds]
13:45
TvL2386 has quit [Quit: Ex-Chat]
13:46
dudedudeman has joined #ruby-lang
13:49
imperator2 has joined #ruby-lang
13:51
mike___1234 has left #ruby-lang ["Leaving"]
13:51
maxshelley has joined #ruby-lang
13:52
chussenot has quit [Ping timeout: 272 seconds]
13:52
skade has quit [Quit: Computer has gone to sleep.]
13:53
langlands has joined #ruby-lang
13:53
k3asd` has quit [Ping timeout: 265 seconds]
13:53
michael_mbp has quit [Excess Flood]
13:54
michael_mbp has joined #ruby-lang
13:54
skade has joined #ruby-lang
13:54
iamninja has quit [Read error: Connection reset by peer]
13:55
iamninja has joined #ruby-lang
13:58
michael_mbp has quit [Excess Flood]
13:59
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
14:00
tomaz_b has quit [Ping timeout: 250 seconds]
14:00
dudedudeman has quit [Ping timeout: 256 seconds]
14:00
michael_mbp has joined #ruby-lang
14:03
Ropeney has joined #ruby-lang
14:03
michael_mbp has quit [Excess Flood]
14:04
michael_mbp has joined #ruby-lang
14:04
riotjones has quit [Remote host closed the connection]
14:05
yalue has joined #ruby-lang
14:07
b_hoffman has joined #ruby-lang
14:08
atomical has joined #ruby-lang
14:08
mcclurmc has joined #ruby-lang
14:10
yfeldblum has joined #ruby-lang
14:11
dudedudeman has joined #ruby-lang
14:15
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
14:16
kreas has joined #ruby-lang
14:16
futilegames has joined #ruby-lang
14:17
rbowlby has joined #ruby-lang
14:18
baweaver has quit [Remote host closed the connection]
14:18
michael_mbp has quit [Excess Flood]
14:18
benlovell has quit [Ping timeout: 272 seconds]
14:18
michael_mbp has joined #ruby-lang
14:20
bantic has joined #ruby-lang
14:21
benlovell has joined #ruby-lang
14:22
Ilyes512 has joined #ruby-lang
14:22
rbowlby has quit [Ping timeout: 265 seconds]
14:24
banisterfiend has quit [Ping timeout: 255 seconds]
14:24
havenwood has joined #ruby-lang
14:25
jack_ has joined #ruby-lang
14:28
joast has quit [Quit: Leaving.]
14:29
michael_mbp has quit [Excess Flood]
14:30
michael_mbp has joined #ruby-lang
14:30
gambl0re has joined #ruby-lang
14:32
joast has joined #ruby-lang
14:33
caseypatrickdris has joined #ruby-lang
14:33
gamename has joined #ruby-lang
14:34
bruno- has joined #ruby-lang
14:35
joaomdmoura has joined #ruby-lang
14:35
joaomdmoura has quit [Remote host closed the connection]
14:35
dudedudeman has left #ruby-lang [#ruby-lang]
14:37
gamename has quit [Remote host closed the connection]
14:37
ddv has joined #ruby-lang
14:37
gamename has joined #ruby-lang
14:39
benlovell has quit [Ping timeout: 256 seconds]
14:39
gamename has quit [Remote host closed the connection]
14:39
enebo has joined #ruby-lang
14:40
gamename has joined #ruby-lang
14:41
gamename has quit [Remote host closed the connection]
14:41
gamename has joined #ruby-lang
14:42
riffraff has joined #ruby-lang
14:43
benlovell has joined #ruby-lang
14:46
yfeldblum has quit [Remote host closed the connection]
14:46
jack_ has quit [Quit: Leaving...]
14:49
benlovell has quit [Ping timeout: 272 seconds]
14:49
jack_ has joined #ruby-lang
14:50
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
14:50
crankharder has quit [Read error: Connection reset by peer]
14:50
shinnya has joined #ruby-lang
14:51
tubbo has joined #ruby-lang
14:53
j4cknewt has joined #ruby-lang
14:53
Iskarlar has joined #ruby-lang
14:56
gix has quit [Ping timeout: 265 seconds]
14:57
ta has quit [Remote host closed the connection]
14:58
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
14:58
grekko has joined #ruby-lang
14:59
jack_ has quit [Quit: Leaving...]
15:00
whippythellama has joined #ruby-lang
15:01
gix has joined #ruby-lang
15:01
mehdi1 has joined #ruby-lang
15:04
fusillicode has quit [Ping timeout: 264 seconds]
15:04
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
15:04
revath1 has quit [Ping timeout: 272 seconds]
15:05
riotjones has joined #ruby-lang
15:08
jack- has joined #ruby-lang
15:10
riotjones has quit [Ping timeout: 256 seconds]
15:12
k3asd` has joined #ruby-lang
15:14
allomov has quit [Remote host closed the connection]
15:17
elia has quit [Read error: No route to host]
15:17
elia_ has joined #ruby-lang
15:18
maxshelley has joined #ruby-lang
15:21
Ilyes512 has quit [Ping timeout: 272 seconds]
15:21
hotpancakes has joined #ruby-lang
15:23
futilegames has quit [Quit: futilegames]
15:23
postmodern has joined #ruby-lang
15:23
Voker57 has joined #ruby-lang
15:24
<
hotpancakes >
Does anyone know of a good walkthrough of the mechanics of a real ruby gem? I'm at the stage where I understand ruby pretty well, but I'm overwhelmed when I try to read through a real, live project of someone else's code...
15:24
slawrence00 has joined #ruby-lang
15:24
<
jhass >
pick a smaller example then
15:24
<
hotpancakes >
Any good examples?
15:24
<
ljarvis >
hotpancakes: pry is useful for this, pick a small project and start digging
15:25
<
hotpancakes >
ljarvis: care to elaborate the benefits of using pry vs just reading code on github?
15:25
skade has quit [Quit: Computer has gone to sleep.]
15:26
<
ljarvis >
hotpancakes: both are useful and unrelated. Pry lets you dig around with the functionality rather than just reading
15:26
<
jhass >
what do you try to read atm, and using what approach?
15:28
<
hotpancakes >
jhass: I guess I don't really have an approach, but I was browsing ActiveMerchant code on github.
15:28
<
hotpancakes >
ljarvis: any favorite pry features that are useful for this?
15:29
<
jhass >
I'd say pick a project you want to do, use a gem that you haven't used yet and use it by reading its code, not its docs
15:29
dhjondoh has quit [Quit: dhjondoh]
15:29
<
hotpancakes >
jhass: seems like a good plan
15:30
<
hotpancakes >
jhass: thanks for the help
15:32
allomov has joined #ruby-lang
15:34
haraoka has quit [Ping timeout: 255 seconds]
15:36
BanzaiJoe has joined #ruby-lang
15:37
rcvalle has joined #ruby-lang
15:38
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
15:39
alestuber has joined #ruby-lang
15:41
fusillicode has joined #ruby-lang
15:42
mikecmpb_ has joined #ruby-lang
15:43
hotpancakes has quit [Remote host closed the connection]
15:45
mikecmpbll has quit [Ping timeout: 276 seconds]
15:46
fusillicode has quit [Ping timeout: 245 seconds]
15:46
baweaver has joined #ruby-lang
15:46
fusillicode has joined #ruby-lang
15:47
<
BanzaiJoe >
Good day
15:47
<
ljarvis >
*tips fedora*
15:47
fusillicode has quit [Client Quit]
15:47
fusillicode1 has joined #ruby-lang
15:47
<
imperator >
*tips solaris*
15:47
fusillicode1 has quit [Read error: No route to host]
15:47
fusillicode has joined #ruby-lang
15:48
revath has joined #ruby-lang
15:48
* apeiros
doesn't tip
15:48
<
apeiros >
(not true, not true, I usually tip generously :D)
15:49
joaomdmoura has joined #ruby-lang
15:49
baweaver has quit [Remote host closed the connection]
15:52
dfockler has joined #ruby-lang
15:52
fusillicode has quit [Ping timeout: 258 seconds]
15:59
zendrix has joined #ruby-lang
16:00
marr has joined #ruby-lang
16:00
hahuang65 has joined #ruby-lang
16:01
chussenot has joined #ruby-lang
16:01
jack- has quit [Quit: Leaving...]
16:02
micmus has quit [Ping timeout: 246 seconds]
16:02
chussenot has quit [Client Quit]
16:04
chussenot has joined #ruby-lang
16:05
hahuang65 has quit [Ping timeout: 252 seconds]
16:06
rbowlby has joined #ruby-lang
16:08
darix has quit [Quit: may the packets be with you...]
16:11
rbowlby has quit [Ping timeout: 265 seconds]
16:12
skade has joined #ruby-lang
16:12
alestuber has quit [Remote host closed the connection]
16:12
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
16:13
alestuber has joined #ruby-lang
16:13
darix has joined #ruby-lang
16:14
intinig has quit [Remote host closed the connection]
16:14
chussenot has quit [Quit: chussenot]
16:14
baweaver has joined #ruby-lang
16:15
micmus has joined #ruby-lang
16:18
havenwood has joined #ruby-lang
16:19
nofxx_ has joined #ruby-lang
16:19
nofxx_ has joined #ruby-lang
16:21
sarkyniin has joined #ruby-lang
16:21
riffraff has quit [Quit: Leaving]
16:22
* baweaver
tips the scales
16:22
<
baweaver >
Ah, bit late, and that's SSB
16:22
* baweaver
wanders back off
16:23
VinnyBoy has joined #ruby-lang
16:23
allomov has quit [Remote host closed the connection]
16:25
toretore has quit [Ping timeout: 265 seconds]
16:26
hotpancakes has joined #ruby-lang
16:26
chussenot has joined #ruby-lang
16:27
shinnya has quit [Ping timeout: 255 seconds]
16:28
nofxx_ has quit [Ping timeout: 272 seconds]
16:28
caseypatrickdris has quit [Remote host closed the connection]
16:28
drewo has joined #ruby-lang
16:29
ecc_ has joined #ruby-lang
16:30
ecc_ has left #ruby-lang [#ruby-lang]
16:31
mikecmpb_ has quit [Quit: i've nodded off.]
16:32
<
BanzaiJoe >
hmmm....
16:32
<
BanzaiJoe >
given two arrays , I want to compare if each entry at the same index are the ssame or not
16:33
<
apeiros >
ary1 == ary2
16:33
<
BanzaiJoe >
can I do an each or each_with_object and interate through two arrays by index
16:33
<
apeiros >
baweaver: wait,
*the same* (object identity) or
*equal* (==)?
16:33
<
jhass >
>> ["a", "b"] == ["a", "b"]
16:33
<
jhass >
>> ["a", "b"] == ["b", "a"]
16:33
<
havenwood >
BanzaiJoe: Do you just want to know if they differ or how they differ?
16:34
<
BanzaiJoe >
if they differ and a count, but by at index position
16:34
k3asd` has quit [Ping timeout: 256 seconds]
16:34
<
baweaver >
apeiros: This is not the nerd you're looking for
*waves hands*
16:34
<
BanzaiJoe >
for example a = [1,2,3,4,5] b=[1,3,3,4,6] returns 2
16:35
<
apeiros >
baweaver: ¿que?
16:35
<
baweaver >
you tagged me above instead of BanzaiJoe
16:35
toretore has joined #ruby-lang
16:35
<
apeiros >
yeah, noticed. silly limechat. bad tab completion.
16:35
<
apeiros >
BanzaiJoe: wait,
*the same* (object identity) or
*equal* (==)?
16:35
<
apeiros >
baweaver: sorry
16:35
<
jhass >
it's confusing here too, same nick color, same starting letters, about same length
16:35
<
baweaver >
Not a problem
16:36
<
BanzaiJoe >
apeiros , at index 1 and 4, the entries are different so returns 2
16:36
<
baweaver >
>> class Array; def eql?(o) (self - o).size.zero? end end; ['a', 'b'].eql? ['b', 'a']
16:36
<
BanzaiJoe >
I was thinking of iterating through the arrays and checking and counting
16:37
<
baweaver >
scratch that
16:37
<
jhass >
>> a = [1, 2, 3, 4]; b = [1, 0, 3, 0]; a.each_with_index.count {|a, i| a != b[i] }
16:37
<
BanzaiJoe >
I went that route and realized that the equality and subtraction are no go
16:37
<
baweaver >
>> class Array; def eql?(o) [(self - o).size, (o - self).size].all?(&:zero?) end end; ['a', 'b'].eql? ['b', 'a']
16:38
<
jhass >
baweaver: why do you redefine eql? :(
16:38
<
BanzaiJoe >
jhass w00t, there's an each_with_index, that's awesome
16:38
<
baweaver >
quick hack
16:38
<
baweaver >
not paying attention to overrides at the moment
16:38
<
jhass >
you should give good examples :/
16:38
<
havenwood >
BanzaiJoe: a.zip(b).select { |x, y| x != y }.size
16:39
<
BanzaiJoe >
havenwood does that do that by indexed position?
16:39
<
havenwood >
BanzaiJoe: or rather: a.zip(b).count { |x, y| x != y }
16:39
<
havenwood >
BanzaiJoe: yes
16:39
<
havenwood >
BanzaiJoe: Index 0 from a zips with index 0 from b, etc. Zip!
16:39
<
BanzaiJoe >
hmmm... thinking about if the arrays have a different quantities of entries..
16:40
<
apeiros >
18:36 BanzaiJoe: apeiros , at index 1 and 4, the entries are different so returns 2
16:40
jack- has joined #ruby-lang
16:40
<
baweaver >
or just: a.sort == b.sort
16:40
<
apeiros >
Array#== returns true/false. it never returns 2
16:40
<
baweaver >
count number of differences
16:40
<
apeiros >
or was that meant "I'd like <my method> to return 2"?
16:41
<
apeiros >
if so - what should it return if ary1 and ary2 differ in length?
16:41
<
BanzaiJoe >
each additional index should return an additional count because they are different
16:41
<
BanzaiJoe >
for ones that are not the same
16:42
* BanzaiJoe
wanders off to irb
16:43
<
havenwood >
BanzaiJoe: Is `nil` a possible value in the Array?
16:43
<
apeiros >
well, ary1, ary2 = ary2, ary1 if ary1.length < ary2.length; ary1.zip(ary2).inject(ary2.length - ary1.length) { |count, (a,b)| count + (a == b ? 0 : 1) }
16:43
<
apeiros >
BanzaiJoe: ^
16:43
<
BanzaiJoe >
havenwood nil is acceptable but it would not be in these arrays
16:44
<
BanzaiJoe >
apeiros that's slick, thanks
16:45
<
jhass >
mmh, I think I'd ponder count and +'ing the diff
16:46
<
apeiros >
probably easier to read
16:46
<
apeiros >
I'm slightly intoxicated. code might suffer :D
16:47
elia_ has quit [Quit: Computer has gone to sleep.]
16:50
<
BanzaiJoe >
apeiros you're tipsy code is infinitely better than my code :)
16:50
benlovell has joined #ruby-lang
16:53
jack- has quit [Quit: Leaving...]
16:55
alestuber has quit [Remote host closed the connection]
16:56
benlovell has quit [Ping timeout: 245 seconds]
16:57
gwendall has joined #ruby-lang
16:57
benlovell has joined #ruby-lang
16:59
<
ljarvis >
on a thursday.. hat tip to you, sir
17:00
stamina has quit [Remote host closed the connection]
17:05
benlovell has quit [Ping timeout: 252 seconds]
17:07
tenderlove has joined #ruby-lang
17:08
zendrix has quit [Remote host closed the connection]
17:09
zendrix has joined #ruby-lang
17:11
anjen has joined #ruby-lang
17:13
sarkyniin has left #ruby-lang ["Left"]
17:14
zendrix has quit [Remote host closed the connection]
17:14
zendrix has joined #ruby-lang
17:14
stan has quit [Ping timeout: 256 seconds]
17:15
alestuber has joined #ruby-lang
17:15
tibig has joined #ruby-lang
17:16
wallerdev has joined #ruby-lang
17:16
shinnya has joined #ruby-lang
17:17
mattyohe has joined #ruby-lang
17:19
<
bnagy >
s=[a,b].sort_by(&:size);s.last.zip(s.first).group_by {|x,y| x==y}[false].size
17:20
chouhoulis has quit [Remote host closed the connection]
17:23
alestuber has quit [Ping timeout: 244 seconds]
17:26
djbkd has joined #ruby-lang
17:28
tibig has quit [Ping timeout: 265 seconds]
17:29
tibig has joined #ruby-lang
17:30
nofxx has joined #ruby-lang
17:30
nofxx has joined #ruby-lang
17:35
Ilyes512 has joined #ruby-lang
17:36
alestuber has joined #ruby-lang
17:41
hotpancakes has quit [Remote host closed the connection]
17:42
malconis has joined #ruby-lang
17:42
SalexW has quit [Remote host closed the connection]
17:43
banister has joined #ruby-lang
17:46
tenderlove has quit [Quit: Leaving...]
17:46
banister has quit [Client Quit]
17:47
skade has quit [Quit: Computer has gone to sleep.]
17:47
alestuber has quit [Ping timeout: 240 seconds]
17:47
tenderlove has joined #ruby-lang
17:47
hotpancakes has joined #ruby-lang
17:47
alestuber has joined #ruby-lang
17:48
alestuber has quit [Remote host closed the connection]
17:52
mikecmpbll has joined #ruby-lang
17:52
benlovell has joined #ruby-lang
17:55
rbowlby has joined #ruby-lang
17:55
hahuang65 has joined #ruby-lang
17:55
hahuang65 has quit [Client Quit]
17:55
matled has quit [Remote host closed the connection]
17:57
benlovell has quit [Ping timeout: 256 seconds]
17:57
hahuang65 has joined #ruby-lang
17:58
chadwtaylor has joined #ruby-lang
17:59
symm- has joined #ruby-lang
17:59
alestuber has joined #ruby-lang
18:00
rbowlby has quit [Ping timeout: 265 seconds]
18:00
marr has quit [Ping timeout: 258 seconds]
18:01
hotpancakes has quit []
18:01
ta has joined #ruby-lang
18:02
banister has joined #ruby-lang
18:03
tubbo has quit [Ping timeout: 264 seconds]
18:05
matled has joined #ruby-lang
18:06
tubbo has joined #ruby-lang
18:08
DLSteve has joined #ruby-lang
18:10
b_hoffman has quit [Quit: b_hoffman]
18:11
chinmay_dd has joined #ruby-lang
18:15
zendrix has quit [Remote host closed the connection]
18:15
chinmay_dd has quit [Client Quit]
18:15
b_hoffman has joined #ruby-lang
18:19
workmad3 has quit [Ping timeout: 258 seconds]
18:20
chouhoulis has joined #ruby-lang
18:20
atomical has quit [Write error: Connection reset by peer]
18:21
atomical has joined #ruby-lang
18:25
cornerma1 has joined #ruby-lang
18:25
cornerman has quit [Read error: Connection reset by peer]
18:25
cornerma1 is now known as cornerman
18:26
ledestin has joined #ruby-lang
18:26
symm- has quit [Ping timeout: 272 seconds]
18:28
rippa has quit [Read error: Connection reset by peer]
18:28
rippa has joined #ruby-lang
18:31
chouhoulis has quit [Remote host closed the connection]
18:31
chouhoulis has joined #ruby-lang
18:33
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
18:34
arBmind has quit [Quit: Leaving.]
18:35
benlovell has joined #ruby-lang
18:38
rbowlby has joined #ruby-lang
18:40
benlovell has quit [Ping timeout: 256 seconds]
18:44
toretore has quit [Quit: This computer has gone to sleep]
18:48
revath has quit [Ping timeout: 272 seconds]
18:49
symm- has joined #ruby-lang
18:49
zendrix has joined #ruby-lang
18:50
bertocode has joined #ruby-lang
18:50
arBmind has joined #ruby-lang
18:52
alestuber has quit [Remote host closed the connection]
18:55
momomomomo has joined #ruby-lang
18:56
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
18:56
arBmind1 has joined #ruby-lang
18:57
elia has joined #ruby-lang
18:58
maxshelley has joined #ruby-lang
18:59
dzejrou has joined #ruby-lang
19:00
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
19:00
b_hoffman has quit [Quit: b_hoffman]
19:00
baweaver has quit [Remote host closed the connection]
19:00
arBmind has quit [Ping timeout: 276 seconds]
19:02
langlands has quit [Ping timeout: 276 seconds]
19:03
alestuber has joined #ruby-lang
19:04
zendrix has quit [Remote host closed the connection]
19:05
gwendall_ has joined #ruby-lang
19:05
robbyoconnor has quit [Quit: Konversation terminated!]
19:06
chinmay_dd has joined #ruby-lang
19:07
allomov has joined #ruby-lang
19:07
gwendal__ has joined #ruby-lang
19:07
gwendall_ has quit [Read error: No route to host]
19:07
gwendall has quit [Read error: No route to host]
19:09
sandelius has joined #ruby-lang
19:12
havenwood has joined #ruby-lang
19:14
benlovell has joined #ruby-lang
19:16
momomomomo has quit [Quit: momomomomo]
19:16
elia has quit [Quit: Computer has gone to sleep.]
19:17
marr has joined #ruby-lang
19:20
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:24
alestuber has quit [Ping timeout: 252 seconds]
19:28
banister has joined #ruby-lang
19:28
banister has quit [Max SendQ exceeded]
19:29
zendrix has joined #ruby-lang
19:30
wallerdev has quit [Quit: wallerdev]
19:31
myork80 has joined #ruby-lang
19:32
tibig has quit [Read error: Connection reset by peer]
19:32
alestuber has joined #ruby-lang
19:32
tibig has joined #ruby-lang
19:34
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
19:34
sandelius has joined #ruby-lang
19:36
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
19:38
joaomdmoura has quit [Remote host closed the connection]
19:39
baweaver has joined #ruby-lang
19:40
wallerdev has joined #ruby-lang
19:42
banister has joined #ruby-lang
19:43
benlovell has quit [Ping timeout: 252 seconds]
19:47
tenderlove has quit [Ping timeout: 265 seconds]
19:49
chinmay_dd has quit []
19:49
fastsyrup has joined #ruby-lang
19:49
<
fastsyrup >
hi guys
19:49
dfockler has quit [Remote host closed the connection]
19:50
<
fastsyrup >
short question about syntax
19:50
<
fastsyrup >
def has_chosen?(option) self.choices.include?(option) end
19:50
<
fastsyrup >
now choices is nil
19:50
fusillicode has joined #ruby-lang
19:50
<
fastsyrup >
how do I stylishly check choices and only then call choices.include?
19:57
ryba has joined #ruby-lang
19:57
ryba is now known as simi
19:58
Musashi007 has joined #ruby-lang
19:59
tenderlove has joined #ruby-lang
19:59
fastsyrup has quit [Ping timeout: 246 seconds]
20:00
bruno- has quit [Ping timeout: 265 seconds]
20:00
scottschecter has joined #ruby-lang
20:01
joaomdmoura has joined #ruby-lang
20:01
chussenot has quit [Quit: chussenot]
20:01
anjen has quit [Quit: anjen]
20:05
dzejrou has quit [Read error: Connection reset by peer]
20:07
__butch__ has joined #ruby-lang
20:07
__butch__ has quit [Remote host closed the connection]
20:08
myork80 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
20:09
joaomdmoura has quit []
20:09
Guest98 has joined #ruby-lang
20:10
Guest98 has quit [Remote host closed the connection]
20:12
joaomdmoura has joined #ruby-lang
20:12
wallerdev has quit [Quit: wallerdev]
20:15
seank_ has quit [Remote host closed the connection]
20:15
b_hoffman has joined #ruby-lang
20:15
seank_ has joined #ruby-lang
20:16
drewo has quit [Read error: Connection reset by peer]
20:19
kadoppe has quit [Ping timeout: 252 seconds]
20:21
zendrix has quit [Remote host closed the connection]
20:21
kadoppe has joined #ruby-lang
20:24
zendrix has joined #ruby-lang
20:24
jgpawletko has quit [Quit: jgpawletko]
20:24
jgpawletko has joined #ruby-lang
20:25
t_ has joined #ruby-lang
20:27
caseypatrickdris has joined #ruby-lang
20:28
hinbody has quit [Ping timeout: 250 seconds]
20:30
RobertBirnie has joined #ruby-lang
20:32
_ht has quit [Quit: Konversation terminated!]
20:34
caseypat_ has joined #ruby-lang
20:34
caseypatrickdris has quit [Read error: Connection reset by peer]
20:35
chussenot has joined #ruby-lang
20:40
__butch__ has joined #ruby-lang
20:42
caseypat_ has quit [Ping timeout: 265 seconds]
20:43
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
20:46
gambl0re has quit [Ping timeout: 258 seconds]
20:48
wallerdev has joined #ruby-lang
20:49
chadwtaylor has quit [Quit: Leaving...]
20:49
myork80 has joined #ruby-lang
20:49
myork80 has quit [Client Quit]
20:49
allomov has quit [Remote host closed the connection]
20:51
elia has joined #ruby-lang
20:51
micmus has quit [Ping timeout: 252 seconds]
20:56
djbkd has quit [Remote host closed the connection]
21:01
drewo has joined #ruby-lang
21:04
stardiviner has joined #ruby-lang
21:04
zendrix has quit [Remote host closed the connection]
21:04
micmus has joined #ruby-lang
21:07
djbkd has joined #ruby-lang
21:08
djbkd has quit [Read error: Connection reset by peer]
21:08
ur5us has joined #ruby-lang
21:08
ur5us has quit [Remote host closed the connection]
21:09
ur5us has joined #ruby-lang
21:09
chungshirley has joined #ruby-lang
21:09
djbkd has joined #ruby-lang
21:09
chungshirley has quit [Client Quit]
21:10
ledestin has joined #ruby-lang
21:10
duderonomy has joined #ruby-lang
21:13
mberk has joined #ruby-lang
21:13
mberk has quit [Remote host closed the connection]
21:14
ldnunes has quit [Quit: Leaving]
21:17
zendrix has joined #ruby-lang
21:22
dfockler has joined #ruby-lang
21:29
phizzbuzz has quit [Ping timeout: 252 seconds]
21:33
bruno- has joined #ruby-lang
21:35
jgpawletko has quit [Quit: jgpawletko]
21:36
gamename has quit [Remote host closed the connection]
21:36
gamename has joined #ruby-lang
21:36
gwendal__ has quit [Remote host closed the connection]
21:38
gambl0re has joined #ruby-lang
21:40
micmus has quit [Quit: Leaving]
21:43
joaomdmoura has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
21:44
gamename has quit [Ping timeout: 264 seconds]
21:44
Musashi007 has quit [Quit: Musashi007]
21:44
alestuber has quit [Ping timeout: 255 seconds]
21:45
tubbo has quit [Ping timeout: 250 seconds]
21:48
alestuber has joined #ruby-lang
21:50
tubbo has joined #ruby-lang
21:51
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
21:51
centrx has joined #ruby-lang
21:52
workmad3 has joined #ruby-lang
21:53
alestuber has quit [Ping timeout: 244 seconds]
21:53
Musashi007 has joined #ruby-lang
21:53
egypt has left #ruby-lang [#ruby-lang]
21:56
alestuber has joined #ruby-lang
21:56
jgpawletko has joined #ruby-lang
21:56
bantic has quit [Quit: bantic]
21:57
workmad3 has quit [Ping timeout: 272 seconds]
21:57
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
21:57
zendrix has quit [Remote host closed the connection]
21:58
skade has joined #ruby-lang
21:59
caseypatrickdris has joined #ruby-lang
21:59
jgpawletko has quit [Client Quit]
21:59
tubbo has quit [Ping timeout: 276 seconds]
22:00
alestuber has quit [Read error: Connection reset by peer]
22:01
zendrix has joined #ruby-lang
22:02
elia has quit [Quit: Computer has gone to sleep.]
22:04
alestuber has joined #ruby-lang
22:06
workmad3 has joined #ruby-lang
22:13
solars has quit [Ping timeout: 255 seconds]
22:15
hinbody has joined #ruby-lang
22:16
alestuber has quit [Remote host closed the connection]
22:17
elia has joined #ruby-lang
22:17
enebo has quit [Quit: enebo]
22:18
Ox0dea has joined #ruby-lang
22:19
Ox0dea has left #ruby-lang [#ruby-lang]
22:20
hinbody has quit [Client Quit]
22:21
wallerdev has quit [Quit: wallerdev]
22:21
enebo has joined #ruby-lang
22:22
zendrix has quit [Remote host closed the connection]
22:22
j4cknewt has quit [Remote host closed the connection]
22:24
zendrix has joined #ruby-lang
22:25
postmodern has quit [Quit: Leaving]
22:25
Mon_Ouie has joined #ruby-lang
22:26
imperator has quit [Quit: Leaving]
22:28
imperator2 has quit [Quit: Valete!]
22:28
mikecmpbll has quit [Quit: i've nodded off.]
22:29
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
22:30
enebo has quit [Quit: enebo]
22:32
baweaver has quit [Remote host closed the connection]
22:33
arBmind1 has quit [Ping timeout: 264 seconds]
22:35
tibig has quit [Ping timeout: 256 seconds]
22:35
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
22:37
arBmind has joined #ruby-lang
22:38
GPrime has joined #ruby-lang
22:39
baweaver has joined #ruby-lang
22:39
Mon_Ouie has quit [Read error: Connection reset by peer]
22:40
Mon_Ouie has joined #ruby-lang
22:41
Musashi007 has quit [Quit: Musashi007]
22:43
Mon_Ouie has quit [Client Quit]
22:45
Mon_Ouie has joined #ruby-lang
22:45
wallerdev has joined #ruby-lang
22:45
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
22:46
gwendall has joined #ruby-lang
22:48
gwendall has quit [Remote host closed the connection]
22:48
nofxx has quit [Ping timeout: 256 seconds]
22:51
Musashi007 has joined #ruby-lang
22:53
skade has quit [Quit: Computer has gone to sleep.]
22:53
matp has quit [Excess Flood]
22:57
whippythellama has quit [Quit: whippythellama]
22:58
whippythellama has joined #ruby-lang
23:00
arBmind has quit [Quit: Leaving.]
23:01
workmad3 has quit [Ping timeout: 240 seconds]
23:01
matp has joined #ruby-lang
23:02
duderonomy has quit [Ping timeout: 256 seconds]
23:02
Musashi007 has quit [Quit: Musashi007]
23:03
nofxx has joined #ruby-lang
23:03
nofxx has quit [Changing host]
23:03
nofxx has joined #ruby-lang
23:06
whippythellama has quit [Quit: whippythellama]
23:07
workmad3 has joined #ruby-lang
23:09
b_hoffman has quit [Quit: b_hoffman]
23:10
gwendall has joined #ruby-lang
23:10
Musashi007 has joined #ruby-lang
23:13
gwendall has quit [Remote host closed the connection]
23:14
atomical has joined #ruby-lang
23:15
Ropeney has joined #ruby-lang
23:16
workmad3 has quit [Ping timeout: 264 seconds]
23:17
b_hoffman has joined #ruby-lang
23:17
Musashi007 has quit [Ping timeout: 272 seconds]
23:17
premera has quit [Ping timeout: 272 seconds]
23:17
gamename has joined #ruby-lang
23:18
premera has joined #ruby-lang
23:23
gamename has quit [Remote host closed the connection]
23:27
centrx has quit [Quit: Shutting down, Please wait...]
23:29
hahuang65 has quit [Ping timeout: 255 seconds]
23:35
wallerdev has quit [Ping timeout: 265 seconds]
23:37
__butch__ has quit [Quit: Leaving.]
23:39
<
xybre >
That shouldn't make `choices` nil, so some other code must be interfering.
23:39
djbkd has quit [Remote host closed the connection]
23:39
<
xybre >
Unless you mean choices is just sometimes nil.
23:39
iamse7en has joined #ruby-lang
23:40
<
jhass >
uh, they left like 3 hours ago
23:41
Musashi007 has joined #ruby-lang
23:42
baweaver has quit [Remote host closed the connection]
23:43
djbkd has joined #ruby-lang
23:44
djbkd has quit [Remote host closed the connection]
23:44
elia has quit [Read error: Connection reset by peer]
23:44
djbkd has joined #ruby-lang
23:45
elia has joined #ruby-lang
23:45
<
womble >
IRC is very laggy today.
23:46
<
xybre >
I kidna wish Weechat's "smart" join/part hiding was smarter.
23:46
<
xybre >
Also I should probably set it up to display times in my time zone instead of the timezone of the server I run it on.
23:48
GPrime has joined #ruby-lang
23:48
<
jhass >
xybre: set it to 10 minutes, much better IME
23:48
<
jhass >
oh, I have it on 15 actually
23:48
chussenot has quit [Quit: chussenot]
23:50
<
xybre >
Sure, it just seems silly that it would hide the part message from the last person who spoke though
23:50
<
xybre >
Even though it'd been 3 hours
23:51
<
jhass >
they quit after 9 minutes
23:51
t_ has quit [Read error: Connection reset by peer]
23:54
t_ has joined #ruby-lang
23:58
duderonomy has joined #ruby-lang
23:58
RobertBirnie has quit [Ping timeout: 256 seconds]
23:59
dfockler has quit [Remote host closed the connection]