programming-languages

Is there any language other than Java that will work as ubiquitous on mobile?

I'm trying to write a rogue-like game for my blackberry and hopefully any other phone that supports some sort of JVM. Because I use Java in my job I'm looking to write the game in another language but I cannot find a language that will work on multiple phones. Am I stuck with Java? ...

What would be a good language to implement a naive bayes classifier from scratch?

I would like to implement a naive bayes classifier for spam filtering from scratch as a learning exercise. What would be the best langauge of the following to try this out in? Java Ruby C++ C something else Please give reasons (it would help greatly!) ...

Can a language have Lisp's powerful macros without the parentheses?

Can a language have Lisp's powerful macros without the parentheses? ...

Help understanding Reverse Polish Notation for homework assignment?

I have been asked to write a simple Reverse Polish Notation calculator in C as part of a homework assignment. I'm having difficulty understanding RPN. Can you please help me understand Reverse Polish Notation? Also, any tips on how to approach this problem would be greatly appreciated. ...

What hash/map based programming language exist?

Much like lisp is often considered a list based programming language what languages are considered map based? I remember reading about one a few years back, but can not longer find a reference to it. It looked something like: [if:test then:<code> else:<more code>] edit: and more where quoted code blocks which would be conditional e...

Automatic translation from fortran 90 to f77

Hello Is there an converter from fortran 90 downto fortran 77 ? I have a fortran77 only compiler and want to run NAS Parallel Benchmark (NPB for short) on it. But NPB uses some features of F90, like do enddo, smth else. All features are rather simple. Is there A way to translate NPB to F77 strict language? Tags: fortran parallel conv...

What is "ctr" file extension?

What is "ctr" file extension? Recently I found one site with a file named "create.ctr", what language is that? ...

Simple IF statement question

How can I simply the below if statements? if ( isset(var1) & isset(var2) ) { if ( (var1 != something1) || (var2 != something2) ) { // ... code ... } } Seems like this could be condensed to only one IF statement but am not certain if I'd use an AND or OR ...

Interview question: difference between object and object-oriented languages.

My friend was asked the following question: what's the difference between object language and object-oriented language? It's a little unintelligible question. What does term «object language» correspond to? Does that mean «pure» object-oriented language, like the Wikipedia article says: Languages called "pure" OO languages, because ...

Is there a programming language with no controls structures or operators?

Like Smalltalk or Lisp? EDIT Where control structures are like: Java Python if( condition ) { if cond: doSomething doSomething } Or Java Python while( true ) { while True: ...

PHP: prepared statement, IF statement help needed

I have the following code: $sql = "SELECT name, address, city FROM tableA, tableB WHERE tableA.id = tableB.id"; if (isset($price) ) { $sql = $sql . ' AND price = :price '; } if (isset($sqft) ) { $sql = $sql . ' AND sqft >= :sqft '; } if (isset($bedrooms) ) { $sql = $sql . ' AND bedrooms >= :bedrooms '; } $stmt = $dbh->pre...

Is it possible to avoid global variables in a strictly procedural program?

Being a developer born and raised on OO, I was curious to hear how it's possible to avoid global state in a procedural program. ...

What programming language is FogBugz written in?

From what I've read it appears that FogBugz was originally written in VBScript. Now apparently they use their own custom compiler and language that will translate the source code to more "accessible" languages such as PHP and (I think) C#. Is there a name for this language? What does a hello world look like in it? Is there any hope of se...

Property value of a String object in JavaScript

As far as I understand, every string is an object in Javascript. Still, it "does not work" as I expect it to be: var a="abc"; //here we get a new string object a.b = 123; //I seem to declare a property "b" of that object alert(a.b); //alerts "undefined" However, if I try to define a string in the "wrong way", everything works as...

Why would Mathematica break normal scoping rules in Module?

As was pointed out in a recent post scoping does not work as expected inside of Module. An example from that thread is: Module[{expr}, expr = 2 z; f[z_] = expr; f[7]] (*2 z*) But the following works almost as expected. Module[{expr}, expr = 2 z; Set@@{f[z_], expr}; f[7]] (*14*) What language design consideration made wol...

How is a new programming language actually formed/created ?

Fortran->Algol->Cpl->Bcpl->C->C++->Java ..... Seems like every language is built upon an ancestor language. My question : New languages extend parent ones or there is some kind of a trick? e.g. System.out.print() in Java ; is it actually printf() in C, and so on (printf is actually .. in Cpl)? If so, doesn't this make every further l...

What division operator symbol would you pick?

I am currently designing and implementing a small programming language as an extra-credit project in a class I'm taking. My problem is that the language has three numeric types: Long, Double, and Fraction. Fractions can be written in the language as proper or improper fractions (e.g. "2 1/3" or "1/2"). This fact leads to problems such as...

Cross-Platform Language + GUI Toolkit for Prototyping Multimedia Applications

I'm looking for a language + GUI toolkit for rapidly prototyping utility applications for multimedia installations. I've been working with Max/MSP/Jitter for many years, but I'd like to add a text-based language to my 'arsenal' for tasks apart from 'content production'. (When it comes to actual media synthesis, my choices are clear [Su...

what is the accepted naming convention for int, string, array, list, object, etc...

The company I work for now uses a set naming convention for their C# variables such as iSomeName for int, sSomeName for string, aSomeName for arrays, bSomeName for boolean, dSomeName for datetime and so on. My previous employer did not use the i, s, a, b and d prefixes and just named the variables a good understandable name. My impress...

Winform without .NET framework ?

Hi, I have to create few forms and give it as direct EXE (instead of installer, which installs .NET framework, which the end user is not happy, they want something they can directly open and work). I know it can be done as web, but am looking for winforms? Please suggest which tool/technology can handle this? Thanks, Karthick ...