These are chat archives for gwydirsam/DickGrayson

17th
Apr 2015
Sam Gwydir
@gwydirsam
Apr 17 2015 00:45
to verify
@ralphie9224 yeah if you committed...just git push
@bluyam use openssl just to verify key stuff
@ralphie9224 did you commit the changes?
Rafael Moreno
@ralphie9224
Apr 17 2015 00:48
on it
done
Kyle Wilson
@bluyam
Apr 17 2015 00:49
Hng ok
Sam Gwydir
@gwydirsam
Apr 17 2015 00:57
@bluyam what part of OpenSSL di dyou want?
did*
Kyle Wilson
@bluyam
Apr 17 2015 00:58
So there's an MD5 function that it uses to convert a file to a hash value (unsigned char int)
Or use a similar formula
Sam Gwydir
@gwydirsam
Apr 17 2015 01:00
Check piazza, I think they said you have to use your own function
Kyle Wilson
@bluyam
Apr 17 2015 01:24
Sweet richey said its fine
So I just need to write the test cases/script now
Sam Gwydir
@gwydirsam
Apr 17 2015 01:25
so you're using openssl as a library?
Kyle Wilson
@bluyam
Apr 17 2015 01:25
Just the md5 function but yeah
Sam Gwydir
@gwydirsam
Apr 17 2015 01:25
okay what do I need to link?
Kyle Wilson
@bluyam
Apr 17 2015 01:28
Like openssl/md5.h and nothing else
Sam Gwydir
@gwydirsam
Apr 17 2015 01:28
aight
Sam Gwydir
@gwydirsam
Apr 17 2015 01:46
@ralphie9224 hey go edit ~/.gitconfig.user and put in your name -- you're commiting as FirstName LastName right now haha
Rafael Moreno
@ralphie9224
Apr 17 2015 01:47
does it work if I do the 'git config --global user.name'
?
Sam Gwydir
@gwydirsam
Apr 17 2015 01:47
yeah, but since you used by stuff it's probably overriding with the stuff in .gitconfig.user
if you did the global stuff you can probably rm ~/.gitconfig.user
Rafael Moreno
@ralphie9224
Apr 17 2015 01:48
in what file?
Sam Gwydir
@gwydirsam
Apr 17 2015 01:50
what in what file
Rafael Moreno
@ralphie9224
Apr 17 2015 01:50
where is the gitconfiguser.
Sam Gwydir
@gwydirsam
Apr 17 2015 01:50
just fill out ~/.gitconfig.user
that's where it is
~ means home
Rafael Moreno
@ralphie9224
Apr 17 2015 01:50
i thought it meant my build home
Sam Gwydir
@gwydirsam
Apr 17 2015 01:51
just copy and paste vim $HOME/.gitconfig.user
wherever you commit from
Rafael Moreno
@ralphie9224
Apr 17 2015 01:51
oooooooooo
Sam Gwydir
@gwydirsam
Apr 17 2015 01:52
$(echo ~) == $(echo $HOME)
on os x it's /Users/username on linux it's usualy /home/username
Rafael Moreno
@ralphie9224
Apr 17 2015 02:20
yea i'm still trying to figure out why it's specifically 3
Sam Gwydir
@gwydirsam
Apr 17 2015 02:20
looks like you're pretty close though: you got 6 instead of 3
well in 2 bits the only possible prime is 3 yeah?
10
sorry 11
Rafael Moreno
@ralphie9224
Apr 17 2015 02:21
yea I get that. I meant i'm trying to figure out why it only fails when passing in the number 3.
even if I do if(value == 3) return true; it still fails
which sucks, considering the value passed in will never be that low
also, I realize that the co prime gcd function might not be in the best spot.
you shouldn't have linked me to travis. This whole time I thought you built it.
Sam Gwydir
@gwydirsam
Apr 17 2015 02:28
may need to do some research on gmp
I don't know
Sam Gwydir
@gwydirsam
Apr 17 2015 02:40
@ralphie9224 I figured it out
@ralphie9224 we create a prime with 3 bits...not 2
```cpp
TEST(DGCryptoPrime, isPrime3) {
  // create a prime with 2 bits
  dgrprime tree(3);
even the comment is right haha
Rafael Moreno
@ralphie9224
Apr 17 2015 02:44
so the code is right?:D
there r no emoji's here..
Sam Gwydir
@gwydirsam
Apr 17 2015 02:45
there are :smile:
Rafael Moreno
@ralphie9224
Apr 17 2015 02:46
I'll find them. but I digress. so we just need to pass in the 2 instead of 3 to the test?
Sam Gwydir
@gwydirsam
Apr 17 2015 02:46
yeah
that particular one is supposed to restrict the available primes to just 3
because 1 isn't prime
I guess 2 is...
well damn
haha
Rafael Moreno
@ralphie9224
Apr 17 2015 02:50
damn. still fails
Sam Gwydir
@gwydirsam
Apr 17 2015 02:51
well there is some good news, at least your name shows up now haha
Rafael Moreno
@ralphie9224
Apr 17 2015 02:51

`Value of: tree.value()
Actual: 3
Expected: 2u
Which is: 2
Value : 2[ FAILED ] DGCryptoPrime.isPrime2 (0 ms)
[ RUN ] DGCryptoPrime.isPrime11
Value : 11[ OK ] DGCryptoPrime.isPrime11 (0 ms)
[ RUN ] DGCryptoPrime.isPrime59
Value : 59[ OK ] DGCryptoPrime.isPrime59 (0 ms)
[ RUN ] DGCryptoPrime.isPrime15484517
Value : 15484517[ OK ] DGCryptoPrime.isPrime15484517 (0 ms)
[----------] 8 tests from DGCryptoPrime (5 ms total)

