Show Posts

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 - lkj

Pages: 1 ... 23 24 [25] 26 27 ... 33
361
Computer Programming / bytes, strings bytearrays???
« on: March 16, 2012, 06:32:09 pm »
I really don't get why this python 3.2 code doesn't work:
Code: [Select]
file = open("evil2.gfx","rb")
tmp = bytearray(file.read())
file.close()
tmp1 = b''
tmp2 = b''
tmp3 = b''
tmp4 = b''
tmp5 = b''
result = b''
for i in range(0,len(tmp)):
    if i%5 == 0:
        tmp1 += bytes(tmp[i])
    elif i%5 == 1:
        tmp2 += bytes(tmp[i])
    elif i%5 == 2:
        tmp3 += bytes(tmp[i])
    elif i%5 == 3:
        tmp4 += bytes(tmp[i])
    elif i%5 == 4:
        tmp5 += bytes(tmp[i])

I really don't understand why I can't add a single byte from a bytestring to a bytestring without typecasting, and if I try to convert it like above with bytes() I get very long bytestrings only containing null ???
Is the typesystem of Python really that much more difficult than that of C or do I just not understand it yet?

362
nSDL / Re: nSDL (0.1.1 beta)
« on: March 16, 2012, 02:05:12 pm »
Great job! I'll have to learn how to use SDL :)

363
TI-Nspire / Re: Some 3D with Ndless...
« on: March 05, 2012, 03:28:50 pm »
Moreover, it seems that TI secures more and more their OSes, so I think that ndless 3.2 won't be here before a while, despite your amazing work.

I don't think they'll ever make a secure OS, as long as ExtendeD is motivated and has time there will be Ndless :)

Quote
Anyway, I thought a lot about this last night, and it would be stupid to stop calculator programming.
I might not stop this project, but it is paused for sure (for at least one week).
I still feel discouraged, but I do want to help the community, and it seems that giving up isn't the right thing to do.
I like your project, and if programming isn't fun for you at the moment, just make a pause and program again when it's fun again :)

364
TI-Nspire / Re: BigNumNum Cruncher
« on: March 04, 2012, 02:05:34 pm »
I figured out that the above error is the only real one, the other error about the 32 bit words was with the x86-gcc to which it fell back after arm-none-eabi-gcc had given an error.

365
TI-Nspire / Re: Some 3D with Ndless...
« on: March 04, 2012, 02:02:17 pm »
Some people like me won't update to 3.2 until a new ndless comes out, but unfortunately most people have to or like the new lua too much for not using it :(
TI's strategy to give us a better lua so that most people don't want native code anymore seems to succeed.

366
You could also do f(x)=1000x - 2000. It isn't really vertical, but you can't see the difference.

367
I think Nick is right, it isn't currently possible.

368
News / Re: OS 3.2 blocks Ndless
« on: March 03, 2012, 06:35:18 pm »
The effort wouldn't be worth it for TI, it isn't too difficult for them to just fix the flaws that Ndless uses.

No, with a little script to replace everything, swap case and so on before compiling ;)
I just thought it could possibly work for non-cx os files, but apparently not.
Again, you know that keys.i doesn't have the actual keys inside, right? ;)
Therefore the output you get will still be encrypted.... unless you have the keys and stuck them inside of keys.i :P

Ah you're right, I tested it with the non-cx key and it worked :D

369
News / Re: OS 3.2 blocks Ndless
« on: March 03, 2012, 06:09:25 pm »
No, with a little script to replace everything, swap case and so on before compiling ;)
I just thought it could possibly work for non-cx os files, but apparently not.

370
News / Re: OS 3.2 blocks Ndless
« on: March 03, 2012, 05:59:15 pm »
Yeah, it looks like basic :D
But even though I can compile it it doesn't produce valid output.

371
TI-Nspire / Re: BigNumNum Cruncher
« on: March 03, 2012, 02:59:23 pm »
It does find the correct gcc, but the problem seems to be an "undefined reference to '_exit'" in newlib :(

The important part of config.log:

Code: [Select]
configure:5440: checking compiler arm-none-eabi-gcc -O2 -pedantic -fomit-frame-pointer
Test compile:
configure:5454: arm-none-eabi-gcc -O2 -pedantic -fomit-frame-pointer  conftest.c >&5
c:/yagarto/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): In function `exit':
C:\msys\1.0\home\yagarto\newlib-build\arm-none-eabi\newlib\libc\stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/exit.c:65: undefined reference to `_exit'
collect2: ld returned 1 exit status
configure:5457: $? = 1
failed program was:

int main () { return 0; }

372
Casio Calculators / Re: Casio's Response to My Suggestions
« on: March 03, 2012, 01:45:55 pm »
Nothing has worked in the video game industry yet.

373
TI-Nspire / Re: BigNumNum Cruncher
« on: March 03, 2012, 01:21:22 pm »
Does anyone know why configure calls mingw's gcc and not yagarto's gcc? What should I change?

Now I know why, somehow it doesn't find yagarto's gcc, even though its path is in my PATH environment variable.

374
Ndless / Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« on: March 03, 2012, 10:03:04 am »
the "directory for the tns file" means the name and directory were the compiled .tns will be. For example this line could be
Code: [Select]
DISTDIR = Example.tns
In the OBJS line you have to write the names of the .c files you want to compile, but with .o instead of .c at the end of each name.
So I could put
DISTDIR = C:/ndless/test1/testprogram.tns
?

I'm sorry that I was wrong and didn't answer :(
It would have to be
DISTDIR = C:/ndless/test1/
but I guess you've figured it out yourself.

375
TI-Nspire / Re: BigNumNum Cruncher
« on: March 01, 2012, 05:08:05 pm »
And you also have yagarto with binutils version 2.21 and gcc 4.6.2?

Pages: 1 ... 23 24 [25] 26 27 ... 33