discuss
Discuss
Other urls found in this thread:
You're not expected to resolve other people's mistakes.
Fuck off tripjeet
>A programming language is a formal language that specifies a set of instructions that can be used to produce various kinds of output.
Sup Forums is not a place to impress your middle school classmate, friendo
>2004
>like making batch files and shell scripts cause it's fucking useful
>can't actually program for shit
>2017
>women in tech suddenly makes me a programmer
I never asked for this
Only non-programmers talk about "scripting languages".
Of course a scripting language is a kind of programming language
A scripting language is a programming language in the same way a recorder is an instrument. It technically qualifies, but you still wouldn't do anything very serious with it.
Found the non programmer
Does "programming language" necessitate Turing Completeness? Or is it just enough to simply be a Turing Machine?
Programming Language - 'An artificial language used to write instructions that can be translated into machine language and then executed by a computer.' Yes.
Not really relevant -- most scripting languages are Turing complete. They can perform any calculation, though not necessarily very efficiently, readably, or maintainably.
Brainfuck is Turing complete, and counts as a programming language. That still doesn't make it useful for anything other than amusement.
No kidding. What the fuck is a "scripting language" even supposed to be? There is no coherent definition that differentiates it from other "kinds" of programming languages. You can write a program that accepts "scripts" in just about any language you can think of.
If you write a program in Lua, is Lua a scripting language? If you write a program in C that exposes functionality with a Lua interpreter, is Lua a scripting language? If you instead use LuaJIT so your processor is running compiled code, is Lua a scripting language then?
If Lua is always a scripting language, are Perl, Python and Ruby always scripting languages too? Is the difference between a scripting language and a programming language compilation vs interpretation? If that's the case, where does JIT fit in? And for that matter, what about languages that have both interpreters and compilers? Is Common Lisp a programming language, or a scripting language? Is Chicken Scheme, compiled to C code then again to machine code, a programming language? Is GNU Guile, also a scheme but designed primarily for embedding in other programs, a scripting language rather than a programming language?
I'd like you to address the above.
A poor definition. Any interpreted language does not count because it isn't translated into machine language and then executed. Java and .NET languages only count if you consider JVM/MSIL bytecode to be machine language.
>They can perform any calculation, though not necessarily very efficiently, readably, or maintainably.
So what's your definition of "scripting language"? Must it be interpreted and have shitty syntax? Is that what differentiates a scripting language from a programming language?
>Brainfuck counts as a programming language
Even though interpreted brainfuck is inefficient and brainfuck code has poor readability and maintainability?
Seeing as readability and maintainability are often down to the skill of the programmer (or scripter...), does a language magically transmute between scripting and programming depending on who's using it? If I write shitty Perl one-liners, is Perl a scripting language? If I write clean well structured Perl code, is Perl now a programming language instead?
>What the fuck is a "scripting language" even supposed to be?
A programming language oriented towards running scripts
>Programming Language - 'An artificial language used to write instructions that can be translated into machine language and then executed by a computer.' Yes.
>A poor definition. Any interpreted language does not count because it isn't translated into machine language and then executed. Java and .NET languages only count if you consider JVM/MSIL bytecode to be machine language.
If I write Common Lisp code and run it with an interpreter, does that make Common Lisp a scripting language?
If I compile that same Common Lisp code, does that make Common Lisp a programming language?
What if my compiled Common Lisp code is eval'ing other Common Lisp code? Is Common Lisp then simultaneously a scripting language and a programming language?
>arguing semantics: the thread
>scripts
You've not defined anything. Define "script". What differentiates a script from a program?
Is it whether it's compiled or interpreted? Is that what you're trying to get at?
Programming language is well defined. "Scripting language" is just some wishy-washy nonsense mostly talked about by "tech people" who aren't actually in tech in any professional capacity. Gamers, and the like.
"Scripting" is a vague colloquial term without any professional meaning.
A script is a program written for a special runtime environment that is usually interpreted, yes.
I'm sorry you're unable to extract meaning from definitions that don't rigorously cover all corner cases, but normal people are able to and nobody is going to bother putting in the effort to rigorously define words that only need to convey simple categorical concepts just to sate your autism.
>t. overzealous 14 year old
Nobody is autistic about semantics or speaks in encyclopedic definitions in professional environment, friendo.
The distinction is the intent of the language and what it's good for doing easily and efficiently. As I said, a scripting language is a programming language, just not one you would make a large and serious program in.
On one end of the spectrum there's Windows batch files. Sure you can do general programming tasks with it, but it's an utter pain in the ass and runs really slowly. Never mind trying to make a large application with many modules that call each other. It's designed for making quick short scripts to automate repetitive tasks.
On the other end there's traditional programming languages like C, C++, Java, etc. If you want to make a large application with many modules, a language in this group is a good choice. But if you want to make a short one-off script to rename a bunch of files, you'll get bogged down in overhead and verbosity, and you'll be recompiling it each time around.
In between are languages that are fine for either, and have various pluses and minuses. For instance, Python is good for anything from scripts that are slightly too complex to do comfortably in Bash, to large GUI programs and web backends. So yeah, there's a lot of middle ground.
Lua? It seems to be geared toward running short scripts, typically inside the context of a larger program, to provide a place to put logic that can be changed without recompiling the main binary.
Python, Ruby, Lisp, Scheme, etc.? They're usually interpreted which makes them more convenient to write scripts in, but they're mostly used for larger programs.
Intent and general use. Is the language intended and usually used to make short scripts quickly, or large programs?
Scripting language is nonsense terminology.
> a special runtime environment
What is that supposed to mean? In the process of another program? On a particular operating system?
Is a bourne shell "script" running written for any POSIX-ish system a scripting language? If so, then is Python also a scripting language by the same token? Is any interpreted language a scripting language, or only some of them?
How does JIT fit into this picture? How do compiled "scripting" languages like QuakeC fit into this dichotomy?
It's nonsense. Anybody who acts like there is some important definition between "scripting" and "programming" is a moron. If you "write scripts", you're programming. Full stop.
A scripting language is:
Any language that has to use an external engine to process text in order to do anything and does not create singular, usable programs.
A programming language is: any language that compiles into lower level code as a singular usable program.
Bingo.
Once you actually understand computer science, you realize only total brainlets use the term "scripting language".
Batch files are not programing, they are interpretive.
>The distinction is the intent of the language
Which intent makes something a scripting language? What sort of intent makes it a programming language but not a scripting language?
I have programs written in GNU Guile, an implementation of Scheme, a dialect of Lisp. They're pure Guile, often using libraries like ncurses through FFI. Are those scripts? Guile's primary "intent" is to be embedded into other programs to expose their functionality in a high level language (scheme) that's easier to write and maintain than C code. An "extension system" as the authors call it. Sounds like a scripting language to me, but it's meant to make code easier to read, easier to maintain and easier to write. That runs contrary to the "scripting languages are are shitty so you wouldn't do serious projects in them" idea.
My R6RS complaint code I run with Guile could be compiled into highly performant machine code using Chez Scheme, another standard-conforming implementation of scheme. So here you have two implementations OF THE SAME LANGUAGE. One interprets code and is meant to facilitate extending other programs (often written in C). The other compiles code into machine code. It's the same language, only the intent of the implementations differ.
Lisp is dynamically typed.
Lisps are used for scripting (AutoCAD, emacs...)
Is (Common)Lisp a programming language ?
>Any language that has to use an external engine to process text in order to do anything and does not create singular, usable programs.
Are Perl/Python/Ruby all "scripting languages" because they don't have compilers?
And what of languages that have both compilers and interpreters?
>it's interpreted, so it's scripting
If Lua is interpreted, that makes it scripting?
What is Lua if it's run using just-in-time compilation? This isn't an obscure edgecase. Lua is a very popular language that is very often chosen for creating extension systems. And LuaJIT is one of the most popular ways to use Lua.
Correct.
It's worth further pointing out that Common Lisp has interpreters as well as some very good compilers. Furthermore very fast compiled Common Lisp programs can interpret other common lisp code.
People who think "scripting" and "programming" are seperate concepts don't seem to comprehend the difference between a language and an _implementation of_ a language.
Interpreted languages can be considered programming languages too.
>BASIC is interpreted
>Scheme can be either interpreted or compiled
Many languages can be used for either scripting or real programming. Python is another example -- plugins are available to script IDA, ZNC, Hexchat, GIMP, etc. using it, but people also write serious GUI programs in it.
What the language is intended to be used as, in a given environment. If you're writing short scripts to chain together a program's functions using Scheme and running it through Guile, that's scripting. If you're writing larger programs in Scheme, it isn't, even if you're running them through standalone Guile (though that last choice may not be the best from a performance perspective).
If you've actually programmed you'll see there's a difference, though just a difference in scale and complexity. You have to keep serious code cleaner and more readable as well, to keep your program from collapsing into a hopeless pile of errors and confusion, while sloppy code is fine in a script sized thing.
Similarly, a walk around the block and a cross-country hike are both walking.
So what does that make scheme? A scripting language, or a programming language? Even if we classify "small glue/extension programs" as scripts, what does that have to do with the language used to write that script?
Is it that a serious programming language can be used for scripting, but a scripting language cannot be used for serious programming? Is that the difference?
>You have to keep serious code cleaner and more readable as well, to keep your program from collapsing into a hopeless pile of errors and confusion, while sloppy code is fine in a script sized thing.
But functionality of programs is often moved into higher level embedded langauge (a "scripting language") for the express purpose of making it cleaner and more readable. The relationship between elisp and emacs is one example of this.
>difference in scale and complexity
Emacs has more elisp code than C code...
What are the ASTs produced by C compilers ?
I'd say programming languages which are traditionally called to be scripting languages are languages used by those who don't work as programmers, but designers, system administrators and such.
>script kids itt
machine code = programming
byte code and shit = scripting
All are programming languages. Some are suitable for serious programming / large projects. Some are suitable for quick short scripts. Some are suitable for both.
Scheme can be used for both, though it isn't frequently used for large projects.
>But functionality of programs is often moved into higher level embedded langauge (a "scripting language") for the express purpose of making it cleaner and more readable. The relationship between elisp and emacs is one example of this.
That is more often for customizability or ease of making changes rather than readability.
>Emacs has more elisp code than C code...
The design of Emacs is fucking insane.
Intermediate data structures on the way to producing either bytecode, asm, or whatever your C compiler is going to output.
This. Often someone can be skilled in making short Bash, batch, awk, AHK, etc. scripts to automate their everyday tasks but couldn't write even a fizzbuzz.
But machine code == bytecode. They're synonyms more or less. Did you mean assembly language?
A language, but arguably not a language that a programmer writes code in directly. Ditto x86, though a programmer may very well write x86 "directly" (actually indirectly) by way of assembly (which I think we'd have to call a programming language.)
Then again no reasonable programmer writes C code by writing down ones and zeros either. They write C code by way of a text editor which writes those ones and zeros encoding ASCII or Unicode C source code for the programmer. In perhaps a similar manner, a programmer writes x86 by giving input to an assembler which produces x86 machine code.
Then you have the matter of s-expression languages and ASTs.... If your ASTs serialize and deserialize to a human readable ASCII format, and a programmer writes code in that format, are they writing the AST itself or merely in a language which is transformed into the AST?
One thing is for certain: people who think that "scripting isn't programming" are morons.
>machine code is byte code
the absolute state of Sup Forums
>>Emacs has more elisp code than C code...
>The design of Emacs is fucking insane.
w.r.t Emacs being writtten mostly in elisp, the design of Emacs is eminently sane. Emacs has it's fair share of insanity in other respects.
>I spend 10 hours writing R6RS compliant scheme code
>at the end of the 10 hours, I observe the state of a radioactive atom and depending on the state, choose:
>Timeline A: I then interpret it, using Guile Scheme
>Timeline B: I then compile it, using Chez Scheme
During those ten hours what was I programming or scripting? Was I in a quantum superposition between programming and scripting, until the moment at the very end when I observe the atom?
That's a fucking stupid differentiation user. If a script file can be ran by an engine, it can be compiled to bytecode. And similarly if a language can be compiled it can be interpreted.
Besides, the only method the popular scripting languages use is by tokenizing and compiling the language into a format it understands, basically using an assembly style instruction set except with high level abstractions like variable assignments
So technically scripting languages are still compiled, just not in a language low level hardware understands
What if my bytecode is an intermediary format, which is compiled into machine code prior to execution?
What if my "machine code" isn't ACTUALLY what my hardware runs? What if my machine runs microcode which the so-called machine code is transformed into prior to execution?
you would call it a bottleneck then
You really are thick, aren't you?
a scripting language is a programming language (and keep in mind that programming languages don't need to be Turing complete, but it's commonly assumed) that's generally geared towards smaller jobs or domain specific applications (eg, batching, user-provided code, code embedded in documents, adding extensibility to a larger program, etc)
it's a fairly informal term (unlike the term "programming language" which is far more easily defined), and it's probably best to use it based on how the code you're writing in it is being used
there is fairly little stopping you from writing a large-scale application in a Turing complete scripting language other than the fact that it might be a pain in the ass (like, you could totally write big programs as Excel sheets with VBA scripts, you'd just have to hate yourself and your users and focus your hate into doing something that ass fucking retarded)
scripting languages that scale well to larger applications (like Python) do exist
Shit like Sandboxed Lua is a scripting language. IIRC that's what Roblox's development platform uses.
github.com
>PicoC is a very small C interpreter for scripting.
Uh oh, looks like C isn't a programming language anymore. Ctards confirmed for dumbass script kiddies.