Author Topic: Nspire Online Compiler  (Read 4773 times)

0 Members and 1 Guest are viewing this topic.

Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
Nspire Online Compiler
« on: May 02, 2011, 03:20:31 pm »
I made a small tool that lets you upload a zip archive containing source code of an nspire program and compiles it.
You can modify the EXE and OBJS variables in the makefile to whatever you want.
http://compu.vortexirc.com/compiler/

It uses arm-elf-gcc 4.4.6 because I have problems to get 4.5 to work.
__builtin_unreachable() was added in 4.5 so you will always get a warning:
Code: [Select]
/home/julian/ndless/include/os.h: In function 'exit':
/home/julian/ndless/include/os.h:389: warning: implicit declaration of function '__builtin_unreachable'

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire Online Compiler
« Reply #1 on: May 02, 2011, 03:28:30 pm »
Hmm nice, is this for ASM and C or Lua?

Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
Re: Nspire Online Compiler
« Reply #2 on: May 02, 2011, 03:29:27 pm »
At the moment, only C is supported, but it is easy to add Asm.

Offline Silver Shadow

  • Beta Tester
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +27/-7
    • View Profile
Re: Nspire Online Compiler
« Reply #3 on: May 02, 2011, 05:37:18 pm »
What OS is the server running? (for arm-elf-gcc)
« Last Edit: May 02, 2011, 05:38:41 pm by Silver Shadow »
Former Coder of Tomorrow


Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
Re: Nspire Online Compiler
« Reply #4 on: May 03, 2011, 03:46:15 am »
Debian with Linux Kernel 2.6.18.

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: Nspire Online Compiler
« Reply #5 on: May 04, 2011, 04:37:41 am »
Letting anyone run arbitrary commands on your server isn't a bit risky? Or are there any filter mechanisms?
Ndless.me with the finest TI-Nspire programs

Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
Re: Nspire Online Compiler
« Reply #6 on: May 04, 2011, 08:27:09 am »
PHP has a filter function called escapeshellcmd() that will filter all |, ;, etc. out.

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Nspire Online Compiler
« Reply #7 on: June 25, 2011, 11:47:32 pm »
Couldn't you still run arbitrary commands by changing nspire-gcc in the makefile to anything you want?

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Nspire Online Compiler
« Reply #8 on: June 26, 2011, 12:17:51 am »
Probably, unless he uses REGEX to filter out non-GCC calls.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Nspire Online Compiler
« Reply #9 on: June 26, 2011, 06:31:59 am »
Compu, I get "404 - Not Found" on the webpage.

Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
Re: Nspire Online Compiler
« Reply #10 on: June 27, 2011, 02:54:28 am »
Compu, I get "404 - Not Found" on the webpage.
Yes, I have accidentally moved the directory, I will fix it as soon as possible ;)