Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   What Do We Really Program? (http://www.chiefdelphi.com/forums/showthread.php?t=18542)

Jeremy_Mc 25-02-2003 13:16

There is no debate...

scripting is scripting for all it is.

there is a big difference between scripting languages and programming languages. until the 32 bit version of visual basic 4, vb was a scripting language that only compiled to p-code. java has to have the VM to be interpreted. it's the same concept as someone who writes mirc scripts. you need mirc to interpret them. same concept as perl, php, bash, etc etc. they may be commonly referred to as programming languages, but they are anything but. programming languages compile to native code that can be independently interpreted.

let's not turn this into a flame thread.

you can find plenty of other threads on other boards about this and countless web pages.

*jeremy

DougHogg 25-02-2003 13:21

Quote:

Originally posted by Jeremy_Mc
PBASIC isn't compiled to native code. That's programming.

PBASIC is interpreted so it's a scripting language, similar to JAVA in that they both are tokenized into byte code and then interpreted.

*jeremy

For quite a while after the BASIC programming language arrived on the scene, all the different versions of it were interpreted. Of course, the programs were interpreted into machine language. The only difference between them and a compiled language was that a program was converted to machine language every time it was run, instead of once when it was compiled.

Anyway, it is just semantics. Per my definition, if you are controlling a computer with some text which includes a series of steps and possibly loops and branches, you are programming it.

However, it is also clear to me that someone else could be operating on a different definition which would be equally valid.

Joe Johnson 25-02-2003 13:48

PBASIC meets my definition
 
For all we complain about PBASIC, I don't know any reason why it should not be considered a programming language, albeit a quirky, picky, insanely limited and insanely powerful one.

Most of my problems with PBASIC have to do with the hardware implementation not the lanquage itself.

I have learned to live with 16 bit unsigned math, what kills me more is lack of RAM space for variable (Scratchpad RAM and EEPROM space are poor subsitutes) and the lack of an interrupt mechanism to respond to time critical tasks.

Other than that life would be pretty much the same using anyother language.

Just my two cents.

Joe J.

P.S. I think that the best case scenerio for FIRST would be to hook up with Matlab/Simulink (by MathWorks). You cannot believe how powerful some of the "programming" you can do with Mathlab/Simulink's blocksets. Essentially, they take programming down to moving blocks around and connecting things with arrows (while still allowing all the power of the native hardware AND while generating solid C code).

Many folks (including yours truly) believe that autocoding with systems like Matlab/Simulink will replace hand coding of nearly all embedded programming in the automotive world in about 5 years. You heard it here first ;-)

rbayer 25-02-2003 14:04

First, PBASIC is compiled. The byte code that it creates is run by the Stamp chip in exactly the same way that compiled C code is run by your processor. This is the purpose of the tokenizer and the Stamp editor. Nothing more, nothing less.

Second, just because a language is interpreted doesn't mean it's not a programming language. Some excellent examples of "interpreted" languages: Java, Scheme, Perl, PHP, JavaScript, ASP, etc. Yes, some of these languages are more "interpreted" than others, but the point still stands. Whether a language is interpreted or compiled has nothing to do with the language itself and everything to do with how it's implemented. Heck, you could run an interpreted version of C if you really wanted to.


Back on topic: C++ is my life. The rest is just details. Well, almost. I also love Scheme and will occasionally touch a little x86 assembly when necessary. I've played around with PHP, JavaScript, Java, and a few others, but haven't really done any "big" projects with anything but C++.

MikeDubreuil 25-02-2003 14:37

Quote:

I have learned to live with 16 bit unsigned math, what kills me more is lack of RAM space for variable (Scratchpad RAM and EEPROM space are poor subsitutes) and the lack of an interrupt mechanism to respond to time critical tasks.
I have been programming in FIRST for 4 years and never had a problem with not having interrupts until this year. Its almost impossible to detect the white line at high speeds. The data just comes and goes before the Stamp asks for it.

