Author Topic: BigNumNum Cruncher  (Read 34353 times)

0 Members and 1 Guest are viewing this topic.

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: BigNumNum Cruncher
« Reply #45 on: February 29, 2012, 02:03:07 am »
Sorry for not maintaining Ncubate, there seems to be unfortunately too few users to be worth the effort...
Ndless.me with the finest TI-Nspire programs

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: BigNumNum Cruncher
« Reply #46 on: February 29, 2012, 07:32:24 am »
Among others, I use Ncubate ;)

For my information, how large is the diff between nspire_emu 0.32b and Ncubate 0.32b ? I don't have their sources handy to make the diff by myself.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Jonius7

  • python! Lua!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1918
  • Rating: +82/-18
  • Still bringing new dimensions to the TI-nspire...
    • View Profile
    • TI Stadium
Re: BigNumNum Cruncher
« Reply #47 on: February 29, 2012, 07:39:01 am »
Hmm I have both of those. And not really much difference, except Ncubate has the ability to save state, so it doesn't have to restart up the OS everytime.
And We are going off topic here, but good to you ExtendeD for informing us.
This Num Cruncher does look quite interesting.
« Last Edit: February 29, 2012, 07:40:38 am by Jonius7 »
Programmed some CASIO Basic in the past
DJ Omnimaga Music Discographist ;)
DJ Omnimaga Discography
My Own Music!
My Released Projects (Updated 2015/05/08)
TI-nspire BASIC
TI-nspire Hold 'em
Health Bar
Scissors Paper Rock
TI-nspire Lua
Numstrat
TI-nspire Hold 'em Lua
Transport Chooser
Secret Project (at v0.08.2 - 2015/05/08)
Spoiler For Extra To-Be-Sorted Clutter:

Spoiler For Relegated Projects:
TI-nspire BASIC
Battle of 16s (stalled) | sTIck RPG (stalled) | Monopoly (stalled) | Cosmic Legions (stalled)
Axe Parser
Doodle God (stalled while I go and learn some Axe)

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Re: BigNumNum Cruncher
« Reply #48 on: February 29, 2012, 04:35:01 pm »
Ncubate has been very useful for my debugging purposes, and the calc starts up instantly with it, a nice bonus :)
I don't really mind if you don't update it, ExtendeD, because updating a program to work on a new version of Ndless is quite trivial.

By the way, can any of you guys help me port GMP? I'm getting some errors where it can't find the functions: http://ourl.ca/15308/287327

Are you wondering who Sammy is? My avatar is Sammy.
   

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: BigNumNum Cruncher
« Reply #49 on: March 01, 2012, 11:08:22 am »
I looked at your code a bit and had some questions:
Do you really want to #include <string.h> and not #include "string.h"? Because like this you never include your own string.h.
And I couldn't find where you free() in1 and in2.

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Re: BigNumNum Cruncher
« Reply #50 on: March 01, 2012, 12:08:26 pm »
Yeah that was a pretty fail include I guess... it's outdated as well, now that os.h has all the string functions one would need.
As for in1 and in2, that was pretty fail as well, because if you press enter multiple times, the old instances of in1 and in2 would become inaccessible and it would be a memory leak. They really should be freed as soon as the operation is done. Ans also has the same problem - pressing enter will make a new instance of it each time. Ans should really be declared in the beginning of my program and freed and reassigned whenever the answer of a line changes.

The program, when finished, will be able to have different inputs on each line, and so things like output1, inputLen, and ans will have to turn into arrays, one of them for each line. I haven't done that yet and I haven't worked on the program recently as I am more interested in porting over GMP and make a GUI for it.

