Hi,
You can use antena. Same as J2ME.
Best.
2010/7/31 Kostya Vasilyev kmans...@gmail.com
The absence of preprocessor has to do with Java, not Android.
And tlhere is a lot of Java software out there...
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
01.08.2010 0:00 пользователь
Yes, I noticed that. I noticed that while they characterized the
relative sizes of the pauses, they didn't put any bounds on them. If
you choose not to call this concurrent GC, I'm not about to argue!
But is there a concurrent algorithm that doesn't sacrifice overall
throughput? There are a lot
There are other uses besides logging, or at least the kind of logging
you're thinking of.
For example, let's say you have a large complex server with large
complex datastructures with long lifetimes, and a high server
availability requirement.
Let's say you experience a problem in production,
Hi DanH,
Your luck that this is not a J2EE forum. Their are ton's of
7x24h applications based on sun's vm running day by day for years.
The last years I worked mostly with the jrockit vm from bea ( now
oracle) in
such a highly parallel environment with up to several hundred
transaction per
On Aug 3, 10:46 pm, DanH danhi...@ieee.org wrote:
Just a few bullet points:
-- I've always thought that C #include processing sucked. Why did
they never introduce an #includeonce directive that would have
eliminated all the #ifndef stuff to prevent double includes??
Even better, go one
Been there, done that. Didn't use the preprocessor.
After the company began switching to Java, the client side was easily
ported. Had I been relying on the preprocessor, it would have been
difficult.
For a system like this, file / line numbers are insufficient anyway. I
implemented full
Yep, I know there are a lot of large 24x7 apps out there -- many of
the biggest are running on the IBM platforms I mentioned. And a year
ago I was offered a lot of money to move to Chicago and help a major
player rewrite the Sun GC to be fully concurrent, because the pauses
were killing them.
Inner classes are one of several things that were done half-arsed, in
order to minimize hits to the JVM. It almost seems like there was a
period there when they were afraid to touch the actual JVM so they did
obscene stuff in javac instead.
Like I said, lots of the decisions don't appear to have
The imports is the whole issue. I was not aware of stub classes but my
initial googling shows me it's some kind of remote object and that sure
doesn't sound fast. Anyway thank you for the point and I will look into it.
I for one don't leave anything up to a C compiler when it comes to a hot
As I said in my example, I don't want to pay an extra function call when
the code is in a hot spot. Even if the code isn't in a hot spot there
is a much worse case to deal with and that is death by a thousand cuts.
If a real-time game on a phone was written with all these interfaces to
make
On 8/3/2010 11:23 PM, Bob Kerns wrote:
You have a very limited view of the techniques available.
For Java that could be true but my C/C++ fu is just fine thank you.
On Aug 3, 10:39 am, Leigh McRaeleigh.mc...@lonedwarfgames.com
wrote:
On 8/2/2010 10:49 PM, Bob Kerns wrote: First of
I for one don't leave anything up to a C compiler when it comes to a
hot spot so there is no way I am putting my life in the hands of a
JIT.
Then you should quit working with Android and go back to Windows.
Android will be using a JIT soon enough, probably in the next major
turn of the crank.
A
On Aug 4, 6:56 am, Leigh McRae leigh.mc...@lonedwarfgames.com wrote:
On 8/3/2010 11:23 PM, Bob Kerns wrote: You have a very limited view of the
techniques available.
For Java that could be true but my C/C++ fu is just fine thank you.
I can't see that I said anything about your C/C++ fu.
Your initial googling has led you astray. Ignore any reference you
find that is discussing stub classes in the context of remote objects;
that is a specialized use of the term, and not relevant to your
search.
It's not a Java term, BTW. The technique can be used in any language
with classes. I've
On 8/4/2010 1:02 PM, Bob Kerns wrote:
Mine's pretty long, too. But you missed the point. I wasn't just
citing an opinion. I was citing the rationale for why C++ strove to
minimize dependence on the pre-processor, from a list of faults of the
C language they wanted to address.
Me too! So
Android will generate an Ant build.xml which is fairly easily
extended, and the NetBeans Mobility Ant Extensions will run fine
outside of NetBeans.
So you could insert a target that uses the NetBeans preprocessor to nb-
prep the sources prior to compiling.
So much to say about Java except that's just talking religion.
So back to the original topic. Sometimes just because you are adding
in debug code doesn't mean you want a performance degradation. Java
has mechanisms for some of this but just for example, tracing.
Doesn't matter what you are
if (Platform.OS == BLACKBERRY){
// DO blackberry
}else{
// DO JAVA
}
class Platform{
static final int OS = BLACKBERRY;
}
The only trick part is doing the imports. Stub classes are a one way.
Interfaces (don't worry about the performance overhead. Count on the
JIT to optimize the code
To take this a bit further: Platform can be an Enum, that implements
an IPlatform interface, and you can attach methods to BLACKBERRY and
friends to do the platform-specific stuff.
Then this becomes:
Platform.OS.doStuff();
And you don't have to touch it when you add a new platform.
On Aug 3,
Well, perhaps this illustrates your second point, but:
http://tinyurl.com/sun-concurrent-gc
Or it may be that they're not concurrent enough for you. Concurrency
isn't an absolute, and there are various ways of describing the upper
bounds on how much delay a concurrent algorithm can impose on
You have a very limited view of the techniques available.
On Aug 3, 10:39 am, Leigh McRae leigh.mc...@lonedwarfgames.com
wrote:
On 8/2/2010 10:49 PM, Bob Kerns wrote: First of all -- if you want to list
the faults of the C language, the
preprocessor is very near the top.
Just your opinion.
Notice that they call it low pause, not pause free. There are
truly pause-free algorithms, and people who need them. Brokerage
systems, eg, need response in the 10s of milliseconds, and a single GC
can disrupt a thousand transactions.
iSeries had the SPECjbb crown for several years running,
Just a few bullet points:
-- I've always thought that C #include processing sucked. Why did
they never introduce an #includeonce directive that would have
eliminated all the #ifndef stuff to prevent double includes??
-- C macros suck. They obfuscate without really introducing much
capability.
On Aug 2, 10:30 pm, Frank Weiss fewe...@gmail.com wrote:
This thread is a little like schadenfreude to me. A lot of it is about
taste - of which arguing about is of little use. I just saw some Java
code where every closing brace is commented with // end of if, //
end of for, // end of
Well, none of Sun's implementations are concurrent -- they all force
the application to stop for a time. They're not generally well-
designed for LARGE applications (eg, a fast 8-way running a heavy
transaction system), or anything with really stringent response time
requirements. The IBM
Right. The compiler knows what the line number is (at least if
there's no preprocessor in the way). It can return that from a pseudo-
function. Same for class, method, etc.
On Aug 2, 10:03 pm, Bob Kerns r...@acm.org wrote:
Note that you don't need a preprocessor to do this! Just a bit of
The main reason to need these is logging / debugging, so runtime
overhead is acceptable. Or am I missing something?
On the other hand, __FILE__ and __LINE__ are only valid where they are
used - there is no way to get the caller's file and line info, so it has
to be passed to whatever
I object to the fact the people who write Java are real programmers...
Sorry, couldn't help myself, likely should hit send, oh well.
On 8/3/2010 1:30 AM, Frank Weiss wrote:
This thread is a little like schadenfreude to me. A lot of it is about
taste - of which arguing about is of little use.
@Leigh LOL. I think your amusement is warranted.
What I meant to say is that a lot of the really great programming
techniques, such as refactoring to patterns, tend to be explained in
Java. I would suppose that really good programmers can write flexible
Java code without the use of a preprocessor
On 8/2/2010 10:49 PM, Bob Kerns wrote:
First of all -- if you want to list the faults of the C language, the
preprocessor is very near the top.
Just your opinion.
That's why C++ went to great lengths to mostly remove the need for
using it, with inline functions, constants, and the like.
I guess a few people who write Java ARE real programmers, though
sometimes it's hard to tell. And the Android environment is actually
one of the better Java development environments in terms of not
dumbing down things (though I do wonder about a few features).
On Aug 3, 12:10 pm, Leigh McRae
Preprocessing for j2me is supported by SUN via NetBeans. It's pretty
clear that SUN fully backs preprocessing for j2me if you look at all
the
support provided.
If it were really supported and fully backed by Sun it would be
supported in javac.
On Aug 1, 9:40 am, Leigh McRae
(don't get me started on GC based languages)
I know it's off-topic, but I have to say something. Having done large
applications in both I much prefer GCed languages (provided the GC is
well implemented). More robust and less overhead (yes, faster), with
fewer ways for the programmer to shoot
using __FILE__ or __LINE
Actually, it's a bit irritating that javac doesn't implement those and
a few others (particularly __CLASS and __METHOD). They would be very
easy to implement within the language, without the need for a
preprocessor. But certainly the need for them is reduced by the
It's defined in the language to happen, given the proper circumstances
of a simple if testing an expression composed of constants and not
exceeding a given complexity.
The thing it won't do is ignore syntax errors and undefined symbols in
the dead leg.
On Aug 1, 3:12 pm, RichardC
Getting the file name, line number, class and method are all available
in Java today. There is no need for a preprocessor to get them. I
haven't checked if they work on android but I imagine they would since
all the other stack trace methods do.
On Aug 2, 3:57 pm, DanH danhi...@ieee.org wrote:
Yes I have the code to get them but it's a runtime call
On Aug 2, 9:44 pm, dm1973 david050...@gmail.com wrote:
Getting the file name, line number, class and method are all available
in Java today. There is no need for a preprocessor to get them. I
haven't checked if they work on android
What RichardC said.
On Aug 2, 3:44 pm, dm1973 david050...@gmail.com wrote:
Getting the file name, line number, class and method are all available
in Java today. There is no need for a preprocessor to get them. I
haven't checked if they work on android but I imagine they would since
all the
On Mon, Aug 2, 2010 at 2:16 PM, RichardC richard.crit...@googlemail.comwrote:
Yes I have the code to get them but it's a runtime call
So what? What are you trying to do with the line number where the overhead
of a runtime call is significant?
Honestly, I spent years programming in C++,
Lots of times it would be nice for logging. Sometimes you'd like to
store an I was here indicator in a structure when you modify it.
Yes, there are alternatives, but not as nice.
On Aug 2, 7:53 pm, Dianne Hackborn hack...@android.com wrote:
On Mon, Aug 2, 2010 at 2:16 PM, RichardC
First of all -- if you want to list the faults of the C language, the
preprocessor is very near the top.
That's why C++ went to great lengths to mostly remove the need for
using it, with inline functions, constants, and the like.
It's too bad they didn't remove it. It causes all kinds of
I claim this is a good thing. You compile it once, you know it will
compile and run everywhere.
Introspection and/or moving code to platform-specific subclasses (and
often into platform-specific jars compiled only on that platform)
handle the undefined symbols problem quite nicely. They also
OT, but I'll bite.
What do you consider a really good GC setup?
Sun's GC is good enough that I would hesitate to make blanket
statements that it is better than X or worse than X. (Though I will
say that the newer Sun GC implementations are clearly better than the
older ones). There are a lot of
Yes, I've seen a few cases like this. There are ways to cache the
runtime call, which can be a bit expensive, but they rely a bit much
on convention and are a bit more verbose than you'd like.
On Aug 2, 7:02 pm, DanH danhi...@ieee.org wrote:
Lots of times it would be nice for logging. Sometimes
Note that you don't need a preprocessor to do this! Just a bit of
language support.
On Aug 2, 8:01 pm, Bob Kerns r...@acm.org wrote:
Yes, I've seen a few cases like this. There are ways to cache the
runtime call, which can be a bit expensive, but they rely a bit much
on convention and are a
I don't normally do this but
+1
On Aug 2, 12:46 pm, DanH danhi...@ieee.org wrote:
Preprocessing for j2me is supported by SUN via NetBeans. It's pretty
clear that SUN fully backs preprocessing for j2me if you look at all
the
support provided.
If it were really supported and fully
This thread is a little like schadenfreude to me. A lot of it is about
taste - of which arguing about is of little use. I just saw some Java
code where every closing brace is commented with // end of if, //
end of for, // end of method, etc. Yech!. That, to me, is worth
arguing about!
If the OP
Hi king, yes I do it since I'm a mercenary, I develop for money,
and I develop on the platform that people like.
The discussions about Java hasn't got any sense to me...
Android ISN'T Java, it has no rights to be called java and if you not
agree with it
you should learn some basic java guidelines
On Sun, Aug 1, 2010 at 4:05 AM, sblantipodi
perini.dav...@dpsoftware.org wrote:
Android ISN'T Java, it has no rights to be called java and if you not
agree with it
you should learn some basic java guidelines and understand what is
java.
Android uses Java source code and Java build tools
Android ISN'T Java, it has no rights to be called java and if you not
agree with it
you should learn some basic java guidelines and understand what is
java.
Please stop whinning. If you do not like Android just drop it. Simple
as that.Go develop for anything else and stay happy with
I'm sorry, I don't want to irritate no one, but I have different
thinking on the topic.
To say that something is Java or Java Powered you need to pay and pass
intensive test.
Google hasn't payed nothing to Sun, nor Oracle and neither passed any
JCP test so
you can't call it java.
Why Google
You are confusing Java the language and platforms that use Java.
There are in fact serveral platforms where Java is used - J2ME,
Servlets, Java Beans (and more). These platforms have one thing in
common - applications are written in Java the language. But other than
that, they have little on
On 8/1/2010 4:29 AM, Mark Murphy wrote:
Java (J2ME, Blackberry, Android) does not have a native preprocessor.
Neither does Javascript for WebOS/HTML5 applications, nor Actionscript
for Flash/Flex/AIR applications. Neither do some languages drifting
into the mobile space (e.g., Ruby, and Perl
Leigh,
I don't think anyone is against it.
There happens to be no support for it in Eclipse, the development
environment chosen by the Android team.
It just doesn't seem like a show-stopper (see Android Market), and it's
certainly an overstatement to say (or imply) that Android is a
On 8/1/2010 11:14 AM, Kostya Vasilyev wrote:
Leigh,
I don't think anyone is against it.
There happens to be no support for it in Eclipse, the development
environment chosen by the Android team.
It just doesn't seem like a show-stopper (see Android Market), and
it's certainly an
Get your facts straight, and the fog of your confusion will lift.
Google did not release the first buggy SDK. Every vendor's first SDK
was buggy.
As for why no #ifdef, when they designed Java, they realized the main
applications of #ifdef were 1) accommodating hardware differences and
2)
Wrong. If it had no right to be called Java, then Sun (now Oracle)
would be suing Google, since they protect the name zealously. Remember
what happened when Microsoft tried polluting the name.
Sun did not sue even before the Oracle acquisition, they didn't even
complain; so they must have been
But why bother when there is already an open source preprocessor for
Java in Eclipse? It is called 'prebop' and there is an article on it
at
http://www.boldinventions.com/index.php?option=com_contentview=articleid=81:javapreprocessorusingeclipsecatid=34:category-electronics-articlesItemid=53
My background is C and C++ ... 25 years and no longer counting :)
So I had some ingrained expectations when I started learning Java;
amongst them was the expectation that the Java language would support
conditional compliation.
I have had to learn to live without conditional compliation. The
I think most peoples opinion is that it just is not useful in java.
There have been numerous discussions about needing/not needing a
preprocessor in Java. You are not going to be #defining symbols (use
a static class), including files, using __FILE__ or __LINE ( use the
logging, no symbols means
I have had to learn to live without conditional compliation. The only
area where I really miss having a lanugage constuct like #ifdef is
when I need to remove instrumentation and/or debugging code.
You can achieve this in Java using static final fields. The compiler
is smart enough to remove
Thank you, that's going to make my life easier.
As I am still learning Java, can you tell me if the removal of dead
code is a feature of the Java language or is it unique to the Android
build chain?
On Aug 1, 8:50 pm, Romain Guy romain...@android.com wrote:
I have had to learn to live without
It's not a feature of the language, nor of Android, it's just part of
any sane Java compiler. I have yet to come across one that doesn't do
it. The Sun (Oracle) Java compiler in particular does it. The Eclipse
compiler does it as well. You can test for yourself with your compiler
by compiling a
ah ah... it's incredible...
I develop on Windows Mobile, JavaME, Bada, Blackberry, Symbian.
I can use preprocessing on every platform...
How can you develop on a mobile without preprocessing? Sure android is
really good for fart app,
but what else?
I don't want to troll but I really can't
The absence of preprocessor has to do with Java, not Android.
And tlhere is a lot of Java software out there...
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
01.08.2010 0:00 пользователь sblantipodi perini.dav...@dpsoftware.org
написал:
ah ah... it's incredible...
I develop on Windows
Ok but other java software/platform supports preprocessor on both
Eclipse/Netbeans/IntelliJ/JDE ecc. ecc...
On Jul 31, 10:15 pm, Kostya Vasilyev kmans...@gmail.com wrote:
The absence of preprocessor has to do with Java, not Android.
And tlhere is a lot of Java software out there...
--
Here is a long thread on the subject:
http://groups.google.com/group/android-developers/browse_thread/thread/1c9078176b172e1a/235bae6530ee7e74?show_docid=235bae6530ee7e74
There are Java projects that use various preprocessors. The lack of a
standard one is a problem. AFAIK Sun's WORA ideology ran
On Sat, Jul 31, 2010 at 3:00 PM, sblantipodi
perini.dav...@dpsoftware.orgwrote:
How can you develop on a mobile without preprocessing?
Quite easily, actually.
Sure android is really good for fart app, but what else?
Is this is a serious question? Have you browsed through the Android
I'm sorry for my rude and really not too much kind speaking,
but I can't belive that android doesn't support preprocessor.
I can't think on mobile programming without preprocessor, too many
different configurations,
think only to LVL and android market and preprocessor could be
useful...
Ok we
I'm glad to not have to use pre-processors and hash-defines.
I hated them when i worked in C (and C++) (they tended to get over-
used, made code unreadable and difficult to debug) and for the last
decade of Java programming i really never ever needed them.
How can you develop on a mobile without
On Sat, Jul 31, 2010 at 5:09 PM, sblantipodi
perini.dav...@dpsoftware.orgwrote:
I'm sorry for my rude and really not too much kind speaking,
but I can't belive that android doesn't support preprocessor.
Why so surprised? The main Android SDK is Java-based, which does not have
preprocessor.
On some development systems a C preprocessor has been hijacked to
preprocess Java code. It's not standard, though.
You can use final constants in Java to select pieces of code. Eg, if
(MY_CONSTANT) { ... } where MY_CONSTANT is a final boolean value.
The Java compiler is defined to compile these
Developers android-developers@googlegroups.com
Sent: Sun, August 1, 2010 1:27:39 AM
Subject: [android-developers] Re: Android preprocessor, //#ifdef...
Ok but other java software/platform supports preprocessor on both
Eclipse/Netbeans/IntelliJ/JDE ecc. ecc...
On Jul 31, 10:15 pm, Kostya Vasilyev kmans
73 matches
Mail list logo