721
Web Programming and Design / Re: Nspire Online Compiler
« on: June 26, 2011, 12:17:51 am »
Probably, unless he uses REGEX to filter out non-GCC calls.
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. 721
Web Programming and Design / Re: Nspire Online Compiler« on: June 26, 2011, 12:17:51 am »
Probably, unless he uses REGEX to filter out non-GCC calls.
722
Miscellaneous / Re: Definitely retiring from coding« on: June 25, 2011, 06:34:21 pm »
He did show his father this thread and apparently it made the problem even worse.
723
Miscellaneous / Re: Definitely retiring from coding« on: June 25, 2011, 04:56:34 pm »Don't. The fact is that we're not ![]() How many "normal" people feel the desire to make a machine perform odd tasks? 724
ASM / Re: how do you put program data->string?« on: June 24, 2011, 10:33:50 pm »Well i saw Celtic3, it made data in program to str9, (prgm name in str0), so i tried making it, but i didnt know where to start.. point is im trying to use the program to read what's inside other program I'm not sure why you would want to put a program's contents into a string unless it was for a BASIC library. ASM has much better ways of reading program data such as reading the program directly from memory. You're looking up the pointer and reading its data to create the string anyway, so... 725
Miscellaneous / Re: best compression method?« on: June 24, 2011, 12:47:02 pm »
If you're going to use 7zip, use PPMd. However, if you'd like something with even higher compression, try PAQ, which is generally considered one of the best general purpose compression algorithms in existence.
That said, what algorithm you use depends heavily on what you're compressing. If you're compressing things with a lot of repetitive data, simple Huffman encoding will give you a near optimal results. If you're compressing random binary noise, no compression algorithm is going to do well. 726
TI Z80 / Re: Axe parser game« on: June 24, 2011, 04:40:18 am »Ah yes , to "avoid" ram clear ? But My game will be easy to hack by using a sub programme : It's possible to hack a game no matter what you do to secure it ![]() 727
Casio Calculators / Re: FXTerm - VT100 terminal emulator for Casio fx cg« on: June 24, 2011, 04:05:08 am »
I don't think this is a shell.
728
Other / Re: The benefits of OOP« on: June 23, 2011, 06:53:52 pm »
I'm not asking whether procedural programming or OOP is better, I'm asking what the benefits of OOP are over procedural programming. Procedural methods aren't perfect. For example, networking in most procedural languages is a PITA because of all the things you have to deal with. There are languages that make networking relatively easy though, like Java. I think tloz128 brought up a good point with the part about working with other programmers. It's much easier to just pass arguments than read the documentation for that routine.
Quote *I assume you meant 1500 lines of code, not 15000, because 300*5= 1500.no, I actually forgot a 0 at the 300. that should be 3000 Depends on the language and the desired realism. You can certainly do a decent game engine in 1500 lines with the right language. 729
Other / Re: The benefits of OOP« on: June 23, 2011, 06:45:23 pm »With large projects, OOP is much easyer to find the piece of code you should work at becouse you can store the classes in different folders so you won't have to spend 70% of your time by scrollingto the code you want to edit. Khavi, the project I mentioned in my first post, as approximately 4000 lines of code at the moment*. The code is currently divided into 3 subprograms and it takes me around 15 seconds to find the code I'm looking for. I'm not sure that putting Code: [Select] public static void main() significantly improves your code's organization above "#include <file.s>" or ".macro" *I assume you meant 1500 lines of code, not 15000, because 300*5= 1500. 730
Other / Re: The benefits of OOP« on: June 23, 2011, 06:11:49 pm »
@Ben: I don't think anyone is going to argue that Java (OO) is easier than TI-BASIC (Procedural). Ease of understanding really depends more on the language's syntax than the paradigm.
EDIT: @tloz: I understand that class are organizational, but how are they better in that aspect from subroutines with documented variable use? 731
Other / The benefits of OOP« on: June 23, 2011, 05:57:43 pm »
I've been curious about what tangible benefits Object Oriented Programming offers over normal procedural programming [for some unknown but competent programmer], since everyone seems to rave about it.
From what I understand, OOP basically expands upon the idea of a class that's effectively a general classification of objects. To create objects, you instantiate them from their classes. This is actually very similar to a problem I solved in Khavi where multiple threads have to be created that are very similar to each other. However, since Khavi is written in a procedural language (ASM), I couldn't just instantiate from a class. My solution (which took remarkably little code) was just to treat the initial primary thread as an array of bytes and do a simple array copy to another location in RAM. As for objects, I don't see why they're any different than subroutines with argument passing. You pass the arguments to the methods, which operate on them and change the state of the object, precisely as subroutines do to the program state in procedural programming. This also brings up the point of data encapsulation, which I honestly can't fathom a reason for as long as the programmer is competent enough to properly debug their code (or not do stupid things like arbitrarily change the arguments the function requires). Another argument I see for OOP is code re-usability, which touches on several things, most notably inheritance. Inheritance can be fully implemented in any reasonable procedural language with a simple subroutine call or copy and paste. A subroutine call doesn't take much more code than a declaration of inheritance. However, if you want to re-use code across different projects, it would seem that classes are good as black boxes, right? If you think about it for a minute, the most widely re-used code in existence, the C standard library, is entirely procedural. It's also incredibly simple to use, effective, and a nice black box to most programmers. Packages are another story. What benefit is there to using hundreds of classes over using subroutines or subprograms? Almost every operating system ever written has a library of some sort. That's represented procedurally and yet people maintain operating systems for years. Same for pretty much every library. "Self Documenting code:" My general view on self-documenting code is that when you go to maintain it in ten years, it won't seem so self-documenting. Use comments. They're there for a reason. "Maintainability:" If your code is well written, maintenance should be relatively straightforward. So, can anyone try to explain what benefits there are to OOP? I feel like I must be missing something if so many people rave about it (And it's taught in every software school). 732
Casio Calculators / Re: Compiling stuff for Prizm« on: June 23, 2011, 12:09:00 pm »
Actually, the KPIT GNU tools have a very nice debugger. You have to play around with them a bit in order to get the CPU simulator working, though.
733
TI Z80 / Re: Rogue OS« on: June 21, 2011, 05:24:38 pm »
Wait, "welcome.exe?"
Are you seriously parsing .exe files? ![]() 734
TI Z80 / Re: TCPS embedded/independent scripting language« on: June 21, 2011, 05:17:20 pm »
You may also notice that I pointed that out in my proof as the simplest way to demonstrate Turing-Completeness... 735
TI Z80 / Re: TCPS embedded/independent scripting language« on: June 21, 2011, 06:33:36 am »- BF doesn't have get key BF uses the ',' command as a "getkey" of sorts. It takes a byte of input from the user and places it in the cell at the data pointer. TCPS doesn't appear to have anything like that aside from the filename thing, which is... annoying. Also, not having I/O takes away from the ability of the language to replicate programs in "real" languages. Sure, they aren't necessary for Turing completeness, but they make brainf*ck a theoretically useful language by not forcing everything to be hardcoded and perfectly deterministic. As for how the proof relates to the language, you can't just say "This language is Turing complete" and have it be so. The creator of Malbolge stated that it was Turing complete in his presentation of the language, while the language actually isn't. What I provided was an informal proof (which would serve as a nice outline to a formal proof) of the language's Turing completeness. |
|