Quote:

Many folks (including yours truly) believe that autocoding with systems like Matlab/Simulink will replace hand coding of nearly all embedded programming in the automotive world in about 5 years. You heard it here first ;-)
Oh my God! I cringe while watching the programming scene in Swordfish. And to think that's actually the future!

Adam Y. 25-02-2003 15:58

Quote:

insanely limited and insanely powerful one.
Errr how can something be limited and powerful at the same time??

Jeremy_Mc 25-02-2003 16:15

Quote:

Originally posted by rbayer
First, PBASIC is compiled. The byte code that it creates is run by the Stamp chip in exactly the same way that compiled C code is run by your processor. This is the purpose of the tokenizer and the Stamp editor. Nothing more, nothing less.

Second, just because a language is interpreted doesn't mean it's not a programming language. Some excellent examples of "interpreted" languages: Java, Scheme, Perl, PHP, JavaScript, ASP, etc. Yes, some of these languages are more "interpreted" than others, but the point still stands. Whether a language is interpreted or compiled has nothing to do with the language itself and everything to do with how it's implemented. Heck, you could run an interpreted version of C if you really wanted to.

I can see your point, but this is just my take. Many people think JAVA is a scripting language (including me). PBASIC works very similarly. PBASIC is to JAVA as STAMP Chip is to JVM.

By your definition, JavaSCRIPT is a programming language. Also, by your definition, scripting languages don't exist. Only interpreted programming languages...which is pretty much a fancy way of saying scripting language. It's all the same. The only difference is implementation. Scripting languages are use where complex data structures aren't used and slow execution time is not a problem. Systems programming languages are quite the inverse.

I didn't mean to take away the focus of this thread. I just wanted to share my take on things.

*jeremy

Rickertsen2 25-02-2003 16:21

I think that Pbasic is a "real" programming language.... Just not as "real" as c++

MikeDubreuil 25-02-2003 17:04

Quote:

By your definition, JavaSCRIPT is a programming language. Also, by your definition, scripting languages don't exist. Only interpreted programming languages...which is pretty much a fancy way of saying scripting language. It's all the same.

Javascript is a programming language.

We are discussing the definition of programming language. In my mind programming language is a broad term to describe all methods of commanding a computer to follow a procedure. This means that using the GUI to program your Mindstorms kit is programming language (including Dr. Joe's automotive programming).

A scripting language is a programming language in which it must be intrepeted at runtime before turning into machine code.

EbonySeraphim 25-02-2003 17:15

My Take On Things
 
As if it mattered more than anyone else...

PBASIC of course is a programming language. I don't care what a scripting language or compile language is, as long as a computer reads it. Also, any scripting language could be compiled if someone wanted to make one, it would just loose portability(someone scream at me if I'm wrong). Some made a comment earlier about PBASIC being limited and powerful. I would have to strongly disagree. A good comment can be made to just about any programming language, though PBASIC has some things that are made easier to handle than other languages,(I can't really think of any, but I'm sure there is something) it isn't really powerful at all. It only has basic and crappy methods of calling sub routines with no built in way of returning values or passing parameters, no real "stack", and memory management. Of course all of that isn't really needed for a robot, but if it was available, I would have done something so much more powerful for the robot.

I wanna know if anyone is using C#? I picked up some books on it a while back and found it to be a good programming language thats great for creating windows applications, and is still maintains low level options. There is an "unsafe" keyword that lets you do certain things that are generally prone to error like pointer management(I think). Also it has some XML support. It seems like an all around good language for Web Development, Application Development, and even decent for games. All under the .NET standards. I think C# would be the next language I would learn if I decide to move on anytime soon. Then I could say I program in "C/C++/C#."

rbayer 25-02-2003 17:19

Quote:

