General

Profile

chaitanyav (NagaChaitanya Vellanki)

Issues

open closed Total
Assigned issues 0 1 1
Reported issues 0 5 5

Activity

12/10/2015

04:26 PM Ruby Feature #11578: Add a method to check if a number is probably prime or composite (Patch included)
NagaChaitanya Vellanki wrote:
> Yui NARUSE wrote:
> ...
chaitanyav (NagaChaitanya Vellanki)
04:24 PM Ruby Feature #11578: Add a method to check if a number is probably prime or composite (Patch included)
Yui NARUSE wrote:
> Use OpenSSL::BN.
Rehearsal ---------------------------------------------------------------
Probably prime 11.990000 0.060000 12.050000 ( 12.054223)
OpenSSL::BN.prime_fasttest? 0.020000 0.000...
chaitanyav (NagaChaitanya Vellanki)

10/19/2015

09:46 PM Ruby Bug #11606 (Closed): Prime.prime? should throw error on invalid inputs
irb(main):003:0> Prime.prime?(1,3)
=> false
irb(main):004:0> Prime.prime?(1.3)
=> false
irb(main):005:0> Prime.prime?(20.3)
=> true
Prime.prime? converts floating point numbers to integer to determine if they are prime. A prime ...
chaitanyav (NagaChaitanya Vellanki)

10/09/2015

03:35 PM Ruby Feature #11578 (Rejected): Add a method to check if a number is probably prime or composite (Patch included)
Added a method to check if a given n is probably prime or composite using Miller- Rabin Test. This method is faster that the sieve method to check for an arbitrary n. Please review my pull request.
https://github.com/ruby/ruby/pull...
chaitanyav (NagaChaitanya Vellanki)

03/06/2014

12:18 AM Ruby Bug #9598 (Closed): Bug while installing a c-extensions gem
I was trying to install a c-extension gem, the installation failed on first attempt. But succeeded on the second attempt.This was right after installing the ruby-2.1.1
(ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]) on Manjar...
chaitanyav (NagaChaitanya Vellanki)

12/15/2011

12:28 PM Ruby Bug #5763: sprintf not throwing error for wrong number of arguments
Shyouhei Urabe wrote:
> > check for similar behaviour of sprintf in a c program
> ...
I encountered this issue today, i was missing a format specifier in my code and it took sometime to figure it out. It would be nice if there was a wa...
chaitanyav (NagaChaitanya Vellanki)
06:17 AM Ruby Bug #5763: sprintf not throwing error for wrong number of arguments
check for similar behaviour of sprintf in a c program
#include <stdio.h>
int main()
{
char buffer[50];
char *p = buffer;
sprintf(buffer, "%d", 1, 2, 3);
printf("%s", p);
return 0;
}
> gcc test_str.c
> ...
tes...
chaitanyav (NagaChaitanya Vellanki)
05:32 AM Ruby Bug #5763 (Closed): sprintf not throwing error for wrong number of arguments
sprintf should raise error when the number of arguments does not match the number of format specifiers
sprintf with correct number of format specifiers, arguments
>> sprintf('%s', 'hello')
=> "hello"
sprintf with a single format ...
chaitanyav (NagaChaitanya Vellanki)

09/01/2011

01:22 AM Ruby Bug #5252: Segmentation Fault
Actually the code is like this
begin
cloader_obj = CassandraLoader.new
cloader_obj.load_data1(settings_hash)
GC.start
rescue LoaderException
...
end

begin
cloader_obj = CassandraLoader.new
cloader_obj.load_dat...
chaitanyav (NagaChaitanya Vellanki)
01:12 AM Ruby Bug #5252: Segmentation Fault
I will let the developers know about this issue. For now, i have added GC.start after each of the methods inside the rake task which pull around 100K+ rows of data each. I am not getting segmentation fault anymore.
begin
cloader_obj...
chaitanyav (NagaChaitanya Vellanki)

Also available in: Atom