Are you wondering who Sammy is? My avatar is Sammy.
   

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: BigNumNum Cruncher
« Reply #51 on: March 01, 2012, 01:46:37 pm »
Unfortunately I can't help you port GMP because I don't know much about libraries.
And GMP even doesn't compile correctly for me, I'm getting some errors that it "cannot determine how to define a 32-bit word" :(

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: BigNumNum Cruncher
« Reply #52 on: March 01, 2012, 02:24:03 pm »
These problems look weird, be they the undefined differences or the compiler being unable to determine how to define a 32-bit word :(
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: BigNumNum Cruncher
« Reply #53 on: March 01, 2012, 02:57:13 pm »
All the errors I get:

Code: [Select]
mv: cannot stat `gmp-5.0.4': No such file or directory
mkdir: cannot create directory `build': File exists
mkdir: cannot create directory `prefix': File exists
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
../src/configure: line 27268: /c/Program: No such file or directory
configure: WARNING: +----------------------------------------------------------
configure: WARNING: | Cannot determine global symbol prefix.
configure: WARNING: | /c/Program Files (x86)/yagarto/bin/arm-none-eabi-nm output doesn't contain a global data symbol.
configure: WARNING: | Will proceed with no underscore.
configure: WARNING: | If this is wrong then you'll get link errors referring
configure: WARNING: | to ___gmpn_add_n (note three underscores).
configure: WARNING: | In this case do a fresh build with an override,
configure: WARNING: |     ./configure gmp_cv_asm_underscore=yes
configure: WARNING: +----------------------------------------------------------
configure: WARNING: "/c/Program Files (x86)/yagarto/bin/arm-none-eabi-nm" failure
configure: WARNING: cannot determine local label, using default L
../src/configure: line 27607: /c/Program: No such file or directory
../src/configure: line 27607: /c/Program: No such file or directory
configure: error: cannot determine how to define a 32-bit word

Edit: I'm more or less using the script you posted, but without the download commands:
Code: [Select]
#!/bin/sh
# This creates a "gmp" subdirectory whereever you launch the script, and compiles and installs in subdirectories thereof.
WORKING_DIR=`pwd`
mv gmp-5.0.4 src
mkdir build
mkdir prefix
cd build
../src/configure --host=arm-none-eabi --prefix="$WORKING_DIR/prefix" --enable-shared=no --enable-assert || exit 1
make && make install
« Last Edit: March 01, 2012, 03:00:26 pm by lkj »

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Re: BigNumNum Cruncher
« Reply #54 on: March 01, 2012, 03:01:42 pm »
I think a lot of the errors come from not having the proper folders and not having the privileges to create the folder.

Are you wondering who Sammy is? My avatar is Sammy.
   

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: BigNumNum Cruncher
« Reply #55 on: March 01, 2012, 03:17:29 pm »
/c/Program Files (x86)/yagarto/bin/arm-none-eabi-nm is a correct path, but /c/program obviously isn't. I'm asking myself why it searches anything in that folder when no windows pc has such a path ??? And why it worked for you but not for me ???

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Re: BigNumNum Cruncher
« Reply #56 on: March 01, 2012, 03:18:11 pm »
I'm in Linux :)

Are you wondering who Sammy is? My avatar is Sammy.
   

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: BigNumNum Cruncher
« Reply #57 on: March 01, 2012, 03:25:54 pm »
Hm, but it seems that it should also work on windows. At least the script runs in msys.
And the first three errors are only there because I had to rerun the script to copy the logs, they didn't change anything about the result.

Edit: Could it be that it uses yagarto and another gcc? Because gcc --version outputs 4.5.2 and yagarto says it uses gcc 4.6.2, so these could be incompatible?
« Last Edit: March 01, 2012, 03:29:42 pm by lkj »

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: BigNumNum Cruncher
« Reply #58 on: March 01, 2012, 03:30:21 pm »
It's not a problem of GCC version number :)

Many programs and scripts tend to break when they're run from a path which contains spaces. Install MSYS in C:\MSYS, and it ought to work much better ;)
My script should be able to cope with it, because I put quotes (--prefix="$WORKING_DIR/prefix") for that reason, but the configure script probably doesn't.
« Last Edit: March 01, 2012, 03:32:09 pm by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Re: BigNumNum Cruncher
« Reply #59 on: March 01, 2012, 03:31:27 pm »
Oh yeah! C:\Program is probably just C:\Program Files, but the space screws everything up.

Are you wondering who Sammy is? My avatar is Sammy.