This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - sammyMaX
16
« on: May 14, 2013, 05:59:36 pm »
darn my code is waayyy longer than Jim Bauwens's and Xeda's... My submission was in Nspire basic, and it had two helper functions along with the main palprime function. The main function generates palindromes and gives them to the prime tester. The prime tester uses the Miller-Rabin algorithm, which requires modular exponentiation, so there is also a modular exponentiation function. My code for each: exprem (Modular Exponentiation)primetest (Miller-Rabin Test)palprime (Palindrome Generator and Main Function)It takes around 2 seconds to calculate the 100th palprime, 6 seconds for the 250th palprime, 16 seconds for the 500th palprime, and 39 seconds for the 1000th palprime. The times were taken from an emulated Nspire CX running OS 3.1.0, at 100% emulation (normal speed).
17
« on: May 12, 2013, 07:40:44 pm »
The contest ended and we are allowed post code/discuss now, right?
18
« on: May 02, 2013, 04:42:05 pm »
I'll be taking chemistry, computer science, and US history.
Apparently someone in my school got a perfect score in computer science last year (not just a 5, he got full points on every question) and it was a pretty big deal.
19
« on: April 20, 2013, 12:36:25 pm »
I know that the video was just a render and that the OS shown in it wasn't final, but the exponents look really ugly The font used on them is too large and they are wayyy above the base of the exponent. Sometimes, they don't even line up with the base of the exponent. Look at 1:01 to see what I mean. On the bottom row (to the right of the 6) "15x 4+" looks like "15x+ 4".
20
« on: April 11, 2013, 05:08:24 pm »
Okay, I agree with having official numbers to get timings.
21
« on: April 11, 2013, 04:56:22 pm »
I really don't think such checkpoints should be allowed. It wouldn't contribute anything to the algorithmic thinking the competition is supposed to promote. Suppose checkpoints were allowed. Competitors would need to use them to keep up with other programs that use checkpoints, so all the good entries have them.
If, like Dapianokid said, people could only store the 10th, 50th, and 100th palindromic primes, then all the programs would still start testing with the same number (say if we wanted the 74th prime palindrome, everyone would start with the 50th one), so the winner would be the person with the most efficient algorithm. That person still would have won if they started testing numbers from the beginning, so why not just start testing numbers from the beginning? It makes the programs simpler, smaller, and more "pure" anyways.
Meanwhile, if people could store whatever palindromic primes they wanted, the winner would be either: a) lucky that he/she happened to store the palindromic primes just below the numbers wanted b) someone who precomputed a huge number of palindromic primes And both a) and b) imply that the efficiency of the actual algorithm used to search for palindromic primes is not important, which is bad.
22
« on: April 07, 2013, 06:53:17 pm »
Ah, I see. The computer software is not an exact emulator then, and it runs faster?
I made my program in the Nspire emulator. Is there any way to extract the TNS file from the emulator? Right now, there is only a saved flash image.
23
« on: April 07, 2013, 04:27:41 pm »
What do the rows mean? Are the upper rows the times for earlier versions of the program, and the lower rows the times for later versions? Edit: now that I think about it, that wouldn't make sense. What do the rows mean?
24
« on: April 07, 2013, 10:08:44 am »
You should specify, Nspire programs have to be in Basic (I only saw this when I went to the complete rules page)
25
« on: November 26, 2012, 04:20:20 pm »
I tried compiling GMP using the libndls and -nostdlib but libndls doesn't have all the functions GMP needs. It asks for a strnlen, but libndls doesn't include one. Is there any easy way to add that to the Ndless library?
EDIT: I tried making my own strnlen.c and put it in the libndls source folder and compiled it to get a new .a library. I also updated the libndls.h to include the function, but when I compile GMP, it gives me the same error. I have a feeling that it isn't detecting the new function. Any suggestions?
26
« on: November 24, 2012, 10:34:42 am »
The problem with using -nostdlib is that some library is supplying code for the basic functions like malloc and realloc, so with -nostdlib, I get huge amounts of errors about undefined references to functions:
nspire-ld hello.o -o helloworld.elf -L /home/philip/gmp/prefix/lib -lgmp -nostdlib /home/philip/gmp/prefix/lib/libgmp.a(memory.o): In function `__gmp_default_free': memory.c:(.text+0x4): undefined reference to `free' /home/philip/gmp/prefix/lib/libgmp.a(memory.o): In function `__gmp_default_reallocate': memory.c:(.text+0x20): undefined reference to `realloc' memory.c:(.text+0x4c): undefined reference to `fprintf' memory.c:(.text+0x50): undefined reference to `abort' memory.c:(.text+0x54): undefined reference to `_impure_ptr' /home/philip/gmp/prefix/lib/libgmp.a(memory.o): In function `__gmp_default_allocate': memory.c:(.text+0x64): undefined reference to `malloc' memory.c:(.text+0x8c): undefined reference to `fprintf' memory.c:(.text+0x90): undefined reference to `abort' memory.c:(.text+0x94): undefined reference to `_impure_ptr' /home/philip/NdlessSDK/ndless/bin/../lib/libndls.a(touchpad.o): In function `touchpad_scan': touchpad.c:(.text+0x18c): undefined reference to `__aeabi_idiv' touchpad.c:(.text+0x1a8): undefined reference to `__aeabi_idiv' touchpad.c:(.text+0x1c4): undefined reference to `__aeabi_idiv' touchpad.c:(.text+0x1e0): undefined reference to `__aeabi_idiv' touchpad.c:(.text+0x1fc): undefined reference to `__aeabi_idiv' /home/philip/NdlessSDK/ndless/bin/../lib/libndls.a(touchpad.o):touchpad.c:(.text+0x214): more undefined references to `__aeabi_idiv' follow collect2: error: ld returned 1 exit status make: *** [helloworld.tns] Error 1 I looked online and they said I needed to link libgcc.a and everything would work. Is that true? I looked in the Ndless syscalls.h and it seemed to me like those functions could be found in there too.
27
« on: November 23, 2012, 02:24:03 pm »
You don't really have to worry about the PSU, bigger is better, but the 450W is fine. Scroll to the bottom of http://www.anandtech.com/bench/Product/680 to see the total power consumption of a computer with your graphics card and a similar processor. It's really not that high at all. I just look for reliable, modular, efficient PSU's, and the Rosewill is a good PSU.
28
« on: November 21, 2012, 06:42:28 pm »
After ~half a year, I'm back I'm trying to port GMP to the Nspire again. I think the library will work fine, but I'm having some problems with newlib, which is supplying its own syscalls that interfere with the ones included with Ndless. Here are the compiler errors: nspire-ld hello.o -o helloworld.elf -L /home/philip/gmp/prefix/lib -lgmp /home/philip/toolchain/lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib/libc.a(lib_a-syscalls.o): In function `_exit': /home/philip/toolchain/build/arm-none-eabi/newlib/libc/sys/arm/../../../../../../newlib-1.20.0/newlib/libc/sys/arm/syscalls.c:459: multiple definition of `_exit' /home/philip/NdlessSDK/ndless/bin/../system/osstub.o:osstub.c:(.text+0x88): first defined here /home/philip/toolchain/lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib/libc.a(lib_a-syscalls.o): In function `_sbrk': syscalls.c:(.text+0x6a8): undefined reference to `end' collect2: error: ld returned 1 exit status make: *** [helloworld.tns] Error 1 Are there any compiler flags to disable the newlib syscalls? And what is the cause of the second error? And by the way, I never knew the toolchain was so big!! 1.3 GB?
29
« on: November 21, 2012, 06:29:40 pm »
Yeah in fact you can't overclock with that motherboard (H77 cannot overclock) so either get a better motherboard (Z77 can overclock) or get a non-K processor.
Edit: I just saw the above post and I'm pretty sure you can't overclock. Edit 2: I looked it up and it can overclock. Oops.
30
« on: May 17, 2012, 04:14:58 pm »
Was the icon problem present before?
Edit: compu, I think you meany /documents/ndless/phoenix.raw.zip.tns, right? Edit 2: It works! And the logo problem isn't that bad (I thought you meant the catalog and the math functions were going to be screwed up too!)
|