Categories
Uncategorized

Google APP Engine: Next Java?

The Google App Engine service currently supports Python as its only runtime language. In its official Google groups, people have been asking what?s going to be the next runtime. A question for curious minds, a point for the Google lovers to ponder. I have been using the App Engine (http://masnun.appspot.com) lately and found the service really cool. They make us all feel like being Google engineers by letting us build web apps on the same infrastructure they themselves use. That means your web app will use the same legendary (!?!) Bigtable and GFS that is used by google. But at the moment you have to build the app in Python. I have been interested in Python for a long time but never had the time to check it out. Now with App Engine, I am learning python at last. But I would prefer Java to Python. I am a BBA student and I cannot dedicate much time to programming. I want to emphasize on a single language for all my needs:
# building web sites
# building desktop app (cross platform)
# building command line apps
# building mobile phone softwares and games
I admit that Python could be used for all these needs. But Java feels cooler to me. Especially the Swing bit of thing. The desktop apps built in Java are easily portable and looks great on all OS. Java definitely has great portable libraries more in number than Python. The only thing I would miss in Java is the scripting ability. But for that I would always have Python and PHP at my disposal. But I am really looking forward to learning how to build web sites in Java. It?s really a pain to find a reliable free Java host. So I would very much want Java to become the next runtime environment for GAE so that I can try it free. I have enjoyed building sites with GAE using python. I do believe that the Java experience would be cool too.
Like many people out there, I have been wondering what languages will come to GAE. Here?s my bet:
1. Java
2. C++
3. Ruby
4. PHP (If it really comes).
Note that Java, C++ and Python are the three official languages at Google. Now that they have already introduced Python, they will roll out the other languages in the project too. In that case, Java should get higher priority because Java is more popular and common than C++. Its OO nature is probably more matured than CPP. But I won?t mind if they introduce C++ first.
It would be of course nice if they introduce PHP too, but the controversy about PHP?s scalability and coding style can be a point to consider.

Categories
Uncategorized

Scripting with C

Normally scripting refers to the interpreted languages. You write a script that gets interpreted during runtime by interpreters. Python, PHP and Perl are some of the prominent scripting languages. On the other hand, with compiled languages the source code is first compiled then linked to related libraries and finally built into executables or other runtime components. C is a very good and well known example of compiled languages.

Interpreted languages are easy to debug because of their interpreted nature because code execution stops only when it encounters a bug. On the other side, with compiled languages the entire source is compiled before execution. Again, the same problem goes with prototyping. You make a change and go through the usual compile-link-build cycle over and over to reflect the changes. But with interpreted languages, changes in your scripts are immediately reflected in the next run.

C being a compiled language hardly supports scripting. Note that word, yeah, “hardly”, because we can script with C. How? Read on.

C source codes need to be compiled using compilers. You will find a good enough numbers of them to confuse you to decide which one to use. The GCC (GNU C Compiler) is one of the most popular. But the magic I am describing can be performed with a GCC like compiler that is somthing more than cool. The compiler is named TinyCC (aka TCC). It’s a hyper fast compiler. You can use it like a C interpreter to execute C codes on the fly like a script.

EXAMPLE:

How to Run?:

  1. Save the file as “hello.c”.
  2. Make sure TCC is added to your path.
  3. Run the command line tool and navigate it to the directory where hello.c is saved.
  4. Invoke TCC by typing: tcc -run hello.c.

Output: Hello World!

#!/usr/local/bin/tcc -run: Yeah, you can use it like a shell script as well (on linux).

The TCC compiler is so fast that you don’t even need to create makefiles for large projects. TCC has it’s own linker and assembler. TCC not only supports ANSI C, but also most of the new ISO C99 standard and many GNUC extensions including inline assembly. TCC can also automatically generate memory and bound checks while allowing all C pointers operations. TCC can do these checks even if non patched libraries are used. With libtcc, you can use TCC as a backend for dynamic code generation.

TCC mainly supports the i386 target on Linux and Windows. There are alpha ports for the ARM (arm-tcc) and the TMS320C67xx targets (c67-tcc). More information about the ARM port is available at http://lists.gnu.org/archive/html/tinycc-devel/2003-10/msg00044.html. But even after all these features, TCC is really small.

I am really enjoying my time with this “tiny” yet great tool 🙂

I would recommend all C programmers to give it a try 😀

Download Link: TCC Website

Categories
Uncategorized

Icon From Email Address

Generate icons using your email address…. It’s very easy….
  • Go to http://services.nexodyne.com/email/
  • Type your user name in the first field ( eg. masnun ) …
  • Select your Email service Provider’s domain name ( eg. gmail.com ) …
  • Generate the icon…
Enjoy…..