Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   What is your most prefered programming language? (http://www.chiefdelphi.com/forums/showthread.php?t=15392)

gates_2 29-12-2002 06:59

come on guys, ASSEMBLY!!!!!!!!

haha, yea right, someday, however you can do just about anything, but it will take you a lifetime to do it.

Other then that, i really like Visual basic for application programming

Mongoose 30-12-2002 03:33

Actually, I just wrote Pong for my calculator in assembly today. The basics are pretty simple if you already know another language. It probably would have taken about ten minutes in C++, though. What's nice is that it's lightning fast (compared to TI-BASIC) and people can't mess up the source code. Plus it gains you a certain level of, shall I say, prestige.

I never really liked VB much, but I never really learned it either, ever since my buddy sent me an app with bazillions of modules and dlls and cabs and ocxs and whatevers... The app itself was pretty small, but all the dependencies were bloated.

randomperson 30-12-2002 18:58

hehe.. assembly language is the best in my opinion.. then C/C++.. but they're right, whichever tool gets the job done is the best one.

VanWEric 30-12-2002 20:26

bah! assembly is for wimps. if you want a real challenge, do it by tapping out zeros and ones with a paper clip soldered into your mobo. that is how real men do it.

please don't hurt me

rbayer 30-12-2002 21:22

A few notes on assembly:

First, "assembly" is not a language; it is a group of languages. For example, assembly for x86 processors is only vaguely related to assembly for embeded chips which is only vaguely related to other dialects of assembly.

Second, assembly still has uses! Assembly is the easiest way I've found to take advantage of 3dNow!/SSE instructions, which are very important to modern procesors.

Third, assembly is not any faster than any other language. For example, x86 assembly can be much slower than the equivalent C code if you turn on optimizations in your compiler. It's all in how you use it.

Fourth, EVERY programmer should learn some form of assembly. Until you actually get down to the nitty-gritty of running instructions one at a time it's hard to understand costs associated with various operations. If you want a good intro, check out Randall Hyde's Art of Assembly.

randomperson 30-12-2002 22:46

lol... coding in straight binary? i did that once actually.. for a MC6800 microcontroller i built.. but it kinda got annoying to set each bit so I got a hex switch to program the ROM.

Hmm.. it seems like everyone keeps emphasizing that no language is superior overall.. wonder why that is? It couldn't be because its true.. no, that makes no sense...

Matt Leese 31-12-2002 08:38

Quote:

Originally posted by rbayer
Third, assembly is not any faster than any other language. For example, x86 assembly can be much slower than the equivalent C code if you turn on optimizations in your compiler. It's all in how you use it.

That's a bit of a "urban legend." Hand-crafted assembly can be significantly faster than what is output by a compiler, even with all optimizations turned on. It's the simple fact that when writing in assembly you can tell the processor to only do what you really need it to do at a much lower level than that of a higher-level language.

That said, the most useful part of assembly these days is the fact that it will result in an executable of much smaller size. There's a significant amount of overhead involved with a higher-level language that can be avoided by writing in assembly. Now why does size matter with huge hard drives being cheap? Embedded systems.

Matt

rbayer 31-12-2002 11:13

Quote:

Originally posted by Matt Leese
That's a bit of a "urban legend." Hand-crafted assembly can be significantly faster than what is output by a compiler, even with all optimizations turned on. It's the simple fact that when writing in assembly you can tell the processor to only do what you really need it to do at a much lower level than that of a higher-level language.

That said, the most useful part of assembly these days is the fact that it will result in an executable of much smaller size. There's a significant amount of overhead involved with a higher-level language that can be avoided by writing in assembly. Now why does size matter with huge hard drives being cheap? Embedded systems.

Matt

I agree. Assembly can be faster than a compiled language. On the other hand, if you don't know what you're doing, you have the potential to royally destroy the processor pipeline. It's gotten much better with branch prediction, but it still isn't perfect.

Anyway, slashdot had a story a while back on tiny binaries using assembly. It's a good read and available here.

mikexstudios 31-12-2002 21:45

Quote:

First, "assembly" is not a language; it is a group of languages. For example, assembly for x86 processors is only vaguely related to assembly for embedded chips which is only vaguely related to other dialects of assembly.
True, but when people generally speak of Assembly they are speaking of the general language (usually pinpointing to the x86 architecture).

Quote:

Second, assembly still has uses! Assembly is the easiest way I've found to take advantage of 3dNow!/SSE instructions, which are very important to modern procesors.
Assembly always has its uses! Along with special instructions, one can use assembly to debug programs, write compact programs, optimized functions, etc.

Quote:

Third, assembly is not any faster than any other language. For example, x86 assembly can be much slower than the equivalent C code if you turn on optimizations in your compiler. It's all in how you use it.
That is not true (at least in my opinion). Assembly is faster than many languages especially interpreted ones. Assembly is faster than php, perl, java, visual basic, shell scripts, etc.

For instance, take a fairly moderate program (with some file writing, loops, function calls, and variable storage) and write one in C and write one in Assembly. The Assembly one will be faster. Why? Because one has total control over how the program is run in assembly. Therefore, there won't be junk code thrown in by the complier. The complier might make 10 jumps in the code to do something, while the savvy assembly programmer can do the same thing in 4 jumps. For small programs (like a print Hello World!), assembly might not make such a difference, but for larger programs, assembly's speed will shine.

Of course the problem is writing the program in assembly. It will take too long!

Steve Gibson of grc.com does an awesome job of writing Assembly programs.

mikeXstudios

ckim 31-12-2002 23:50

I must say my favorite language is C for programming almost anything and a lot of applications are written in including operating systems. For web programming php, although some argue perl is better php has better error handling in my opinion. For simple automated tasks on my machines I use either perl or bash scripts. For recursions I must say lisp is very cool. And a lanugage I find very cool is starlogo. You can simulate simulations and make every dot act according to it's properties. Although very little practical use very cool. When I used to use windows I primarily used visual basic. But now I think of it it's quite slow.

Mongoose 02-01-2003 01:02

Starlogo! I have fond memories of that... I can barely remember the instructions, but I can remember doing
Code:

create 1000
fd 1000

Which wouldn't lag the CPU down too much. Logo was what really got me into programming, because while everybody else was goofing off and playing Oregon Trail, I was making my turtles (they're not dots) do cool stuff. It's great for modeling cellular automata and live things in general, and also an excellent beginner's language, IMO.

Gary Dillard 02-01-2003 08:39

Quote:

Originally posted by Gobiner
Doesn't anyone use Fortran anymore?
I gotta laugh - for my Master's thesis a few years back (OK, more than a few) I had to combine an old optimization code I had written in Fortran with an new analysis code written in C++. It was easier for me to convert the C++ to Fortran than vice versa. I went to Barnes and Noble to get a Fortran book (mine was long since gone), and they looked at me like I was from another planet. Maybe there's a monk scribing them somewhere...

Does anyone remember APL? Even had it's own keyboard with special programming characters.

Ah, I miss punch cards.


OK, the old man will shut up now and go back to running his TRS-80.

EricS-Team180 02-01-2003 08:55

...and remember...its FORTRAN...not fortran:D

rbayer 02-01-2003 12:03

Quote:

Originally posted by Gary Dillard
I went to Barnes and Noble to get a Fortran book (mine was long since gone), and they looked at me like I was from another planet.

You mean they actually knew what the book was about? Wow, I'm truly amazed! :D

VanWEric 02-01-2003 20:03

I recently saw OpenGL running in FORTRAN. That threw me a bit


All times are GMT -5. The time now is 18:19.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi