Technical name for underlining an erratic part of the currently writing code - programming-languages

When we write our code through a programming language like C++, JAVA, etc., the software underlines the problematic part of code upon we are writing that. What is the name of this technology?

Intelligent Code Completion.
Under Visual C++, the technology name is Intelisense. Googling about it leads to the wikipedia article about Intelligent Code Completion.

Related

Are there any other interesting languages frozen in time like Common Lisp?

By that I mean languages where they are stable and the standard has stopped being actively worked on, and they offer something interesting by studying them.
I am not looking for normal imperative /procedural languages that have stopped being worked on (i.e. C-like) unless of course it was something that c is based off like ALGOL.
They can be languages that run on any platform (not just unix/osx/win), it can run on a toaster for all I care, I just want it to be something interesting.
I am looking to be amazed :)
You should check an esoteric languages.
There is a site, esolangs.org that has a huge list of the esoteric languages, an informations about paradigms/concepts, a list of ideas and many more.
From the esolangs.org, the esoteric language is:
An esoteric programming language is a computer programming language
designed to experiment with weird ideas, to be hard to program in, or
as a joke, rather than for practical use.
Here are some examples from that site:
BF - using just a ><+-.,[] symbols
Piet - image as a source code

How to go about making your own programming language? [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Learning to write a compiler
I looked around trying to find out more about programming language development, but couldn't find a whole lot online. I have found some tutorial videos, but not much for text guides, FAQs, advice etc. I am really curious about how to build my own programming language. It brings me to SO to ask:
How can you go about making your own programming language?
I would like to build a very basic language. I don't plan on having a very good language, nor do I think it will be used by anyone. I simply want to make my own language to learn more about operating systems, programming, and become better at everything.
Where does one start? Building the syntax? Building a compiler? What skills are needed? A lot of assembly and understanding of the operating system? What languages are most compilers and languages built in? I assume C.
I'd say that before you begin you might want to take a look at the Dragon Book and/or Programming Language Pragmatics. That will ground you in the theory of programming languages. The books cover compilation, and interpretation, and will enable you to build all the tools that would be needed to make a basic programming language.
I don't know how much assembly language you know, but unless you're rather comfortable with some dialect of assembly language programming I'd advise you against trying to write a compiler that compiles down to assembly code, as it's quite a bit of a challenge. You mentioned earlier that you're familiar wtih both C and C++, so perhaps you can write a compiler that compiles down to C or C++ and then use gcc/g++ or any other C/C++ compiler to convert the code to a native executable. This is what the Vala programming language does (it converts Vala syntax to C code that uses the GObject library).
As for what you can use to write the compiler, you have a lot of options. You could write it by hand in C or C++, or in order to simplify development you could use a higher level language so that you can focus on the writing of the compiler more than the memory allocations and the such that are needed for working with strings in C.
You could simply generate the grammars and have Flex and Bison generate the parser and lexical analyser. This is really useful as it allows you to do iterative development to quickly work on getting a working compiler.
Another option you have is to use ANTLR to generate your parser, the advantage to this is that you get lots of target languages that ANTLR can compile to. I've never used this but I've heard a lot about it.
Furthermore if you'd like a better grounding on the models that are used so frequently in programming language compiler/scanner/parser construction you should get a book on the Models of Computation. I'd recommend Introduction to the Theory of Computation.
You also seem to show an interest in gaining an understanding of operating systems. This I would say is something that is separate from Programming Language Design, and should be pursued separately. The book Principles of Modern Operating Systems is a pretty good starting place for learning about that. You could start with small projects like creating a shell, or writing a programme that emulates the ls command, and then go into more low level things, depending on how through you are with the system calls in C.
I hope that helps you.
EDIT: I've learnt a lot since I write this answer. I was taking the online course on programming languages that Brown University was offering when I saw this answer featured there. The professor very rightly points out that this answer talks a lot about parsers but is light on just about everything else. I'd really suggest going through the course videos and exercises if you'd like to get a better idea on how to create a programming language.
It entirely depends on what your programming language is going to be like.
Do you definitely want it to be compiled? There are interpreted languages as well... or you could implement compilation at execution time
What do you want the target platform to be? Some options:
Native code (which architectures and operating systems?)
JVM
Regular .NET
.NET using the Dynamic Language Runtime (like IronRuby/IronPython)
Parrot
Personally I would strongly consider targeting the JVM or .NET, just because then you get a lot of "safety" for free, as well as a huge set of libraries your language can use. (Obviously with native code there are plenty of libraries too, but I suspect that getting the interoperability between them right may be trickier.)
I see no reason why you'd particularly want to write a compiler (or other part of the system) in C, especially if it's only for educational purposes (so you don't need a 100-million-lines-a-second compiler). What language are you personally most productive in?
Take a look at ANTLR. It is an awesome compiler-compiler the stuff you use to build a parser for a language.
Building a language is basically about defining a grammar and adding production rules to this grammar. Doing that by hand is not trivial, but a good compiler-compiler will help you a lot.
You might also want to have a look at the classic "Dragon Book" (a book about compilers that features a knight slaying a dragon on the front page). (Google it).
Building domain specific languages is a useful skill to master. Domain specific languages is typically not full featured programming language, but typically business rules formulated in a custom made language tailor made for the project. Have a look at that topic too.
There are various tutorials online such as Write Yourself a Scheme in 48 hrs.
One place to start tho' might be with an "embedded domain specific language" (EDSL). This is a language that actually runs within the environment of another, but you have created keywords, operators, etc particularly suited to the subject (domain) that you want to work in.

Platform for creating a visual programming language

I'm interested in creating a visual programming language which can aid non-programmers(like children) to write simple programs, much like Labview or Simulink allows engineers to connect functional blocks together without the knowledge of how they are internally built. Is this called programming by demonstration? What are example applications?
What would be an ideal platform which can allow me to do this(it can be a desktop or a web app)
Check out Google Blockly. Blockly allows a developer to create their own blocks, translations (generators) to virtually any programming language (or even JSON/XML) and includes a graphical interface to allow end users to create their own programs.
Brief summary:
Blockly was influenced by App Inventor, which itself was based off Scratch
App Inventor now uses Blockly (?!)
So does the BBC microbit
Blockly itself runs in a browser (typically) using javascript
Focused on (visual) language developers
language independent blocks and generators
includes a Block Factory - which allows visual programming to create new Blocks (?!) - I didn't find this useful myself...except for understanding
includes generators to map blocks to javascript/python
e.g. These blocks:
Generated this code:
See https://developers.google.com/blockly/about/showcase for more details
Best wishes - Andy
The adventure on which you are about to embark is the design and implementation of a visual programming language. I don't know of any good textbooks in this area, but there are an IEEE conference and refereed journal devoted to this field. Margaret Burnett of Oregon State University, who is a highly regarded authority, has assembled a bibliography on visual programming languages; I suggest you start there.
You might consider writing to Professor Burnett for advice. If you do, I hope you will report the results back here.
There is Scratch written by MIT which is much like what you are looking for.
http://scratch.mit.edu/
A restricted form of programming is dataflow (aka. flow-based) programming, where the application is built from components by connecting their ports. Depending on the platform and purpose, the components are simple (like a path selector) or complex (like an image transformator). There are several dataflow systems (just I've made two), some of them has no visual editor, some of them are just a part of a bigger system, and there're some which don't even mention the approach. (Did you think, that make, MS-Excel and Unix Shell pipes are some kind of this?)
All modern digital synths based on dataflow approach, there's an amazing visual example: http://www.youtube.com/watch?v=0h-RhyopUmc
AFAIK, there's no dataflow system for definitly educational purposes. For more information, you should check this site: http://flowbased.org/start
There is a new open source library out there: TUM.CMS.VPLControl. Get it here. This library may serve as a basis for your purposes.
There is Snap written by UC Berkeley. It is another option to understand VPL.
Pay attention on CoSpaces Edu. It is an online platform that enables the creation of virtual worlds and learning experiences whilst providing a more flexible approach to the learning curriculum.
There is visual coding named "CoBlocks".
Learners can animate and code their creations with "CoBlocks" before exploring and sharing them in mobile VR.
Also It is possible to use JavaScript or TypeScript.
If you want to go ahead with this, the platform that I suggest is the one used to implement Scratch (which already does what you want, IMHO), which is Squeak Smalltalk. The Squeak environment was designed with visual programming explicitly in mind. It's free, and Smalltalk syntax can learned in half an hour. Learning the gigantic class library may take just a little longer.
The blocks editor which was most support and development for microbit is microsoft makecode
Scratch is a horrible language to teach programming (i'm biased, but check out Pipes Visual Programming Language)
What you seem to want to do sounds a lot like Functional Block programming (as in functional block programming language IEC 61499 and other VPLs for mechatronics development). There is already a lot of research into VPLs so you might want to make sure that A) what your are trying to do has an audience and B) what you are trying to do can be done easily.
It sounds a bit negative in tone, but a good place to start to test the plausibility of your idea is by reading Davor Babic's short blog post at http://blog.davor.se/blog/2012/09/09/Visual-programming/
As far as what platform to use - you could use pretty much anything, just make sure it has good graphic libraries (You could use Java with Swing - if you like pain - or Python with TKinter) just depends what you are familiar with. Just keep in mind who you want to eventually launch the language to (if its iOS, then look at using Objective-C, etc.)

Lua, what is Lua? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I read something about Lua today, and I was wondering what it was.
I did a Google and Wikipedia search, I understood it until they began talking about C and API. I still don't understand it.
What is Lua and are there any tutorials for beginners?
Lua is a lightweight interpreted programming language developed in Brazil with a focus on embedding.
It is written in Pure ANSI C which means high portability, even as C++ code.
Here is an example:
print("Hello World!")
Wikipedia Summary
Official Site
I'm surprised everyone is getting this one wrong.
Lua is the Hawaiian word for "toilet".
Lua is a scripting language for C and C++. It allows to use the simpler syntax of Lua and execute these scripts in your C/C++ application. Therefore you don't have to compile the program on each change, but simply deliver a new script version.
For tutorials just use google, you'll find enough to keep you busy the next days.
Lua is a simple lightweight highly portable dynamically typed embeddable and extendable multi-paradigm scripting language. The "vanilla" (some would say official) implementation of it is made purely on ANSI C and has an awesome (simple yet powerful) C API that you can use to both embed Lua on your app or extend the behavior of the language itself. It is developed at the Informatics Department of the Pontifical Catholic University of Rio de Janeiro (PUC-Rio).
Thought it was not primarily designed for that, Lua found a big niche in game scripting, with big names such as "Grim Fandango" and "World of Warcraft". Nonetheless, because of its speed, simplicity and portability, it is also heavily used in embedded systems (see, for example, eLua project) and graphic computing.
Its philosophy is to be minimalistic, i.e its core libraries are very small with only minimum functionality (quite like C's standard libraries), though through the C API it is very simple to add features that wouldn't be possible through the pure core library, such as sockets, GUIs etc. In fact, Lua is so minimalistic that its main -and only- structured data type are 'tables', that could be described as associative arrays on 'roids.
Lua is procedural in its essence, but also supports multiple paradigms such as functional programming and object orientation.
Though Lua is not the fastest scripting language around (probably javascript's V8 project wins the prize) it is very fast (faster than vanilla Python or Ruby, for instance) and also features a non-official just-in-time implementation called LuaJIT.
In the end, Lua is actually no more than a fun language to play with, which I recommend!.
=)
About tutorials, I'd recommend the article about that on the lua-users wiki.
I hope I helped! =)
PS: I couldn't post all the links because I'm new on stack overflow, but it shouldn't be hard to find everything on Google. Sorry. =(
Lua is a scripting language. Link is to lua.org. It is heavily used in game development, most notably (to me) World of Warcraft.
Lua is a lightweight, embeddable scripting language. It's garnered a lot of popularity partly due to it's use in many popular games. A good example of this is World of Warcraft which uses an embedded version of lua to drive the behavior of the UI elements in the game.
A good intro to the language can be found here: http://computer-programming-languages.suite101.com/article.cfm/a_brief_introduction_to_lua_scripting
And the official online reference for the language can be found here: http://www.lua.org/manual/5.1/
It's a scripting language that is designed to work with C (and C++). It is designed to be embedded into C/C++ programs. Which means unlike a lot of other scripting languages, it makes no use of global variables and such, this means you can easily thread lua scripting engines.
It also makes claims about being the fastest dynamic scripting language.
I've made use of it in PC based C++ application for creating a plugin scripting interface, and also used it as a embedded scripting language. Its quite versitile, nice and small.
as a general purpose scripting language? Its not quite in the same league as your ruby/python/perl type stuff. It doesn't have as many libraries and the user community is pretty small.
But for extending C++/C apps? its awesome.
The C API, which looks to be the part that confused you, is designed to make it very easy for you to take existing C code (or new C code) and control it with a Lua script. This is what is meant by embedding. Via embedding, you can get a lightweight, programmable, interactive, text-based interface to any C code, for very little effort. Even if you don't embed things yourself, Lua is a very nice little scripting language.
My favorite example is that a nice person put a great many POSIX system calls into Lua. When I want something that is like a shell script but is more sophisticated, I can just use this library. Likewise with the MD5 library and with many others.
When learning Lua you can ignore the C API completely—just benefit from other people's work with the API—and if you ever need to embed your own code, you can come back to it later.
Lua is a SCRIPTING language written in C and is commonly used in game development because of its power and flexibility. Lua is also cross-platform so it can be used anywhere on any platform. Lua can also be used as a programming language with a handy program I use called AutoPlay Media Studio which allows you to create fully fledged applications for the Windows platform. I hope this clears things up for you.
Website: http://www.lua.org.
AutoPlay Media Studio: http://www.indigorose.com.
Lua is a powerful, fast, lightweight, embeddable scripting language.
Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.
for more you can read here

First programming language after web development? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I've been thinking of making a desktop program but I have no experience in that. I've been programming in PHP, ASP and JavaScript before. Java seems to be nice since you can run it on all OS. But what I really want is result, I do not really care what language makes me a good programmer (I'll take that later in college :P). I've tried both C# and Python before but it was only console applications.
So, what programming language do you recommend to me?
If you want Windows results, C#. If you want cross-platform results, Python.
You could also just pick randomly. Or you could try them all. Or look at the 16 trillion previous questions on this exact same topic.
UPDATE:
To find those questions, I mentioned, try some Google fun:
"what language" OR "which language" learn site:stackoverflow.com
My personal bias would be towards learning functional programming (Scala or even lisp would be nice). But, honestly, any language could improve your skills pretty dramatically at this point. Just take a look at a few of the mainstream ones, and pick the one that suits your interest the best.
For some ideas (not in any particular order):
C - Learning the low-level details of memory allocation can be useful background. If you use Linux, there's tons of sample code in Gnome apps to show you how to write reasonably elegant code in the language.
C++ - C on steroids... there's lots of complexity here if you want to learn it, but it can also be a great language to have in your arsenal.
C#/Java - Nice, high-level, reasonably portable languages. I prefer the C# language over Java, but there are advantages and disadvantages to each (Java portability is better). In the end its just a matter of preference, and external factors (legacy codebases may swing you one way or the other).
Scala - Java on Steroids - Really nice language, but the learning curve can be a bit steep, IMO.
Python/Ruby/Lisp/etc - Nice scripting languages, most of which are easy to learn, and all of which will lead to new ways of thinking about problems.
Honestly, in the end, the most important rule is just to have fun. Look through the basic "hello world" tutorials and just pick the one that looks the most pleasant. Learning never hurts.
I've found that making desktop applications in C# / VB.NET (I'd strongly recommend the former) can be much easier than other languages, particularly with a good IDE such as Visual Studio (or the free Express editions) or Sharp Develop. It will be much easier to get it going on Windows, of course (I don't know much about Mono + WinForms), but I think the easier transition is worth the tradeoff.
Many people have been suggesting low level languages such as C, C++, but frankly I'm not certain that it would be a worthwhile investment of your time. The first programming language I learned was C, from the K&R book, but if I were to teach my son how to program today I would introduce him to python or ruby.
Both python and ruby are very expressive, sophisticated languages that are easy to learn and have an intuitive, english like syntax. By all means do learn about structured programming, and older compiled languages, but initially you'll reap more benefit from learning OO concepts in a high level language.
Java and C# are excellent languages, however they are very tightly coupled with their frameworks, and you may run the risk of getting bogged down learning a framework instead of programming fundamentals.
If you were comfortable in PHP you will feel right at home with Perl, better yet, pampered. You could even turn around and use Perl on the web with your former languages via CGI.
If GUIs is what you're after, C# is your best bet for Windows and Java for other platforms.
If you want result and GUI and you don't care if it's windows only, you probably want C#.
If you want to run on different platforms, you might check out any language on the JVM since they all have access to a pretty powerful GUI toolkit. (Jython, Groovy, Java, ...)
Don't bother with the desktop just yet. Hit the command line.
Get the K&R book and really learn C. You don't know how much you've missed out on if your background is 100% high-level (PHP, Python, Ruby, JS) web dev.
Learn the fundamentals, then raise the bar by going into C# or Objective C.
You can go easy or go hard, go fast or go slow.
Many people say C#, it's nice and can also be used on Linux through mono. On the other hand you can go with C/C++ and maybe Java. You'll have fun with C/C++, learn something and be a better programmer; but it will take time. Java is simpler but "needy". If you want the easiest way to develop a desktop application, you can go with VB or Delphi. Delphi has some advantages over VB which I'm not going to go into here.
My advice would be, if you have time, are willing, and just want to experience GUI, go from low to high, slow to fast, hard to easy. Try assembler, know C/C++, use Java, crack open C# and browse thought VB and Delphi.
In the end maybe you will not create a powerful application, but you will be prepared for college, be experienced and generally "know stuff".
For someone with HTML and Javascript skills Adobe AIR could be the way to go.
It allows you to create a desktop application using HTML/DHTML or if you are familiar with Flex you can also use Flex.
See http://www.adobe.com/products/air/
Go through K&R C. Learn C and you should have a great foundation for learning other languages.
i would say that Java would give a good introduction to desktop apps. I havent had any experience with some of the other languages mentioned here.
You can do some simple stuff in Java with very little headache, as compared to some other languages that require hundreds of lines of code.
Just depends if you have been exposed to OO programming in your web experience
Consider VB.NET (not "classic" vb!) as an easy-to-start-with high-level language that can help you get your foot in the door; then get up to speed with C# as well. The two are interchangable--VB.NET and C# are really just different dialects of .NET.
There's three things VB.NET has going for it over C# for beginner programmers:
VB.NET tends to be a more descriptive (some would say chatty) language
Where C# uses symbols VB.NET will use (slightly) more descriptive words. After a while VB.NET will probably be chatty to the point it annoys you, but by then you should be quite comfortable with .NET and switching to C# will be fairly trivial
Slightly more relaxed syntax
C# will gripe if you leave off parenthesis on method calls, and gripe if you add them to Property accessors--VB isn't quite as picky. It won't let you go haywire with bad syntax (like HTML) but it won't gripe and complain over every little detail
Better pre-compilation parsing
If you work with Visual Studio in both languages you'll notice it will show most compiler errors and warnings for VB.NET right away. C# will wait until you try to compile to tell you that there's errors in your code. The difference isn't huge (C# will warn you for most errors after a delay) but it can be a concentration buster to think you've just pulled off a method and found out it's 10 errors away from compiling (4 of which are because you left the () off a method call).
Once you learn the main features of .NET it's easy to learn the C# equivalency and transition if you want to; and at some point you might decide that VB.NET is a bit too chatty and opt for C# (pretty much what I did).
The only catch to VB.NET is that you should get in the habit of always adding two lines to the top of your code files; they'll help you out immensely in terms of not letting you do stupid things :)
Option Strict On
Option Explicit On
Here's a real short example of the "words vs. symbols"... you'll see there's not much difference other than some brackets in C# and some extra words describing what's happening in VB.NET
Option Strict On
Option Explicit On
Imports System
Imports System.Windows.Forms
<Serializable> _
Public Class MyClass
Inherits SomeBaseClass
Implements SomeInterface
Public Shared Sub DoSomething()
For each item as Object in SomeCollection
Debug.Writeline(item.ToString)
Next
End Sub
Public Sub SomeInterfaceMethod() Implements SomeInterface.SomeInterfaceMethod
MessageBox.Show("Grrblah!")
End Sub
End Class
using System;
using System.Windows.Forms;
using System.Diagnostics;
[Serializable]
public class MyClass : SomeBaseClass, SomeInterface
{
public static void DoSomething()
{
foreach(Object item in SomeCollection)
{
Debug.WriteLine(item.ToString());
}
}
public void SomeInterfaceMethod()
{
MessageBox.Show(#"Grrblah!");
}
}
Try not to fall in the 'must-be-cross-platform' trap. If you're just beginning, that shouldn't be what's on your mind. I can't speak for everyone, but I myself, and I have seen this happen to others, got caught in this early on and didn't get anywhere because I was always trying to find things that were cross platform, and just because they are cross platform doesn't mean they are the best suited for your situation, especially early on.
When you become proficient at a language, you will know how to port and make things cross platform. Don't choose something solely because it is advertised as being cross platform, despite the fact that most languages today are, don't feel the need to ignore other languages that, while not necessarily platform specific, seem to be better on certain platforms, such as C# for Windows and Objective-C for Mac, which are both great languages in my opinion.
If you want to learn something that benefits you in web development as well as in desktop development, I would go with Ruby. You can look into Ruby on Rails for web development. Ruby is also pretty cross platform and you can develop desktop applications with it. There are also various bindings, so for example you can write Mac apps with it and even have access to .Net with Iron Ruby, if need be.
Python is also a possibility.

Resources