PDA

View Full Version : What language do you use to most?



recons
04-07-2005, 08:43 PM
Which language do you use the most?

I use C/C++.

bh2k
04-07-2005, 08:45 PM
PHP or Perl

craig588
04-07-2005, 10:04 PM
Not quite sure, either ARM ASM (Not X86 ASM) or C. I'm probably going to be forced to learn MIPS ASM eventually though and that might take priority over ARM ASM.

I don't program stuff for computers, just for portable devices. (PDAs and game consoles)

Ackbar
04-07-2005, 10:10 PM
It depends what type of project I'm working on at the time, but at the moment I use Matlab the most. Before that, there were times I've exclusively used C++ or Python. For me, it's probably a tie between C++ and Matlab.

shadowing
04-07-2005, 10:22 PM
z80!! :)

smokey
04-08-2005, 04:56 AM
I stick to the UNIX shell tools (bash/sed/awk/minimal perl) and C. I voted for 'Other'... no shell options? Bah! :slap:

faruquehabib
04-08-2005, 05:20 AM
have had classes in C++, VB, and M$ SQL Server, but I think VB is the coolest to play with because of the graphical interface :D

matt9669
04-08-2005, 06:48 AM
C/C++ all the way, been doing it for years :up:

Also just FYI "Assembler" is the name of the compiler, it's officially called "Assembly language" (OK blame that last part on my anal prof :lol: )

bh2k
04-08-2005, 10:53 AM
What is assembly code really used for? Isnt it for telling machine's how to operate?

_Eduard_
04-08-2005, 10:53 AM
VB

lol @ 3 character minimum requirement

recons
04-08-2005, 11:15 AM
What is assembly code really used for? Isnt it for telling machine's how to operate?
Divice drivers, (think BIOSes) and embedded systems.

Assembly is just a easier way to write machine code.
http://en.wikipedia.org/wiki/Assembly_language

D_o_S
04-08-2005, 11:32 AM
I use C/C++ a bit, but not too much.

Crankster
04-08-2005, 11:32 AM
You can code an entire os in assembler. It will be machine specific. Totally.
Very fast and small tho.

masterofpuppets
04-08-2005, 04:02 PM
Coding an entire OS in Assembly is a bit over-the-top. Maybe code the base with Assembly and the rest in C (Linux style).

And to answer the question, X86 ASM. Tried other architectures but don't use them on a daily basis so I have become accustomed to programming for X86.

matt9669
04-08-2005, 04:10 PM
What is assembly code really used for? Isnt it for telling machine's how to operate?Assembly language is the lowest level code in common use for programming microprocessors and microcontrollers. It consists of simple mnemonics for operations, such as LDAA, STAA, BRA, JSR etc. Such code primarily adds, multiplies, stores and moves bytes, higher-level program structures such as branches and loops require a few lines of code as compared to a simple C++ "for" loop. Whereas operations in a C-level language rarely require you specify the exact memory address, and easily use the whole of the system memory, most assembly operations require specific memory addresses and are limited to values stored in the processor's registers.

This is the Motorola 68HC11 we use in class: http://www.freescale.com/files/microcontrollers/doc/ref_manual/M68HC11ERG.pdf

One of the jobs assembly code is commonly used for, especially in small 8-bit or 16-bit microcontrollers, is for automobile timings - the chip can be programmed to wait a given number of clock cycles as a timing reference, which gives the precision and accuracy needed for these types of applications.

The one key problem is that assembly code isn't portable - instructions are processor specific and programs written for one processor will not run correctly on another, even the opcodes (the actual numeric values for each mnemonic) can change from chip to chip. A C++ or Java program, however, will run on a 8bit Motorola HC11 or a 64bit A64 with the right compiler. However, assembly produces the fastest possible and smallest program for a given architecture, provided the programmer is good - even basic assembly programs are not easy to write, there are no safeguards and you have to know exactly what the processor is doing at all times.

shadowing
04-08-2005, 05:53 PM
I like assembly... Fast and great :) Now if only we could make it portable :(

sjohnson
04-08-2005, 06:21 PM
shadowing - assembly is portable (kind of ;) )

Code in C, or any language that has seperate compiler and assembler. Compile the code on the target machine, then hand-tweak/optimize the resulting assembly code.

I've never done it on a large scale, but even efficient compilers can't see the whole picture the way a developer can, so compiled code is rarely as efficient as it could be.

bh2k
04-08-2005, 06:25 PM
So given by what matt said it seems assembly is not at all OOP based? Or is it very limited in it's OOP based functions? Beacuse I know I've created OOP based programs in PHP and Perl that I can carry over to basically any OS or server by just changed 2 or 3 variables.