Originally posted by Jeremy_Mc
I can see your point, but this is just my take. Many people think JAVA is a scripting language (including me). PBASIC works very similarly. PBASIC is to JAVA as STAMP Chip is to JVM.

In that case, you could also say that C is interpreted because it is compiled (on my machine at least) down to x86 assembly which is then interpreted and run by the processor. The relationship of PBASIC to the Stamp is nothing like the relationship of Java to the JVM, unless you want to include the relationship between C and an x86 processor as being in there too. Also, VB wouldn't qualify as a programming language either by your definitions as it is "interpreted" (kinda, the relationship is really complex) by Windows. Same goes for just about any other language out there. I'd like to know what you consider to be a "real" programming language as I'm not sure any of the currently used ones would qualify based on your definitions.

By my definition, scripting languages do exist--they're just a subset of programming languages.

Jeremy_Mc 25-02-2003 17:52

Quote:

Originally posted by rbayer

By my definition, scripting languages do exist--they're just a subset of programming languages.

ok, we'll assume my definitions are completely wrong.

what do YOU consider a scripting language? and how do they differ from what you consider a programming language?

i'm not seeing how they can possibly be any different from what you say is an interpreted programming language

*jeremy

Jnadke 25-02-2003 18:38

Quote:

Originally posted by Jeremy_Mc
I can see your point, but this is just my take. Many people think JAVA is a scripting language (including me). PBASIC works very similarly. PBASIC is to JAVA as STAMP Chip is to JVM.

I didn't mean to take away the focus of this thread. I just wanted to share my take on things.

*jeremy


You're right, and wrong.


While it can be debated whether interpreted languages are real programming language, JAVA is actually a compiled language.

It's actually compiled to a machine code called BYTECODE, which was originally designed to run on a specialized processor for controlling kitchen appliances. SUN took the easy route and made an interpreter so it could be run on many other processors without having to be re-compiled.



To me, I consider interpreted languages as real programming languages. Eventually it all ends up in the same place, as machine code. The process it goes through, however, is different. Interpreted languages tend to be easier to store than compiled languages. However, they tend to be slower to execute.

Jeremy_Mc 25-02-2003 18:41

Quote:

Originally posted by Jnadke
You're right, and wrong.


While it can be debated whether interpreted languages are real programming language, JAVA is actually a compiled language.

It's actually compiled to a machine code called BYTECODE, which was originally designed to run on a specialized processor for controlling kitchen appliances. SUN took the easy route and made an interpreter so it could be run on many other processors without having to be re-compiled.

aye yes. holy crap how could i forget the kitchen appliance idea *shudder*

i can see where java would be compiled...but i don't see where many other languages that were mentioned are not scripting (php, asp, perl, and javascript in specific)

maybe i'm just severely confused or misinformed, but i'm pretty sure those aren't programming languages in their purest sense

*jeremy

rbayer 25-02-2003 18:48

Quote:

Originally posted by Jeremy_Mc

what do YOU consider a scripting language? and how do they differ from what you consider a programming language?

When I think of scripting languages, I think of scripts. :D

Basically, a scripting language is (usually) a language (yes, it is still a language) used to automate tasks. Common examples: AppleScript, sh (*nix), AutoCAD scripts, etc. Scripts are often used inside larger programs to simplify some elements of the program. For example, many computer games use a proprietary scripting language to control character actions, etc. I consider these to be scripts because they are used to provide support for an existing program, much like AppleScript provides quick support for Macs.

Where JavaScript, etc differ is in that the programs you write with them aren't designed to automate tasks/make life easier.

One interpreted language that I don't consider to be a scripting language (and I hope nobody else does either) is Lisp/Scheme.

Anyways, I do consider scripting languages to be programming languages. Again, they're just another subset. For me, "programming language" encompasses just about anything that is a set of instructions for the computer to follow. Compiled, Interpreted, Scripting, and just about everything else falls under this definition in my opinion.


All times are GMT -5. The time now is 14:28.

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