Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - Delphi 5 or Visual Basic 6?
  
User name:
Password:
Reply:
 

UserPost
loadingNOW
Posts: 6/61
I actually had to do some delphi stuff at school and it was not that bad. Working with VB6 is way more annoying IMO (see para's post about the message boxes)

Anyway c(++) for me - gba/gcdev is possible, inline assemblys, nice syntax, proven library. And if you really want to do a quick and dirty job you can use mfc - although you usually regret the choice sooner or later
Dylan
Posts: 385/1407
For quicker but effective results use VB. Delphi is for lamers. C will cause you the most grief but its the most worthwhile in the long-run.
neotransotaku
Posts: 1063/4016
here you go, read up...

Delphi 7 as presented by Borland
Nap
Posts: 4/24
What about Delphi 7 ? I dont know anything about Delphi, but i know about VB, and I guess the latest Delphi is 7..so whats up in it?
Parasyte
Posts: 106/514
OK, if you insist!
dan
Posts: 93/782
I didn't say that Java byte code was technically machine code. I said that Java is technically compiled into machine code (through a dynamic recompiler, Hotspot). There is a difference.
Parasyte
Posts: 103/514
I'll agree with that.
I see Java about the same way I see Macromedia Flash, with it's LINGO language. The code may be compiled, but it's not machine code. A dynamic recompiler is a bit different from a standard executable. Well, of course you know all of this. I'm just trying to pin-point how Java byte-code could be considered "technically machine code."
dan
Posts: 92/782
Originally posted by Parasyte
neotransotaku, Java is not compiled into machine code.


Technically, it is. The files that are generated by the compiler use the Java byte code format, but when they are run through a Java interpreter that has Hotspot (i.e. the majority of the newest versions of Java), the code gets profiled, and the slowest parts of the code are translated into native machine code, for a speed boost. It's quite nifty actually.

.NET languages compile to a byte code like Java. However there are programs (for .NET) available that obfuscate the byte code making it pretty much impossible to get anything meaningful out.
Parasyte
Posts: 102/514
FreeDOS: Your last two posts contain falacious information.
The C# / C++ decompiler works only on .NET programs and that stuff. .NET programs contain a LOT of scripting-oriented content, such as XML.
There have been many discussions about decompilers and the myths surrounding them. One of the most common misunderstandings is that a decompiler can be written for any language. In reality, a seperate decompiler would be needed to match every available compiler for a specific language. When you take into account the fact that compilers generally offer a WIDE range of optimization features and such, (which WILL change the resulting code to the point that it becomes no longer recognizable by a decompiler) the number of features required in a decompiler become staggering. And even then, with some mid-\low-level languages, you will lose a LOT of information between the original source and decompiled source. For one thing, you lose the aspect of seperate source files\object files under a language like C or C++. Also, variable and function names are sent to oblivion during the linking process. Of course, comments and whitespace will be 100% wiped. Macros and inline functions will be reduced to something more like a preprocessor would output. And finally, inline assembly routines will completely DESTROY the decompiled source, as the decompiler tries to make sense of the routine(s). In short, the decompiled source will be utter hell to read and understand.

Second, there is no "secret version of C" which Microsoft used for creating Windows. Of course, I cannot prove this, but inventing a language just for one piece of software (no matter the size of said software) is a terrible idea. Especially from a business stand-point, where you would have to invest far too much money into re-inventing the wheel.
I suspect Windows is written in C\C++ with maybe a bit of inline assembly. Or maybe a lot of inline assembly ... who knows. The kernel could benefit from it. Definitely in the thread switching code and things like that.


neotransotaku, Java is not compiled into machine code. It's more of a pseudo-code, thus giving Java programs the ability to run on every machine\OS with Java installed. This is what makes it more of a scripting language. I have not bothered looking into C#, because it sounds like a ripoff of Java anyway. So it would not surprise me if C# programs where simple pseudo-code applications as well. (Maybe so Microsoft can allow developers cross-platform capability between PC and Palm running a Microsoft OS, or something of that sort.)



So just to clear up any remaining confusion: Decompilers for "real" programming languages will not exist in usable form. Ever. Decompilers for scripting languages, on the other hand... Those can show up over night.
FreeDOS
Posts: 550/1657
There are C compilers, of course. It's one of the most widely used languages.

Windows is coded in a propietary, secret version of C by Microsoft. Unless someone figures it out based on the small leaked portion of the Windows2000/IE6 source, I don't think people'll get farther than dessembling Windows. (It was Paint, IIRC, that was dessembled, optimised, and re-assembled about 2000% smaller than it came with Windows )
neotransotaku
Posts: 966/4016
what the hell... hmm...i don't think it will work for every class but i guess i'll have to run the java thing on my own classes and see how accurate it gets them...

if anyone can find a C decompiler...if so, then windows can be decompiled

with these kinds of programs...then nothing is safe anymore...i wonder if companies migrating to .NET are making a good move...
FreeDOS
Posts: 549/1657
DJ Java Decompiler
C# / C++ Decompiler

Decompilers exist for just about every language there is, you know.
neotransotaku
Posts: 961/4016
Since when can Java or C# be disassembled into usable source? You've just stumbled into the holy grail of computer programming. Or well, show me a place that says it can be done...
Parasyte
Posts: 101/514
Hah! You mean if I want a lame programming job. Java and C# are more like scripting languages than programming languages. (Java especially; any executable that can be decompiled into readable, usable source code is not much of a programming language. Native code is -and always will be- much better.)

I took up a programming project a while back and made $9,000 USD using C\C++\MFC. I spent less than 80 hours total writing the software. Just a little FYI.
neotransotaku
Posts: 959/4016
Want a programming job? You need to know both to give you a better chances in finding one

If you just program as an amateur--then forget you...
Parasyte
Posts: 100/514
Ew, Java... Double ew, C#...
neotransotaku
Posts: 946/4016
Heh...my friend is going to like you

with C, you can do a lot of stuff...just a matter of how much power you want. I think most people who are turned off to C do not like the power you get. Well, once you get C, then C++ and Java should come as easy, then C# just then will rely on your C and Java strength.
FreeDOS
Posts: 541/1657
I've been experimenting... I like C a lot better than Delphi or VB6. I just do...

VB6 doesn't seem all that powerful. Delphi is too much of a drag and drop thing. You actually do stuff in C. You can control stuff in C.

I'll pick C!
RavenX
Posts: 13/57
i'm not gonna even pretend to know as much as you all...but i like using VB6 because it's easy to be self taught it...because that's how i learn programming ^^;
neotransotaku
Posts: 739/4016
What's good about VB:
-Very easy to read someone else's code, to see WTF it does.


Same can be said of all languages, given you know the language, and the variable and finction names are not screwed up. Comments help, but are not always required.
True, but in languages like C you can do such crazy things as writing an entire function on one line. It's very hard to read this way. You can do this in VB, but it's a little-known feature, so it's rarely used.
---
Then don't use that person's code...that person is probably an arrogant prick anyways for doing such a thing. This is one reason why not to cut and paste people's code into your own.

-The IDE will warn you about bugs as they occurr in execution, so you know exactly what's wrong.

Oh yeah, I hated that. Usually the stupid message would show up while I was in the middle of typing a line, when I decided to go up and fix a previous line. Say I typed, "i =" and then used the up arrows (or the mouse) to get to another line in order to fix something before forgetting. "DONK!" says VB6 through my speakers, and up comes this stupid message saying "HEY IDIOT! You didn't finish typing this line!" And I'm all like, "NO SHIT! I am fully aware of this fact. Hey! Since you're so good at explaining the blatantly obvious, think you can tell me how I can disable you?"
So yeah, it's it was never able to answer my question, or help me even remotely. Pathetic.

That is annoying, but I much prefer a "syntax error" message as soon as I make a mistake, then trying to track it down later when I don't even remember the code.
---
There is software or add-ons for C and other languages that will do syntax checking on the fly. So yeah, you can have this feature for C if you wanted.

-It's generally smart, IE it knows the difference between 'var = 4' and 'if var = 4'.

Programmers don't need smart compilers. Programmers need smart brains. If the programmer can't decern between 'var = 4' and 'if var = 4' then there is a major problem.
The thing about a 'single-equal' in a C if-statement is that it can be used for assignment within that if-statement. One of my favorite uses of this, for example:
u8 *buffer;
if (!(buffer = (u8*)malloc(1024))) {
printf("Unable to allocate 1024 bytes of memory!\n");
return 1;
}
buffer[0] = 1;

Something of that sort. It just saves me the trouble of placing the malloc() call on a previous line, THEN testing the return value in the 'buffer' pointer.

True, but smart compilers make life easier. Isn't the point of computers to relieve us of repetitive difficult tasks? Why, then, shouldn't we let them in this case? (Even if it isn't exactly difficult. )
---
Compilers has nothing to do with the allowance of certain things to happen in certain places. the var=4 and if var = 4 deficiency lies in the language itself, not the compiler. all the compiler does is check to see if your code fits within syntactic, semantic, and possibly operational guidelines of the language--it doesn't check to see whether what you are doing is logical.

Bad stuff about C:

-It's a LOT harder to learn, especially Win32! (Creating a window = ARGH! )

No, C is not a lot harder to learn. The basics are just as easy to learn as with most any language. Using the language properly may be "tough" because everything is based around the same principles. And as neotransotaku stated, Win32 is just an API -- it's a part of Windows, not the C language.
You can use the Win32 API in Delphi or VB if you like. And in fact, there are some things you MUST use the API for in both languages.

It may not be C's fault, but one way or another, you're going to need to do a lot of difficult API stuff you wouldn't need to do in VB or Delphi.
---
VB/Delphi just masks it all, which means they take away some power you have. So, this will all boil down to how much control you really want in the end.

-Working with strings and arrays can be a nightmare.

No, it's a blessing. Under C, a "string" and an array are exactly the same. As I said earlier, everything is based on the same principles. After you are able to comprehend this, it's not so bad working with strings in C. I do it on a daily basis, and wouldn't have it any other way. In this way, you're more in touch with the hardware as a programmer, rather than relying on the language to do EVERYTHING for you.
Because "strncopy(str1,str2,sizeOf(str1));" is SO much easier than "str1=str2", and worrying about buffer overflows is way fun.
---
once again, this boils down to how much power you want...

-You need to do everything yourself, it's not just a matter of declaring something.

I almost agree with this! It's what makes C so great. If you understand the hardware you are working with, why not work a little bit closer to it? Take for example, strings... With VB, you define a string and set it to some crap. What the program actually does is allocate memory for the string, then it copies the string data to that memory. That is exactly what is done in C to create a string; allocate some memory: "char string[256];" Then copy the string data to it: "strcpy(string, "Hello World!");"
Of course, you need to understand that C (being based on the same principles through-out) handles strings as pointers. So "Hello World!" would be compiled as a pointer to that string data. That's just some more getting-in-touch with the hardware you are using.

But it also means more code to write and debug.
---
not taking any sides, but that programming example is trivial. the real power of a language is the ease at which you solve a non-trivial problem using the language--like writing an emulator or a compiler. for some problems, you need all the power that C gives you. For others, then VB may be the better solution.

-The code can be very hard to read at times, especially when done by messy programmers.

Same can be said of all languages. Well, unless the 'IDE' won't allow stupid use of whitespace and such.
I hate non-tabbed code as much as the next programmer, but it's really up to the programmer to write his code the way he likes. It's not a decision that you are I can make for him. And it's certainly not a decision that the damn IDE should make. Screw that.

I've never had a problem reading other people's code in VB. The same most certainly can't be said for C.
---
Then the people who are relying on are arrogant and look down at newbies to C. Since that is the case, take a course on C, learn the syntax and concepts of the language, and screw those people.

Good stuff about ASM:
-It's the lowest level (besides raw hex) there is, so you can really optimize your code. If you're really good, you can do such crazy things as using instructions as data, or in some rare cases, even jumping partway into a multi-byte instruction, giving you a whole new series of instructions. (Example: On GB/Z80, the hex for 'ld hl,$23C3; ld bc,$0021' is '21 C3 23 01 21 00'. If you jump straight to the C3, you get 'jp $0123; ld bc,0' (but the second instruction doesn't get executed, because the first is a direct jump).)


Ah, yes. The good ol' disassembler-confusion code. Doing stupid things like that are really only applicable for software protection code. A good reverse engineer won't be fooled, but the silly hacker-wannabe's will.
I'm not talking about doing it for anti-hacking purposes so much as optimization. Sometimes you need to fit a lot of code in a very small space.
---
not to mention, there are only a few things that can be done only in assembly that can't be done at a higher level language since the compiler will reject the the equivalent program

it is a lot harder to learn, especially Win32
Win32 is just an API. Meaning if Win32 didn't exist, C would still be C.
But it's harder to do basic Win32 stuff, because you have to do absolutely everything.
---
If you don't want to do Win32, jump up a step and use MFC or its new reincarnation, Window Forms. But then, we would be leaving C but then C++ is still close to C...

It's the lowest level (besides raw hex) there is
raw hex and ASM are the same thing, just like '2' and the chinese character for 2 mean the same thing
Er, no they're not. Hex is machine code, as in 'CD3215'. ASM is the human-readable form of it, as in 'call $1532' or even 'call somefunction'.
---
I guess it depends on how you look at it. I used to be an individual outhere who says that the lowest level is machine then the next level is ASM. I wonder why I changed though, probably because the fact that raw hex doesn't have to be converted since it is already 1's and 0's while assembly has to be converted into the hex representation.

Which makes me wonder: the process of converting ASM to hex, is that translating or compiling? I guess the answer to that question would determine whether you deam ASM as a seperate level from hex/machine code or not.
This is a long thread. Click here to view it.
Acmlm's Board - I2 Archive - Programming - Delphi 5 or Visual Basic 6?


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.006 seconds.