sjohnson
04-08-2005, 06:45 PM
At its simplest, assembly language is a collection of mnemonics for every instruction built into the CPU. I'm not being exactly precise, but

Assembly for an x86 is by definition different than assembly for a SPARC or PPC cpu because their instruction sets are different.

A compiler is able to take some abstract (abstract to the CPU, that is) code like VB and turn it into the mnemonics that represent the actual CPU instructions.

An assembler can read those mnemonics and emit the binary 0's and 1's that get fed to the CPU to cause it to execute the program written in the abstract language.

A link editor fixes up that stream of 0's and 1's so that they make proper use of the system the program is to run on.

If you code in assembly language, you have to do everything. You can't simply declare an integer and assign a value to it, you must understand how the CPU addresses memory, what instruction(s) the CPU can use to manipulate integers, and a lot of other tasks.

Again, apologies to assembly language programmers, I've tried to keep this simple so it's not strictly accurate.

bh2k
04-08-2005, 06:50 PM
So basically coding in assembly is a matter of understanding how the set piece of hardware will understand your commands before even starting?

sjohnson
04-08-2005, 07:14 PM
So basically coding in assembly is a matter of understanding how the set piece of hardware will understand your commands before even starting?
That's one way of looking at it. From http://www.uni-giessen.de/faq/archiv/assembly-language.x86.general.part1-3/msg00000.html
Subject: 4. What Is Assembly Language

4.1 WHAT IS MACHINE LANGUAGE?

Although programmers tend to use C or C++ or Pascal these days, the
language closest to the PC hardware is machine language. Not one second
during a PCS powered on lifetime passes where the computer is not
executing machine language.

4.2 ASSEMBLY LANGUAGE OR MACHINE LANGUAGE

To word this simply, you can say that say that assembly language is a
human-readable text, and machine language is machine-readable binary
code. When you program in assembly language, you are programming on the
machine language level.

To program directly in machine language is tedious, so you use assembly
language instead, and use an assembler to produce the actual machine
code.

matt9669
04-08-2005, 07:56 PM
If you code in assembly language, you have to do everything. You can't simply declare an integer and assign a value to it, you must understand how the CPU addresses memory, what instruction(s) the CPU can use to manipulate integers, and a lot of other tasks.A good way to look at it - the 8bit microcontrollers that I work with have six memory addressing modes: inherent, immediate, direct, extended, indexed and relative. The way the code is written implies the addressing mode used, the assembler figures it out. Assembly language is quite nearly machine code, written in hex, mnemonics and with comments.

There are no objects in assembly because you are working with raw numbers and memory addresses. You can write code that behaves in an OOP fashion but just as processors work sequentially, so do assembly and machine code, they have no higher-level structure beyond what you give them.

Mangar
04-08-2005, 07:59 PM
I am an OLD programmer, I use RPG IV ILE and Oracle Sql+ please don't bash me because I am an old-timmer :p:

sjohnson
04-08-2005, 08:21 PM
How about Fortran, PL1, COBOL, lisp, snobol, Forth for old languages? :D I've forgotten some others :oldmandrool: I hated lisp. Just can't think that way.

C is my favorite. And UNIX as the target platform. C++? Python does a better job unless you really take the time to write optimal classes.

I still document best in nroff/troff. A document prepared in troff looks like a program prior to "compiling" it into a printable document. And it still has arguably the best table generation of any document system via tbl.

bh2k
04-08-2005, 08:51 PM
I'm still stuck in PHP Perl and JSP, those are the languages I'm best at really. Assembly code sounds very interesting though.

craig588
04-08-2005, 09:00 PM
ASM is very useful for limited systems. When you have a computer with a few MB of memory and a CPU running at a few hundred MHz it begins to loose its uses. When you have a system with 256K of internal memory with a processor than runs at 16MHz then you really see differences between writing a app in C or writing it in native ASM.

recons
04-09-2005, 04:18 AM
ASM is very useful for limited systems. When you have a computer with a few MB of memory and a CPU running at a few hundred MHz it begins to loose its uses. When you have a system with 256K of internal memory with a processor than runs at 16MHz then you really see differences between writing a app in C or writing it in native ASM.
Size wise, ASM does have an advantage, but well written C can be just as or very close to ASM when it comes to speed.