[----------] Global test environment tear-down
[==========] 8 tests from 1 test case ran. (5 ms total)
[ PASSED ] 7 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] DGCryptoPrime.isPrime2
`

damnit. i messed up.
and that is good news

```Value of: tree.value()
Actual: 3
Expected: 2u
Which is: 2
Value : 2[ FAILED ] DGCryptoPrime.isPrime2 (0 ms)
[ RUN ] DGCryptoPrime.isPrime11
Value : 11[ OK ] DGCryptoPrime.isPrime11 (0 ms)
[ RUN ] DGCryptoPrime.isPrime59
Value : 59[ OK ] DGCryptoPrime.isPrime59 (0 ms)
[ RUN ] DGCryptoPrime.isPrime15484517
Value : 15484517[ OK ] DGCryptoPrime.isPrime15484517 (0 ms)
[----------] 8 tests from DGCryptoPrime (5 ms total)

[----------] Global test environment tear-down
[==========] 8 tests from 1 test case ran. (5 ms total)
[ PASSED ] 7 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] DGCryptoPrime.isPrime2
```

Sam Gwydir
@gwydirsam
Apr 17 2015 02:52
you were only supposed to change dgrprime(3) to dgrprime(2)
everything else should be 3
Rafael Moreno
@ralphie9224
Apr 17 2015 02:52
i'll fix
unless you're looking at it
Sam Gwydir
@gwydirsam
Apr 17 2015 02:53
I'm looking at it, but you change it
Rafael Moreno
@ralphie9224
Apr 17 2015 02:53
ok
Sam Gwydir
@gwydirsam
Apr 17 2015 02:53
im in my coverage branch
so close it hurts
Rafael Moreno
@ralphie9224
Apr 17 2015 02:54
by everything else do you mean the EXPECT_EQ(3u, tree.value());
and
EXPECT_TRUE(dgrprime::is_prime(2_mpz));
Sam Gwydir
@gwydirsam
Apr 17 2015 02:54
is_prime should still be 3
the test is about 3
Rafael Moreno
@ralphie9224
Apr 17 2015 02:55
ok. made the change. testing
Sam Gwydir
@gwydirsam
Apr 17 2015 02:55
though maybe EXPECT_EQ should change because it can be 3 or 2
there are two two-bit primes
Rafael Moreno
@ralphie9224
Apr 17 2015 02:57
dgrprime tree(2);
EXPECT_EQ(2u, tree.value());
EXPECT_TRUE(dgrprime::is_prime(3_mpz));
what I rolled with
stupid 3. still not working
I'm just going to roll into a ball and cry
Sam Gwydir
@gwydirsam
Apr 17 2015 03:00
always a solid choice
Rafael Moreno
@ralphie9224
Apr 17 2015 03:01
the fact that 4 and 8 are passing means that they are returning false correct?
Sam Gwydir
@gwydirsam
Apr 17 2015 03:02
no 4 and 8 are just checking if it has stored the correct number of bits
it's basically just checking the constructor in a super simple way
Rafael Moreno
@ralphie9224
Apr 17 2015 03:03
wait.....
what is this test doing? just checking for bits?
Sam Gwydir
@gwydirsam
Apr 17 2015 03:03
Prime2b,4b,8b are misleadingly named
they should be check bits
or something
Prime16b is a bad test in general
I must have been on drugs when we did these
Rafael Moreno
@ralphie9224
Apr 17 2015 03:04
so we don't actually know wether the isPrime() works yet
Faith in the code will make it work
hahahaha it was pre chipotle code
Sam Gwydir
@gwydirsam
Apr 17 2015 03:05
TEST(DGCryptoPrime, Prime16b) {
  EXPECT_TRUE(dgrprime::is_prime(15484517_mpz));
  // create a prime with 2 bits
  dgrprime sixteen(16);

  EXPECT_EQ(16u, sixteen.bits());

  EXPECT_GT(65535, dgrprime::is_prime(sixteen.value()));
}
that one is not good
the others above it just need to be renamed
TEST(DGCryptoPrime, isPrime2) {
  EXPECT_TRUE(dgrprime::is_prime(2_mpz));
}
tjat
that's what isPrime2 should be
then add another like it, called isPrime3
Rafael Moreno
@ralphie9224
Apr 17 2015 03:08
just to be clear. we don't currently have a isPrime2 right?
Rafael Moreno
@ralphie9224
Apr 17 2015 03:10
That's when I thought I needed to change 3 to 2
so it's back to 3 everything there
Sam Gwydir
@gwydirsam
Apr 17 2015 03:11
oh well same thing anyway, you want what I said above for 2 and 3 as seperate tests
since they're both prime
Rafael Moreno
@ralphie9224
Apr 17 2015 03:11
TEST(DGCryptoPrime, isPrime3) {
  // create a prime with 2 bits
  dgrprime tree(2);

  EXPECT_EQ(2u, tree.value());

  EXPECT_TRUE(dgrprime::is_prime(3_mpz));
}
that's what is there now. and ok. I gotcha
Sam Gwydir
@gwydirsam
Apr 17 2015 03:12
TEST(DGCryptoPrime, isPrime3) {
 EXPECT_TRUE(dgrprime::is_prime(3_mpz));
}
it should be that
Rafael Moreno
@ralphie9224
Apr 17 2015 03:12
one like that for isPrime3, and another for isPrime2?
Sam Gwydir
@gwydirsam
Apr 17 2015 03:13
yes mam
Rafael Moreno
@ralphie9224
Apr 17 2015 03:13
TEST(DGCryptoPrime, isPrime2) {
  EXPECT_TRUE(dgprime::is_prime(2_mpz));
}

TEST(DGCryptoPrime, isPrime3) {
  // create a prime with 2 bits
  EXPECT_TRUE(dgrprime::is_prime(3_mpz));
}
that's what I gots
and currently testing
Sam Gwydir
@gwydirsam
Apr 17 2015 03:14
kill that comment because it's no longer correct
but yeah
Rafael Moreno
@ralphie9224
Apr 17 2015 03:16
Running main() from gtest_main.cc
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from GNUMPLibTest
[ RUN      ] GNUMPLibTest.modulo
[       OK ] GNUMPLibTest.modulo (1 ms)
[----------] 1 test from GNUMPLibTest (1 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (1 ms total)
[  PASSED  ] 1 test.
pretend that says 9 correct tests
cus I copy pasted the wrong one
but yes. I passed
Sam Gwydir
@gwydirsam
Apr 17 2015 03:18
haha
Rafael Moreno
@ralphie9224
Apr 17 2015 03:18
pushin
Sam Gwydir
@gwydirsam
Apr 17 2015 03:18
it isn't true till you push my friend
there you go
Rafael Moreno
@ralphie9224
Apr 17 2015 03:19
pushed
pushed it real good
watch there
haha
Rafael Moreno
@ralphie9224
Apr 17 2015 03:25
I don't like what's going on
Sam Gwydir
@gwydirsam
Apr 17 2015 03:25
yours just started
Rafael Moreno
@ralphie9224
Apr 17 2015 03:25
o wait. no. i see check marks
yea yea
Sam Gwydir
@gwydirsam
Apr 17 2015 03:25
not on yours yet haha
it's the finaaaal cooountdown
all green
Rafael Moreno
@ralphie9224
Apr 17 2015 03:27
high fives all around!
high five*
Sam Gwydir
@gwydirsam
Apr 17 2015 03:27
though
are you couting somewhere?
Value : 15484517Value : 55414[       OK ] DGCryptoPrime.Prime16b (0 ms)
[ RUN      ] DGCryptoPrime.isPrime2
Value : 2[       OK ] DGCryptoPrime.isPrime2 (0 ms)
[ RUN      ] DGCryptoPrime.isPrime3
Value : 3[       OK ] DGCryptoPrime.isPrime3 (0 ms)
[ RUN      ] DGCryptoPrime.isPrime11
Value : 11[       OK ] DGCryptoPrime.isPrime11 (0 ms)
[ RUN      ] DGCryptoPrime.isPrime59
Value : 59[       OK ] DGCryptoPrime.isPrime59 (0 ms)
[ RUN      ] DGCryptoPrime.isPrime15484517
Value : 15484517[       OK ] DGCryptoPrime.isPrime15484517 (0 ms)
Rafael Moreno
@ralphie9224
Apr 17 2015 03:27
o yea. I can take that off
Sam Gwydir
@gwydirsam
Apr 17 2015 03:28
yeah
just comment it for now
we need some false tests
but you're good for now
Rafael Moreno
@ralphie9224
Apr 17 2015 03:29
ok. i deleted....
oops
Sam Gwydir
@gwydirsam
Apr 17 2015 03:29
its fine
Rafael Moreno
@ralphie9224
Apr 17 2015 03:30
it's pushed though
ok. i'm about to clock out. I started working on the encryption. I've basically got it down mentally. just need to figure out how to work it into the code structure we got
but we can do that tomorrow or monday
Sam Gwydir
@gwydirsam
Apr 17 2015 03:34
in other news coverage is working!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Kyle Wilson
@bluyam
Apr 17 2015 03:37
Coool
it's beautiful
and I'm out!
tumblr_mu8aujdLE01rpu9leo1_500.gif
Rafael Moreno
@ralphie9224
Apr 17 2015 03:43
thanks saaaaam
Kyle Wilson
@bluyam
Apr 17 2015 03:56
Sam do you have about 15 minutes free tomorrow before the meeting (not immediately before just sometime before) to help me understand test cases and push/pull on non master branches
Bc that would be rly great
Sam Gwydir
@gwydirsam
Apr 17 2015 15:45
@bluyam yeah hit me up whenever
@bluyam I'm basically free til then
Kyle Wilson
@bluyam
Apr 17 2015 18:02
Ok cool
Sam Gwydir
@gwydirsam
Apr 17 2015 18:25
ready when you are
Kyle Wilson
@bluyam
Apr 17 2015 18:48
Heading to reed Mac
Sam Gwydir
@gwydirsam
Apr 17 2015 18:48
ok
Wait are we meeting in real life?
Christopher Findeisen
@Atrus7
Apr 17 2015 18:48
@ralphie9224
Sam Gwydir
@gwydirsam
Apr 17 2015 18:48
@Atrus7 are we meeting in real life?
Christopher Findeisen
@Atrus7
Apr 17 2015 18:49
is_prime seems to have an issue. I'm getting errors around it
Kyle Wilson
@bluyam
Apr 17 2015 18:58
Sam can we meet at pi r 2 so I can get food?
Sam Gwydir
@gwydirsam
Apr 17 2015 18:58
I'm not sure if we're even meeting in real life at all
Kyle Wilson
@bluyam
Apr 17 2015 18:59
Oh noes
Well that's ok, I can skype u in a few
Sam Gwydir
@gwydirsam
Apr 17 2015 19:00
yeah
Kyle Wilson
@bluyam
Apr 17 2015 19:09
Sam r u getting my calls
If not can u call me pls
Sam Gwydir
@gwydirsam
Apr 17 2015 19:10
need to start skype
give me a sec though
Kyle Wilson
@bluyam
Apr 17 2015 19:12
Kk
Rafael Moreno
@ralphie9224
Apr 17 2015 19:40
I'm in reed macdonald lab A
Sam Gwydir
@gwydirsam
Apr 17 2015 19:40
ok @Towerism @Atrus7 what's your plan?
Rafael Moreno
@ralphie9224
Apr 17 2015 19:40
@Atrus7 I'm not going to know what the error is until i know what you're trying to do
Christopher Findeisen
@Atrus7
Apr 17 2015 19:42
Rafa, you may want to test 589(a coprime) in your is_prime function.. for me it's returning true, which is wrong as it can be factored with 19, 31
Rafael Moreno
@ralphie9224
Apr 17 2015 19:45
ok. i'm testing that.
and from what i understand a single number can't be coprime. Not quite sure what you meant with that
Martin Fracker, Jr.
@Towerism
Apr 17 2015 19:50
I'm going to lab now. Which room?
Rafael Moreno
@ralphie9224
Apr 17 2015 19:50
I'm in A
Martin Fracker, Jr.
@Towerism
Apr 17 2015 19:51
Okay
Christopher Findeisen
@Atrus7
Apr 17 2015 20:10
Yo
Where are y'all?
Rafael Moreno
@ralphie9224
Apr 17 2015 20:11
lab A
Christopher Findeisen
@Atrus7
Apr 17 2015 20:11
We're doing Skype
Rafael Moreno
@ralphie9224
Apr 17 2015 20:11
ok. marty and I have to move to a not loud spot
Martin Fracker, Jr.
@Towerism
Apr 17 2015 20:15
call me
Sam Gwydir
@gwydirsam
Apr 17 2015 20:16
you were all static
Martin Fracker, Jr.
@Towerism
Apr 17 2015 20:17
oh that's my drivers
Sam Gwydir
@gwydirsam
Apr 17 2015 20:18
can you fix your issues?