Artificial languages for instructing computers to do steps of computation in order to complete tasks. They allow programmers to communicate with computers.
-6
votes
0answers
50 views
What's -> mean?
I have been searching around on Google but doesn't seem like any website explain about this sign. I see this sign a lot especially the language that I learning right now (C)
-3
votes
0answers
24 views
Trying to understand programming and datastructures [on hold]
Can anyone tell me the difference between a normal data structure and an Abstract Data Structure?
When we say if int takes 2 bytes, it has 2 bytes-->16 bits. How did they arrive at the number of ...
-3
votes
0answers
21 views
Steps to make an Erlang based chat?
How do Ejabberd,Xmpp and Erlang interact with each other in a chat application?
0
votes
0answers
94 views
What does “hardcore C programming” really mean? [on hold]
I've seen the term "Hardcore C programmer/programming" used by some programmers specialized in C. Searching online didn't yield any definitions what this adjective really means and how the term varies ...
2
votes
2answers
500 views
What is the difference between if('' == $variable) and if($variable == '') [duplicate]
While using an 'if' statement to check whether a variable is an empty string or not we can write it in two ways i.e. if('' == $variable) and if($variable == ''). I want to know what is the impact of ...
-3
votes
0answers
54 views
Question about the “option” brackets in EBNF (Extended Backus–Naur Form) [on hold]
I want to know what this expression:
A-->a[b]A means.
I know the [] means b is an option,
but does that mean that if I convert it to the BNF it would be:
1-A-->aA|bA
or
2-A-->aA|abA?
-2
votes
1answer
49 views
Improving on data structures skills for working professionals [on hold]
I am java developer, I have 6 years experience. I have completed my mechanical engineering. I have sound knowledge on java, but one of my friend who started his engineering with Computer science he ...
-3
votes
0answers
8 views
incorrect output for set input [migrated]
So I almost have this code correct but it's not giving me the correct output for some reason and I can't figure out why. This is what I have.
That is what I have so far but I need the output to be
...
0
votes
1answer
111 views
Static typing vs. dynamic typing [closed]
I'm developing my own programming language in my spare time as a hobby. It's an interpreted language. Currently the syntax for variables is this:
%<variable> = <value>
Here are some ...
0
votes
1answer
77 views
What are factors to take into consideration in choosing a programming language/paradigm for a rule-based natural-language translation program?
I have experience with object-oriented programming languages (C++ and Java), but I am wondering what kinds of programming languages — including OOP languages– or programming paradigms might be ...
0
votes
2answers
116 views
Finding metrics for development time in different languages [on hold]
I'm trying to determine if a language I'm investigating (Groovy) is better for developing enterprise applications than our current language (Java). Specifically I'm trying to figure out if it will ...
3
votes
2answers
99 views
What is the extent of programming language localization dialects?
Apple's scripting language AppleScript was designed with localization in mind; allowing the language to be represented in multiple dialects resembling languages from around the world.
In this way, ...
0
votes
0answers
13 views
How can I run external code from Squeak environment? [migrated]
As far as I know, the Squeak environment is quite isolated from the rest of the operating system. However, I'm looking for a way to execute external code, which will be written in a different ...
2
votes
3answers
138 views
Find all possible subarrays of an Array
I am lost I just can't seem to get my head around backtracking/recursion approaches. I understand how simple recursion problems like factorials work I can even trace those by hand. But when it comes ...
0
votes
3answers
193 views
How should I “dig deeper” as a web developer? [closed]
I am currently a full-stack web developer working mainly in Ruby/Rails/Javascript. The languages I use on a daily basis (ruby, css, javascript, php) are great, but they are very dynamic, high level ...
1
vote
2answers
121 views
How to abide the “allocate in caller” rule when the size is computed in the callee?
Let's say we have an opaque type handle_t that is managed through a simple interface with functions such as:
handle_t *handle_init(void);
int handle_do(handle_t *);
void handle_free(handle_t *);
...
0
votes
0answers
12 views
Java for loop: why can't I declare two variables in the for loop 'header'? [migrated]
I always wondered, why doesn't this compile?
for(int i=0, int q=0; i<a.length; i++){
...
}
Why doesn't Java allow me to declare more than one variable in the for loop 'header'? Is there a ...
6
votes
2answers
349 views
In layman's terms, what is left recursion?
According to one page on code.google.com, "left recursion" is defined as follows:
Left recursion just refers to any recursive nonterminal that, when it produces a sentential form containing ...
2
votes
2answers
164 views
What properties does an object oriented language have? [closed]
I'm currently working on a game and wanted to add some scripting support. Due to trying to keep the entire codebase in managed c# (Excluding Monogame), I am using a custom language for the scripting ...
2
votes
4answers
482 views
Why aren't we building and using parallel processors *meant* for general computation?
We all know GPUs are much faster than CPUs for a wide range of applications. When someone asks why we are not just programming for GPUs at all, one of the most common answers is that GPUs are not good ...
3
votes
7answers
181 views
What if any languages treat undisposed resources as an error?
I've seen lots of code like the following example. It's in Python, but the same mistake is made in all languages with managed resources:
f = open('foo.txt', 'rb')
for line in f: print line
That's ...
-7
votes
0answers
34 views
How to store pdf files to MySQL and then list, open them using C# [duplicate]
I'm creating a c# employee management system app, I've created a form for Employee files and I don't have any idea how to store pdf files to mysql and then list and open them with c#.
21
votes
5answers
1k views
What specifically does expressive power refer to?
Expressive Power is defined by Wikipedia as:
.. the breadth of ideas that can be represented and communicated in
that language.
Does "ideas" refer to the things (operations, structures, ...
1
vote
3answers
301 views
From a technical point of view, could JavaScript be compiled instead of interpreted?
The question title speaks for itself. I'm specifically thinking in terms of a Node.js server. Additionally, this question is assuming that you don't need eval().
Also, if this is not possible, why ...
4
votes
4answers
597 views
How does Python compile some its code in C?
I read that some constructs of Python are more efficient because they are compiled in C.
https://wiki.python.org/moin/PythonSpeed/PerformanceTips
Some of the examples used were map() and filter(). I ...
-2
votes
0answers
49 views
Languages on embedded systems in aeronautic and spatial sector
I know that my question is very broad but a general answer would be nice.
I would like to know which are the main languages used in aeronautic and spatial sector.
I know that the OS which run on ...
2
votes
5answers
254 views
Do first-class methods exist?
Okay, I know first-class functions are cool, closures even better, etc. But is there any language with first-class methods?
In my mind, I see a first-class method as an "object" that has both a ...
1
vote
2answers
154 views
If there's no problem treating a statement as an expression, why was there a distinction in the first place in some programming languages? [duplicate]
Why do we have the distinction between statements and expressions in most programming languages?
For example, in Java, assuming f and g return ints, this still won't compile because it's a statement ...
1
vote
4answers
128 views
What would you call the concept of CofeeScript or Sass to be? [duplicate]
There is this rising trend with web development of making new pseudo languages to extend the functionality of JavaScript, CSS and HTML given that those are static and their metamorphosis or evolution ...
31
votes
5answers
2k views
What does “context-free” mean in the term “context-free grammar”?
Given the amount of material that tries to explain what a context-free grammar (CFG) is, I found it surprising that very few (in my sample, less than 1 in 20) give an explanation on why such grammars ...
1
vote
2answers
195 views
How do you guard against hidden overflows
consider the following:
(i+j)/2
i and j are both 32 bit integers and the result should also be.
But in the little equation, there's a hidden overflow, i+j could become larger then a 32 bit integer ...
1
vote
3answers
70 views
Property-level value transformation for indirect object casting
Does any programming language exist to support the explicit, property-level object copy?
For example, assume this code:
public class Student
{
public string Name { get; set; }
public ...
1
vote
1answer
140 views
Hardware-control on one computer. But how about several?
For a while I have been pondering the question of, given a standard interface specification, whether there is a way to allow multiple programs to control multiple hardware devices across the network. ...
-3
votes
1answer
302 views
Why is the JavaScript-language different in different programs/sites? [closed]
I'm kind of new to programming and i have a question that's been bothering me for awhile.
Why is the JavaScript-language different in different programs/sites.
I've used Codecademy to practice and ...
4
votes
1answer
166 views
How should I recursively process a file in Haskell?
Basically I'm expanding a literate program in Haskell. There are two things I need to look for to expand. Here's an example file:
program.c.lit:
==============
Some comments in the source file that I ...
4
votes
4answers
311 views
Which language introduced the idea of private (hidden) variables? [duplicate]
I know C++ had private variables inside classes, and Java, C#, Javascript, and others picked up on that and ran with it. Aside from variable scope, most languages before that just made everything ...
1
vote
1answer
122 views
what is a language specification?
Either I am being a total n00b or just not with it today but I have been reading a few blogs lately and they talk about language specs. What actually is a language spec? Is php.net a language spec? ...
5
votes
3answers
252 views
Declaring variables in Python and PHP
The question is how to cope with absence of variable declaration in Python, PHP, and the like.
In most languages there is a way to let the compiler know whether I introduce a new variable or refer to ...
11
votes
11answers
3k views
Can a closed-source programming language survive? [closed]
A friend has written a programming language. It has a syntax reminiscent of SGML. He has written an interpreter for it, and an IDE. He and his colleagues use it in-house as a server-side language. It ...
3
votes
5answers
861 views
Does this kind of programming language exist?
I'm thinking about creating my own pet programming language, and I have been wondering if similar language already exists.
The basic idea is that the language itself would be dynamically typed with ...
6
votes
7answers
692 views
Why isn't there a next operation on enums?
In most popular programming languages like Java and C# there is a way to define enums, which are essentially datatypes with a fixed set of values, e.g. DayOfWeek.
The problem is, given a value, e.g. ...
28
votes
5answers
3k views
Why do some functional programming languages use a space for function application?
Having looked at some languages for functional programming, I always wondered why some fp-languages use one or more whitespace characters for function application (and definition), whereas most (all?) ...
1
vote
2answers
132 views
Can a version of Python's shelve module that knows when its entries have been modified be written in any programming language?
shelve is a Python module that makes it easy to persist a Python dictionary to disk (under the right conditions).
The documentation for shelve gives this example to demonstrate one of the pitfalls of ...
28
votes
6answers
3k views
Why isn't testing a language a supported feature at the syntax level?
You can find an endless list of blogs, articles and websites promoting the benefits of unit testing your source code. It's almost guaranteed that the developers who programmed the compilers for Java, ...
4
votes
1answer
326 views
How do programming languages integrate with OS runtimes
For example, Objective-C, Swift and Ruby (i.e. RubyMotion) integrate with the Cocoa framework.
Is this done via linked libraries? I assume they call functions in existing binaries instead of simply ...
0
votes
3answers
166 views
is there any language that supports automatic evaluation of input expressions?
I'm wondering if anyone knows of a language that supports automatic-evaluation.
(not sure this is the right term. so let me describe what I mean below)
For example, a program asks for an int as its ...
2
votes
2answers
284 views
What are the benefits of learning an old programming language? [duplicate]
I plan to learn programming languages like C and AWK since a lot of people said that what I will learn in C can be applied to a lot of modern programming languages and I plan to learn AWK because I ...
-1
votes
2answers
182 views
Is PHP the only popular language that mixes simple and associative arrays into a single type? [closed]
I'm doing a research on PHP and wondering if there any other commonly used programming langues that use an associative array for both simple indexed element storage and key-value functionality. Does ...
1
vote
2answers
281 views
is JS a gradually typed language?
I was researching on statically typed and dynamically typed concepts and found out there is another type system called gradually typed.
From wikipedia
Gradual typing is a type system in which ...
-1
votes
1answer
160 views
All programming functions always return to the If or If/Else statement? [closed]
After learning, coding, and coding even more than ever now, I have noticed a trend in a lot of programming which I do. The trend is that the majority of my functions are if{} or if{} else{} statements ...