masterofpuppets
04-10-2005, 11:23 AM
Let me just say to people who think PHP, VB, JSP etc etc are programming languages.. they are NOT. They are scripting languages. Scripting languages must be parsed by a program at runtime, whereas programming languages must be compiled prior to runtime.

sjohnson
04-10-2005, 12:04 PM
Disagree - code that must parsed at runtime is in the class of interpreted programming languages.

Code that mut be compiled prior to execution is in the class of compiled programming languages.

You can have both classes covering the same language. BASIC has both interpreted and compiled versions. Long ago, Dr. Dobbs journal provided Tiny C, a subset dialect of C that ended up with both interpreted and compiled versions.

How the execution of a program is effected has no bearing on the definition of a programming language.

http://dictionary.reference.com/search?q=program
http://www.webopedia.com/TERM/P/programming_language.html
http://www.answers.com/topic/programming-language
http://encyclopedia.laborlawtalk.com/User:K.lee/Programming_language_rewrite
Google has many more.

SLaY3r07
04-11-2005, 03:52 PM
VB

Anybody ever used Scheme? My God, I totally hated that piece of crap.

matt9669
04-11-2005, 08:18 PM
Anybody ever used Scheme? My God, I totally hated that piece of crap.Scheme? Pray tell, what is it?

agent #2
04-12-2005, 11:15 PM
Java here.

Quanticles
04-13-2005, 01:45 PM
I just helped C/C++ pull out in front =P

matt9669
04-13-2005, 01:46 PM
I just helped C/C++ pull out in front =P :woot:

redgoo
04-14-2005, 09:16 PM
I can't believe I'm only the second person to vote Python.

FOIS
04-15-2005, 04:00 PM
I use VB.Net aswell as C# and it's incredibly easy to use compared to C++/VB.

craig588
04-15-2005, 06:08 PM
Eww, .Net.

matt9669
04-15-2005, 08:12 PM
I use Visual Studio .NET to compile C++ projects . . . :ROTF:

craig588
04-16-2005, 12:07 AM
Why? It's like using MS java, there's no real benefit and it adds lots of bugs.

FOIS
04-16-2005, 01:53 AM
Microsoft has taken a huge leap towards compatiblity like Java has with .NET. And .NET is so much easier with web controls for easy data display, page gets compiled for rapid execution etc. There's almost no need for Active X controls anymore with .Net for web development. :woot:

craig588
04-16-2005, 02:01 AM
There never was a need for active X.

matt9669
04-16-2005, 10:09 AM
Visual Studio .NET (the code development software, not the .NET API) is very comprehensive, support includes C/C++, C#, Java, J#, Visual Basic; compiling, linking, debugging, resource management - the software package came with my programming class, why should I buy something else?

masterofpuppets
04-16-2005, 10:45 AM
Just use a Unix OS and the GCC set. Both are free!

cpuz
04-16-2005, 03:08 PM
C++.
I wait for Visual Studio 2005 with lot of impatience.
Should be there in june, AFAIK.

recons
04-17-2005, 12:35 PM
Just use a Unix OS and the GCC set. Both are free!
What *nix are you running? (Unix is normally not something people run, because its too expensive, so are you using BSD, Linux?)

smokey
04-18-2005, 02:51 AM
Personally, I run Solaris 9 at work, Free/OpenBSD and Slackware at home. I use C (gcc) for writing drivers on occasion, but perl/shell/php are my preferences; as they are ubiquitous in my environment and my coworkers know them as well as I. Not all of them know C very well.

masterofpuppets
04-18-2005, 12:10 PM
Debian (GNU/Linux 3.1. Custom kernel from Debian 2.6.8 sources with custom patches) and FreeBSD 5.3.

eshbach
04-18-2005, 12:26 PM
Visual Studio .NET (the code development software, not the .NET API) is very comprehensive, support includes C/C++, C#, Java, J#, Visual Basic; compiling, linking, debugging, resource management - the software package came with my programming class, why should I buy something else?


I agree with this. For 90% of the programming I do i use Visual Studio .NET.

on the other hand, for the Xtreme Analysis Benchmark, i'm using a much more generic C++ compiler.

I think .NET is very nice for the developer, but until the framework is a gauranteed standard on every desktop, it really isn't that useful for applications that need to be distributed to large groups of people with varrying operating systems and software packages.

saratoga
04-18-2005, 04:42 PM
This is the Motorola 68HC11 we use in class: http://www.freescale.com/files/micr.../M68HC11ERG.pdf


Sup HC11 buddy :cool:

W1zzard
04-25-2005, 01:47 PM
php for web stuff, c++ for everything else, applications which are trivial or prototypes in c#