| Earth to Sun: When will Java support closures now? |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- Eclipse - White space causing all text files to show up as having conflictsWhen we do a CVS synchornization in Eclipse, the Java files work well,
but ALL (dozens) of text
files show up as having conflicts, apparently because white space is
NOT being ignored. When
we ignore white space on a file by file basis, the conflicts disappear.
But we have not been
able to ignore white space globally, so we have to go through our
dozens of text files one by one, which
is very tedious and time consuming.
How do we GLOBALLY avoid white space characters causing text files
looking like they have
conflicts when doing an Eclipse CVS synchronize.
- 1
- A+++++ Designer Replica Christian Dior Handbags & PursesA+++++ Designer Replica Christian Dior Handbags & Purses
Designer Replica Christian Dior Handbags & Purses At:
http://www.sales-luxury.org/christian_dior.html
Replica Christian Dior Handbags & Purses Item:
Dior Lovely Bag Black - Small Handbags At:
http://www.sales-luxury.org/christian_dior_purses_282.html
Dior Bag with 2 Pockets Small - Black Handbags At:
http://www.sales-luxury.org/christian_dior_purses_283.html
Dior Lovely Bag Beige - Large Handbags At:
http://www.sales-luxury.org/christian_dior_purses_284.html
Dior Lovely Bag White - Large Handbags At:
http://www.sales-luxury.org/christian_dior_purses_285.html
Dior Lovely Bag White - Medium Handbags At:
http://www.sales-luxury.org/christian_dior_purses_286.html
Lady Dior Bag - White Handbags At: http://www.sales-luxury.org/christian_dior_purses_287.html
CD - Cannage Drawstring Medium Shoulder Bag Black Handbags At:
http://www.sales-luxury.org/christian_dior_purses_288.html
CD - Brown Gaucho Small Saddle Bag Handbags At:
http://www.sales-luxury.org/christian_dior_purses_289.html
CD - Black Gaucho Small Saddle Bag Handbags At:
http://www.sales-luxury.org/christian_dior_purses_290.html
......
Sale-luxury prides itself on offering some of the best replica purses
available anywhere. This is why we offer some of the finest replica
handbags that are exact copies of purses from Chanel and Fendi. One of
our newest lines is our exquisite line of Christian Dior replica
handbags. Like our amazingly accurate line of replica Louis Vuitton
purses our CD replica purses are of the highest quality in replica
accessories. While you are shopping around for replica purses, be sure
to take a look at our exceptional Marc Jacobs replica bags as well as
our full line of Chanel replica handbags at amazingly low prices.
http://www.sales-luxury.org/
- 1
- Thread.run() = static or PircBot != thread safe?Hi there,
After messing about with a few programs I'm now getting into IRC. Because a few
programs which I used for quite some time now stopped working and because I
became unhappy with some eggdrop options (and lack off) and suspect it to be
leaking memory I decided to write up something myself.
One of the main functions of this bot will be performing tutorial sessions. At
the moment this consists of reading an ascii file which defines what text has
to be send into the channel. All of this is working decently well (tested with
System.out.println();).
Because the bot still needs to respond to commands I decided to use a seperate
class for the tutorial session so I could use a seperate thread. The idea was
to start a thread which runs the tutorial while the bot still does whatever it
usually does.
To my pleasure my first approach on threading worked quite nicely. My class
extended Thread, setup a run() method to define the actual routine to perform.
In this method I try to send a message to the irc channel the bot is on.
However, this routine is giving me some errors when I try to compile this:
./irctutorial.java:47: non-static method sendMessage \
(java.lang.String,java.lang.String) cannot be referenced from a static context
PircBot.sendMessage(channel, tutline.substring(tutline.indexOf(' ')+1) \
trim());
^
1 error
The method which is mentioned here is Thread.run() and to my knowledge this
method isn't static at all:
---( irctutorial.java - note; lines have been cut using \ )---
public class irctutorial extends Thread {
...
public void run() {
String tutline;
int i = 0, pause = 0;
File tutorial = new File("/home/peter/tutorial.txt");
try {
LineNumberReader tutreader = new LineNumberReader \
(new FileReader(tutorial)); do {
tutline = tutreader.readLine();
pause = Integer.decode(tutline.substring(0,tutline.indexOf(' ')));
Thread.currentThread().sleep(pause*1000);
PircBot.sendMessage(channel, tutline.substring(tutline.indexOf(' ')+1) \
.trim());
tutreader.setLineNumber(i++);
} while (tutline != null);
---[ CUT ]---
The error occurs with PircBot.sendMessage() and this I don't understand at all.
When looking at the PircBot API documentation
(http://www.jibble.org/javadocs/pircbot/index.html) you can see that the
'sendMessage' method isn't static either. The method is of:
public final void sendMessage(String target,
String message)
While the class itself is:
public abstract class PircBot
extends Object
implements ReplyConstants
I'm rather new when it comes to using threads and as such a bit confused. Is
this happening because Thread.run() is indeed static or could this be an issue
with the PircBot API ?
Thanks in advance for any input you can give me.
--
Groetjes, Peter
.\\ PGP/GPG key: http://www.catslair.org/pubkey.asc
- 2
- Java Mobile agentsI will appreciate if someone can ans the following questios:
1. Are there any good books or resources (apart from google) that can help
me get a jump start on this.
2. What is the most pospular mobile agent technology that is preferred by
developers (aglets?)
Thanks
Shank
--
Regards
Shashank
http://mia.ece.uic.edu/~papers
- 5
- Problem with GridLayoutHi everybody, I'm having a problem with the layout of my application.
When I run the following code, I only see one graph in the frame. I'm
sopposed to see "graphNum" graphs in a row.
This part of code runs when I press the "draw graph" button:
public void run() {
Graph[] graphs = new Graph[graphNum];
JFrame frame = new JFrame();
for(int i=0; i<graphNum; i++){
graphs[i] = new Graph();
SliceVal[] sliceValA = new SliceVal[sliceNum];
for(int j=0;j<sliceNum;j++){
sliceValA[j] = new SliceVal(new BigDecimal(10.0),
colors[j]);
}
graphs[i].setSliceVal(sliceValA);
}
JPanel grafPanel = new JPanel();
graphPanel.setLayout(new GridLayout(1,graphNum));
for (int i=0; i<graphNum; i++) {
grafPanel.add(graphs[i]);
}
frame.getContentPane().add(graphPanel);
frame.setSize(300, 200);
frame.setVisible(true);
}
}
SliceVal class holds the value and color of a slice of the pie chart.
Graph class extends JComponent and has a paint() function in it.
I set the values of slices to 10.0 for simplifying the code
Do you see an error in the code above?
I would appreciate any help, thank you.
- 6
- Graphics for ChessAppletHi Dears
I am developing chess game written as an JavaApplet.
Using Borland JBuilder 9 Personal Edition.
I use the following Code
void this_mouseDragged(MouseEvent e)
{
}
class Chess_this_mouseMotionAdapter extends
java.awt.event.MouseMotionAdapter
{
Chess adaptee ;
Chess_this_mouseMotionAdapter ( Chess adaptee )
{
this.adaptee = adaptee ;
}
public void mouseDragged ( MouseEvent e )
{
adaptee.this_mouseDragged ( e ) ;
}
}
But it seems that it still fire when the mouse button is released.
The Applet are on the following URL
http://w1.201.telia.com/~u20100003/Chess.html
Verry Thankfull for Tips or Advice.
Sincerely
Urban Avierfj?
Gotland, Sweden
- 7
- 8
- Bounce offI am trying to have a bouncing ball that (as you can probably tell
from the name), bounces off of the walls. I only want the top and
bottom walls to bounce, but the code I am using does not work.
private void detectTopOrBottom(){
if (location.x <= 1 || location.x >= (width - 1)){
dx = -dx;}
if (location.y <= 1 || location.y >= (height - 1)){
dy = -dy;}}
- 8
- Accelerators in one frame being activated from anotherHi.
I have a program that uses multiple top-level frames. One of the frames
is the "main" one and contains a menu bar and tool bar. The menu items
in the main frame have accelerators. I want the actions associated with
these menu items to be activated even if the accelerator is pressed when
one of the other top-level frames has the focus.
Is there an easy way or accepted idiom to do this?
Thanks,
Cameron
--
e-mail : cam (at) mcc.id.au icq : 26955922
web : http://mcc.id.au/ msn : cam-msn (at) aka.mcc.id.au
office : +61399055779 jabber : heycam (at) jabber.org
- 8
- OnLoad kicking off processGood Morning,
A friend of mine asked me a question the other day and I am fairly stumped.
Is there a way to use the onLoad function to kick off a process on the
server while the page is being painted? Want to send a message to a servlet
and then send the form to the servlet once the user has filled in the
values.
I did some webapp stuff a while back and we used the onload function to help
the page paint a little easier, I wondered if we could use it to send a
message, or if there was something in JSP or HTML that I overlooked.
Thanks,
M@
- 8
- JNI: COM event sinks in a DLLhello,
I have created an Event-Sink class in C++ to handle COM-Events and it
works well in a MFC-application.
But if I create a DLL to use this Event-Sink-Class with the JNI then
the callback function of the event-sink is not called. The COM-Server
tells me that it is "overloaded" when it fires the event. It seems to
me that it "hangs" somehow in the JVM.
here some pseudo code:
in Java:
class Test {
public static native void nativeFunction();
public static void main(...) {
nativeFunction();
//during sleeping I fire the "event"
Thread.sleep(30000);
}
}
in the DLL:
class EventSink : public IDispatch
{
...
HRESULT __stdcall Invoke(...) {
//just exit application
exit(0);
return S_OK;
}
...
};
JNIEXPORT void JNICALL ...nativeFunction(...)
{
//initialize COM
CoInitializeEx(NULL, COINIT_MULTITHREADED);
//create COM object with CoCreateInstance(...)
//get IConnectionPointContainer of the object
//get IConnectionPoint* connectionPoint
//advise sink to connectionPoint
EventSink* sink = new EventSink();
connectionPoint->advise(sink, &cookie);
...
}
what is wrong in the code?
thanks in advance!
Arthur
- 8
- FW: Check out these security packageYet another moron blindly passing on false email messages trying to
find people STUPID enough to fall for them. I'll say it again and type
slowly so it sinks in:
M i c r o s o f t d o e s n o t s e n d o u t e m a i l s o r a
t t a c h m e n t s a b o u t s e c u r i t y u p d a t e s!!!
People that fall for this crap without even checking it out deserve
every viral infection they get!
On Wed, 29 Dec 2004 21:16:45 GMT, "Eileen & John" <email***@***.com>
wrote:
>MS Partner
>
>this is the latest version of security update, the
>"December 2004, Cumulative Patch" update which eliminates
>all known security vulnerabilities affecting
>MS Internet Explorer, MS Outlook and MS Outlook Express.
>Install now to help protect your computer
>from these vulnerabilities, the most serious of which could
>allow an malicious user to run code on your system.
>This update includes the functionality of all previously released patches.
>
>
>Microsoft Product Support Services and Knowledge Base articles can be found on the Microsoft Technical Support web site.
>http://support.microsoft.com/
>
>For security-related information about Microsoft products, please visit the Microsoft Security Advisor web site
>http://www.microsoft.com/security/
>
>Thank you for using Microsoft products.
>
>Please do not reply to this message.
>It was sent from an unmonitored e-mail address and we are unable to respond to any replies.
>
>----------------------------------------------
>The names of the actual companies and products mentioned herein are the trademarks of their respective owners.
>Copyright 2004 Microsoft Corporation.
- 13
- Getting Help -- Forums/Tutorials/Tips+Tricks/Blogs/ETC.Hey, I have a site dedicated to helping people:
http://www.wizardsolutionsusa.com
There you can find about any resource to help you through your
homework or personal studies.
Remember, it doesn't take but 60 seconds to sign up at the forum and
ask your questions.
- 14
- looking for an open source java charting libraryHi All,
I am evaluating open source java charting libraries for use
in one of my projects. I would need both browser based
and applet based implementation.
JFreeCharts seems to fit the bill.
http://jfree.org
Can the community help me identify if there is any better
java charting library out there?
Thanks in Advance,
Shanmu.
- 14
- in my applet I can't get the stop() and the start() to fireI cannot seem to see when the stop() and start() methnods fire when using
this applet. I thought when the focus moved away from IE6, the stop would
fire and then when it got the focus again the start() would fire. Is that
not the case?
Any ideas on what I could be doing wrong? Thank you.
--------------code
snippet----------------------------------------------------------
package com.pch.webapp;
import java.applet.Applet;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Toolkit;
public class ScrollingMessage extends Applet implements Runnable{
String message;
private int dx;
private int dy;
private boolean isStandalone = false;
private boolean running;
private Thread worker;
private int x = 25;
private int y = 25;
public ScrollingMessage(){
}
public static void main( String[] args ){
ScrollingMessage applet = new ScrollingMessage();
applet.isStandalone = true;
Frame frame;
frame = new Frame();
frame.setTitle( "Applet Frame" );
frame.add( applet, BorderLayout.CENTER );
applet.init();
applet.start();
frame.setSize( 400, 320 );
Dimension d = Toolkit.getDefaultToolkit()
.getScreenSize();
frame.setLocation(
( d.width - frame.getSize().width ) / 2,
( d.height - frame.getSize().height ) / 2
);
frame.setVisible( true );
}
// Destroy the applet
public void destroy(){
System.err.println( "destroy" );
worker = null;
}
// Get Applet information
public String getAppletInfo(){
System.err.println( "getAppletInfo" );
return "Applet Information";
}
public int getDx(){
return dx;
}
public int getDy(){
return dy;
}
public String getMessage(){
return message;
}
// Get a parameter value
public String getParameter( String key, String def ){
return isStandalone ? System.getProperty( key, def )
: ( ( getParameter( key ) != null ) ? getParameter( key ) :
def );
}
// Get parameter info
public String[][] getParameterInfo(){
System.err.println( "getParameterInfo" );
String[][] pinfo = {{"aMessage", "String", ""}
, };
return pinfo;
}
public int getX(){
return x;
}
public int getY(){
return y;
}
// Initialize the applet
public void init(){
System.err.println( "init" );
try{
message = this.getParameter( "aMessage", "There's no place like
127.0.0.1." );
} catch( Exception e ){
e.printStackTrace();
}
try{
jbInit();
} catch( Exception e ){
e.printStackTrace();
}
}
public void paint( Graphics g ){
System.err.println( "painting" );
g.drawString( this.getMessage(), getX(), getY() );
}
public void run(){
while( isRunning() ){
setX( getX() + 1 );
setDx( getDx() );
this.repaint();
try{
System.err.println( "\tabout to sleep" );
worker.sleep( 250 );
} catch( InterruptedException ex ){
ex.printStackTrace();
}
}
System.err.println( "done" );
}
public void setDx( int dx ){
this.dx = dx;
}
public void setDy( int dy ){
this.dy = dy;
}
public void setX( int x ){
this.x = x;
}
public void setY( int y ){
this.y = y;
}
// Start the applet
public void start(){
System.err.println( "start" );
if( worker == null ){
worker = new Thread( this );
}
setRunning( true );
worker.start();
}
// Stop the applet
public void stop(){
System.err.println( "stop" );
if( worker != null ){
setRunning( false );
}
}
private boolean isRunning(){
return running;
}
// Component initialization
private void jbInit() throws Exception{
}
private synchronized void setRunning( boolean running ){
this.running = running;
}
}
|
| Author |
Message |
Tor Iver Wilhelmsen

|
Posted: 2004-9-29 20:57:00 |
Top |
java-programmer, Earth to Sun: When will Java support closures now?
Vitaly Lugovsky <email***@***.com> writes:
> No. It was added to make source files more readable.
How can something be more readable when anything in effect can be
replaced by a macro? You are perhaps focusing on #include and the
like; but the following is bad:
/* In some header file included somewhere while resolving
a source file */
#define foo fie
/* In the source file - will end up as fie()*/
int foo() {
}
To quote Wikipedia: "The use of preprocessors has been getting less
common as recent languages provide more abstract features rather than
lexical-oriented ones. Indeed, the overuse of the proprecessor might
yield quite chaotic code. In designing a new language based on C,
Stroustrup introduced features such as inline and templates into C++
in an attempt to make the C preprocessor less relevant."
> > Yes, again because they avoid strong typing.
>
> How?
Because the template has no idea whether the type parameter actually
supports the operations used inside it, e.g. a method call. In Java,
you cannot use an operation on a parametrized type unless you declare
that yes, this type shall conform to this interface/class.
> C and C++ are not strictly typed.
Not C, but every resource I've seen on C++ claims it is (by default),
though how strong anything is when it can be cast away as will is a
different question. Maybe you define "strong/strict typing"
differently from the makers of C++ and Java?
> No. The reason is that there are too many monkeys around. Not so
> much humans. Ask yourself - why so much people listens "rap" and
> other popular crap, much more then good jazz or classics? Would you
> list this fact as an argument that rap is better? Popularity is a
> shit. Almost everything that is popular must be a shit.
I am getting the impression "Lisp" is a mis-spelling for "Elitist".
|
| |
|
| |
 |
Tor Iver Wilhelmsen

|
Posted: 2004-9-29 20:57:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
Vitaly Lugovsky <email***@***.com> writes:
> No. It was added to make source files more readable.
How can something be more readable when anything in effect can be
replaced by a macro? You are perhaps focusing on #include and the
like; but the following is bad:
/* In some header file included somewhere while resolving
a source file */
#define foo fie
/* In the source file - will end up as fie()*/
int foo() {
}
To quote Wikipedia: "The use of preprocessors has been getting less
common as recent languages provide more abstract features rather than
lexical-oriented ones. Indeed, the overuse of the proprecessor might
yield quite chaotic code. In designing a new language based on C,
Stroustrup introduced features such as inline and templates into C++
in an attempt to make the C preprocessor less relevant."
> > Yes, again because they avoid strong typing.
>
> How?
Because the template has no idea whether the type parameter actually
supports the operations used inside it, e.g. a method call. In Java,
you cannot use an operation on a parametrized type unless you declare
that yes, this type shall conform to this interface/class.
> C and C++ are not strictly typed.
Not C, but every resource I've seen on C++ claims it is (by default),
though how strong anything is when it can be cast away as will is a
different question. Maybe you define "strong/strict typing"
differently from the makers of C++ and Java?
> No. The reason is that there are too many monkeys around. Not so
> much humans. Ask yourself - why so much people listens "rap" and
> other popular crap, much more then good jazz or classics? Would you
> list this fact as an argument that rap is better? Popularity is a
> shit. Almost everything that is popular must be a shit.
I am getting the impression "Lisp" is a mis-spelling for "Elitist".
|
| |
|
| |
 |
sarge_chris

|
Posted: 2004-9-29 21:14:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
Vitaly Lugovsky <email***@***.com> wrote in message news:<cjdkr9$499$email***@***.com>...
> > Java needs to be kept simple to allow small teams of
> > developers to be very productive. Einstein once said, "Things should be
> > as simple as possible, but not simpler".
>
> Please, don't call them "developers". Monkeys. And I will prefer one
> real developer with Lisp to a group of trained Java monkeys with their
> simple toy language.
>
> But, I love simplicity and orthogonality too. It just should be based on
> a different computational model. Simple functional language (like Scheme)
> is much better then any simple imperative OO shit.
Oooo temper temper!
If you want to use an academic language for development that's your
problem.
I'd prefer to use my favourite toy-language to earn lots of money
working on leading-edge, enterprise-scale applications - if that makes
me a monkey, then I'm a happy one.
Lisp! He he, just below COBOL: http://www.tiobe.com/tpci.htm
- sarge
|
| |
|
| |
 |
Carlos Bazzarella

|
Posted: 2004-9-29 22:24:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
Vitaly Lugovsky wrote:
> Tor Iver Wilhelmsen <email***@***.com> wrote:
>
> >> Preprocessor was not a crap.
> >
> > Yes it was, because it dodges the type system, and makes the code you
> > write not be the code you run. The preprocessor was added to C to make
> > source files smaller
>
> No. It was added to make source files more readable.
>
> >> Templates was not a crap.
> >
> > Yes, again because they avoid strong typing.
>
> How?
>
> > So if you consider C and C++ as not strongly typed, the two features
> > you mentioned are not crap. If you want type safety/strong typing,
> > they are.
>
> C and C++ are not strictly typed. And Java is not strongly typed language
> as well. Haskell is strongly typed. And, I know that you don't know it,
> but - IT HAVE macros. Template Haskell remains strictly typed.
>
> >> Please, don't call them "developers". Monkeys. And I will prefer one
> >> real developer with Lisp to a group of trained Java monkeys with their
> >> simple toy language.
> >
> > Well, .advocacy is perhaps a suitable playground for "my language can
> > beat your language" stuff, but I wish that you Lisp-heads would grow
> > up some day. With a language mostly relegated to dusty academic
> > shelves it's perhaps hard to take that step into the real world.
>
> I know that java monkeys loves to believe in this bullshit. Lisp is not
> an academic language (and it is a sort of outcast in academic world -
> computer scientists loves stong type systems even more then you, so,
> Haskell and ML are academic while Lisp is an industry language).
>
> >> But, I love simplicity and orthogonality too. It just should be based on
> >> a different computational model. Simple functional language (like Scheme)
> >> is much better then any simple imperative OO shit.
> >
> > Which I guess is the reason more systems are built using Java than
> > Scheme.
>
> No. The reason is that there are too many monkeys around. Not so much
> humans. Ask yourself - why so much people listens "rap" and other popular
> crap, much more then good jazz or classics?
This is a matter of taste, nothing to do with popular crap. What was
popular year ago is classic today !!! Think about that for a second.
Rock & Roll in the '60s was the equivalent of Rap today and I see
a lot of older people that still loves R&R.
The thing is, I like all kinds of music from classics, jazz to rap too. Each
one has its reason for being so-called popular one time or another.
Just because you don't like rap, it doesn't make it *shit* as you call it.
> Would you list this fact as
> an argument that rap is better?
You can't compare apples to oranges. Some people like rap, others
don't.
> Popularity is a shit. Almost everything
> that is popular must be a shit.
I guess you also don't like democracy because it is a
popularity contest !!!
Carlos.
>
>
> --
>
> V.S.Lugovsky aka Mauhuur (http://ontil.ihep.su/~vsl)
|
| |
|
| |
 |
Tim Smith

|
Posted: 2004-9-30 5:04:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
In article <email***@***.com>, Tor Iver Wilhelmsen wrote:
>> Preprocessor was not a crap.
>
> Yes it was, because it dodges the type system, and makes the code you
> write not be the code you run. The preprocessor was added to C to make
> source files smaller
Uhm...any language above assembler makes the code you write not be the code
you run, doesn't it?
--
--Tim Smith
|
| |
|
| |
 |
Bruce Lewis

|
Posted: 2004-10-1 10:51:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
Vitaly Lugovsky <email***@***.com> writes:
> I am using your BRL for a big project. And for me speed is a concern -
> the real showstopper is the strings representation. Profiler shows that
> the damned majority of processor time is in the string-append.
This surprises me. The brl macro expands to a lot of (display ...)
expressions rather than (string-append ...). The displays do go to a
string port, since you need a content-length to maintain persistent
connections and let TCP be as fast as it should be. I assumed Kawa's
string ports did not work by string-append, but never checked.
A reimplementation of BRL in a non-Java environment would be
interesting. If you do it with Bigloo, will you publish it?
--
ourdoings.com
It's where your pile of digital photos wishes it could be.
http://ourdoings.com/about.html
|
| |
|
| |
 |
Lothar Kimmeringer

|
Posted: 2004-10-2 1:04:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
On Tue, 28 Sep 2004 01:10:49 +0000 (UTC), Vitaly Lugovsky wrote:
> Java is designed to be understandable by brain-damaged people.
> Closures are too complicated for an average Java coder. The main reason
> why Java is so popular is that it is the simplest language possible.
Very well, so a Java-programmer can focus more on solving the
given problem. My-language-is-better-discusstions suck.
Regards, Lothar
--
Lothar Kimmeringer E-Mail: email***@***.com
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)
Always remember: The answer is forty-two, there can only be wrong
questions!
|
| |
|
| |
 |
mauhuur

|
Posted: 2004-10-2 8:03:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
Carlos Bazzarella <email***@***.com> wrote in message news:<email***@***.com>...
> > No. The reason is that there are too many monkeys around. Not so much
> > humans. Ask yourself - why so much people listens "rap" and other popular
> > crap, much more then good jazz or classics?
>
> This is a matter of taste, nothing to do with popular crap. What was
> popular year ago is classic today !!! Think about that for a second.
Not taste. Quality.
> Rock & Roll in the '60s was the equivalent of Rap today and I see
> a lot of older people that still loves R&R.
Just try to count, what amount of '60s rock'n'roll crap became classics
nowdays. Sure, in any style can be something really talented and marvelous.
Even in rap, probably - history will show, now in tons of crap it's invisible.
> The thing is, I like all kinds of music from classics, jazz to rap too. Each
> one has its reason for being so-called popular one time or another.
Yes. And popularity NEVER means QUALITY. Never.
> Just because you don't like rap, it doesn't make it *shit* as you call it.
Popularity makes it shit.
> > Popularity is a shit. Almost everything
> > that is popular must be a shit.
>
> I guess you also don't like democracy because it is a
> popularity contest !!!
Sure I don't like democracy. How someone without any knowledge in politics,
economics and strategy can judge who is eligible to make decisions in this
areas?!? I am for meritocracy. Want to vote - prove your proficiency. Want
to rule - you have to be really THE BEST. Not be considered by stupid crowds
as "the best", but be really the best.
|
| |
|
| |
 |
mauhuur

|
Posted: 2004-10-2 9:03:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
Tor Iver Wilhelmsen <email***@***.com> wrote in message news:<email***@***.com>...
> > No. It was added to make source files more readable.
>
> How can something be more readable when anything in effect can be
> replaced by a macro? You are perhaps focusing on #include and the
> like; but the following is bad:
You can write a Fortran program in any language. That's true.
But who asks you to write a crap? Use macros to improve readability,
not to mess it up.
What is more readable?
DEBUG( some code )
or
if (My.Configuration.Debug_level > 1) {
some code
}
> To quote Wikipedia: "The use of preprocessors has been getting less
> common as recent languages provide more abstract features rather than
> lexical-oriented ones. Indeed, the overuse of the proprecessor might
> yield quite chaotic code. In designing a new language based on C,
> Stroustrup introduced features such as inline and templates into C++
> in an attempt to make the C preprocessor less relevant."
Right. C preprocessor is a crap. Templates are better. But Java do not even
have a crap like C preprocessor.
Well. We still can use Jatha or AspectJ... They are preprocessors.
You think that sort of preprocessors are not necessary?
> > How?
>
> Because the template has no idea whether the type parameter actually
> supports the operations used inside it, e.g. a method call. In Java,
> you cannot use an operation on a parametrized type unless you declare
> that yes, this type shall conform to this interface/class.
This is a leak in implementation. Not the problem of ideology.
Try Template Haskell for example.
> > C and C++ are not strictly typed.
>
> Not C, but every resource I've seen on C++ claims it is (by default),
> though how strong anything is when it can be cast away as will is a
> different question. Maybe you define "strong/strict typing"
> differently from the makers of C++ and Java?
They can claim whatever they want. Since it allows dynamic typing,
it is not strict. Hashtable filled with java.lang.Object-s can't even
be considered as a strictly typed data structure.
> > No. The reason is that there are too many monkeys around. Not so
> > much humans. Ask yourself - why so much people listens "rap" and
> > other popular crap, much more then good jazz or classics? Would you
> > list this fact as an argument that rap is better? Popularity is a
> > shit. Almost everything that is popular must be a shit.
>
> I am getting the impression "Lisp" is a mis-spelling for "Elitist".
No. Lisp is for industry. For mass industry. But marketoid monkeys prefered
to yell about shit like Java, then all "programming" monkeys uses it, not
because of Java technological supremacy.
|
| |
|
| |
 |
mauhuur

|
Posted: 2004-10-2 9:07:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
email***@***.com (Chris) wrote in message news:<email***@***.com>...
> > But, I love simplicity and orthogonality too. It just should be based on
> > a different computational model. Simple functional language (like Scheme)
> > is much better then any simple imperative OO shit.
>
> Oooo temper temper!
>
> If you want to use an academic language for development that's your
> problem.
Again. Lisp is not an academic language. Stop repeating stupid myths.
Lisp is even an outcast in academic world - they loves strictly typed languages
like ML and Haskell, not dynamic typed multy-paradigm Lisp.
> I'd prefer to use my favourite toy-language to earn lots of money
> working on leading-edge, enterprise-scale applications - if that makes
> me a monkey, then I'm a happy one.
Industry have to realize, that one Lisp programmer will perform much better
(with lesser cost) then a dozen of Java coders.
> Lisp! He he, just below COBOL: http://www.tiobe.com/tpci.htm
And what? Zillions of lemmings can't be wrong? That is your best argument?
|
| |
|
| |
 |
mauhuur

|
Posted: 2004-10-2 9:11:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
Bruce Lewis <email***@***.com> wrote in message news:<email***@***.com>...
> > I am using your BRL for a big project. And for me speed is a concern -
> > the real showstopper is the strings representation. Profiler shows that
> > the damned majority of processor time is in the string-append.
>
> This surprises me. The brl macro expands to a lot of (display ...)
> expressions rather than (string-append ...).
It is not all about brl macro. It is for pregexp-replace and all other string
stuff. What I want is to get rid of strings completely - and to rewrite
the (brl ...) that it will show a list of short strings and chars as one string,
not as list (hm... there is no reason other then debugging to show the text
representation of s-expressions).
> The displays do go to a
> string port, since you need a content-length to maintain persistent
> connections and let TCP be as fast as it should be. I assumed Kawa's
> string ports did not work by string-append, but never checked.
>
> A reimplementation of BRL in a non-Java environment would be
> interesting. If you do it with Bigloo, will you publish it?
Yes, I will. And you can check this approach in CVS of the project
http://dslengine.sourceforge.net/ - in file CBrl.scm.
|
| |
|
| |
 |
mauhuur

|
Posted: 2004-10-2 11:46:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
Lothar Kimmeringer <email***@***.com> wrote in message news:<email***@***.com>...
> Very well, so a Java-programmer can focus more on solving the
> given problem. My-language-is-better-discusstions suck.
No. Java programmer first have to find how to fit the given problem
into narrow constraints of Java possibilities and into an alien OO ideology.
Lisp programmer first will formulate an algebra for the given problem, then
he will convert this algebra to a programming language (which best fits the
problem domain), and then the solution will be trivial. This is much faster
and cheaper then the Java approach.
|
| |
|
| |
 |
Tor Iver Wilhelmsen

|
Posted: 2004-10-2 15:38:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
email***@***.com (Vitaly Lugovsky) writes:
> Right. C preprocessor is a crap. Templates are better. But Java do not even
> have a crap like C preprocessor.
The uses for which the C preprocessor was intended are not present in
Java. There is no need for #if __WIN32__ etc. to enable multi-platform
code. There is no need for it so it is not added. This is something
called "not adding every kitchen-sink feature just because someone
likes it in a different context".
> Well. We still can use Jatha or AspectJ... They are preprocessors.
> You think that sort of preprocessors are not necessary?
Why do you compare these to the C preprocessor? Do you think it's not
possible to like AspectJ if you don't like macros and conditional
compilation? Do you not see that these are completely different
technologies?
> No. Lisp is for industry. For mass industry. But marketoid monkeys prefered
> to yell about shit like Java, then all "programming" monkeys uses it, not
> because of Java technological supremacy.
Yes, the makers of Java succeeded in marketing their technology to
developers. Makers of Lisp, Smalltalk and all the other niche
languages chose not to, and now they (including you) try to compensate
by childishly attacking the winner, in a "sure he won an Olympic
medal, but my dick is bigger" way. You don't win over developers that
way, but I guess you have given up on that, and focus on how exclusive
you are for using that "secret" language.
|
| |
|
| |
 |
Michael N. Christoff

|
Posted: 2004-10-3 4:29:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
"Vitaly Lugovsky" <email***@***.com> wrote in message
news:email***@***.com...
> >
> > I am getting the impression "Lisp" is a mis-spelling for "Elitist".
>
> No. Lisp is for industry. For mass industry. But marketoid monkeys
prefered
> to yell about shit like Java, then all "programming" monkeys uses it, not
> because of Java technological supremacy.
Exactly what 'mass industries' are you referring to? Are you talking about
'mass industries' that could _theoretically_ use Lisp, or _actual_ 'mass
industries' that do use Lisp?
l8r, Mike N. Christoff
|
| |
|
| |
 |
J鰎n W. Janneck

|
Posted: 2004-10-5 4:43:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
Vitaly Lugovsky wrote:
> Carlos Bazzarella <email***@***.com> wrote in message
[snip]
>> I guess you also don't like democracy because it is a
>> popularity contest !!!
>
> Sure I don't like democracy. How someone without any knowledge in
politics,
> economics and strategy can judge who is eligible to make decisions in this
> areas?!? I am for meritocracy. Want to vote - prove your proficiency. Want
> to rule - you have to be really THE BEST. Not be considered by stupid
crowds
> as "the best", but be really the best.
that position seems to be based on the rather naive assumption that politics
and "ruling" are about finding the "right" or "best" solution to some
problem, rather than being a contest opposing interests of individuals and
their organizations.
apart from being rather ahistorical, it would also seem that it's pretty
much paradoxical---if merit rather than justified interest is what qualifies
for participation, how would the less proficient be persuaded to be ruled by
those more proficient individuals? what would keep them from just kicking
the a**es of the proficient rulers and install any other kind of political
system that gives them a say in what goes on as well? iow, how could your
"meritocracy" be at all a stable political system? (assuming for the sake of
argument it was well-defined in the first place, i.e. there is an objective
measure of what "proficiency" is and how to identify who is "best" at
ruling---which of course there isn't, and hence neither is it.)
-- j
|
| |
|
| |
 |
brintoul

|
Posted: 2004-10-6 1:29:00 |
Top |
java-programmer >> Earth to Sun: When will Java support closures now?
email***@***.com (Vitaly Lugovsky) wrote in message news:<email***@***.com>...
> Bruce Lewis <email***@***.com> wrote in message news:<email***@***.com>...
>
>
> Yes, I will. And you can check this approach in CVS of the project
> http://dslengine.sourceforge.net/ - in file CBrl.scm.
Is the Groovy idea of a closure worthwhile?
http://groovy.codehaus.org/Closures
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Handling of DST in javaStefan Ram wrote:
> Raymond DeCampo <email***@***.com> writes:
>
>>Perhaps, but that is not something the government can easily
>>legislate nor enforce. (Do you really want the time police
>>checking to see if you are working an hour later?)
>
>
> Something like this is done here for the closing-time of
> stores. So, since the government already enforces
> opening-times and closing-times of stores, they could change
> these and they could change to times for schools, universities
> and their own agencies. Some other institutions then might
> follow.
>
By "here", I assume you mean Germany, based on what you wrote below.
There are no such laws in the US with the exception of some states that
have "blue laws" that only apply on Sundays.
Your suggestion sounds like a nightmare where you never know what is
going to be available when.
>
>>There is nothing sacred about the time zone.
>
>
> It is only that, given two time stamps of the legal time for
> a location in Germany, like
>
> 2005-07-10T21:38:10 and
> 1960-07-10T21:38:13
>
> it would be a typical programming task to write a routine
> that can calculate the difference between them in seconds.
> And this would be much more easy, without the need to have
> to find out all details of regulations for DST in Germany.
>
> After WWII, in Germany, there were several different zones
> controlled by different countries and some details for the DST
> differed between these zones. In one zone, there was a special
> DST with two hours added for the mid of summer. Then there are
> reports that there were years with DST even in winter. And so
> on.
>
> All these special regulations make it very difficult to
> write such a routine.
>
This is why any environment worth its salt has these routines available
in a standard library. Asking people to forgo a substantial reduction
in energy use for the (supposed) convenience of computer programmers is
ridiculous. Remember that computers are not an end unto themselves,
they are tools here to serve.
Ray
--
This signature intentionally left blank.
- 2
- sound in JavaHi all!
How is possible to change frequency at java's command beep()? Or
somehow? I need two different beeps in my application. They should be
only a kind of beeps and not playing MIDI or something similar.
Thanks,
Branko
- 3
- Petstore populate dbHello, why some applications like Petstore populate the db
when the application start? It's a java demonstration or is a
usual procedure?
TIA
- 4
- 5
- JSTL concatenateWell.. i wanna to concatenate a string... like:
String x;
while(true)
x += "x";
Then i get xxxxxxxxxxxxxxxxxxxx :)
How do i do that on JSTL?
Here is my code...
<c:set var="valorColuna" value="${rowValues.value}"/>
<c:forEach var="pk" items="${datagrid.primaryKeys}">
<c:set var="pkActual" value="${pk.columnName}"/>
<c:if test="${colunaActual == pkActual}">
<c:set var="pkValor" value="${valorColuna}{$valorColuna}"/>
I have tried without operators but it does not work. JSTL functions
also seem not to help (no concat function!)...
Any sugestions?
Thanks,
JF
- 6
- Apache Derby : create several instances.Hello.
I am using Apache derby database (Client network).
I see that when I create table it is created on an instance APP
(I don't know if instance is the correct word. sorry of my English).
I see that there are other instances (NULLID, SQLJ, SYS, etc).
Can I create an instance of my own in derby database, and how can I do that
?
(One instance may be used for repository, another for Datawarehouse, ...)
Another thing :
If I create several databases for te above reason (repository may be on
another db), how can I join them, when I am connected to database1, and want
to run a query that join both tables from database1 and database2 ?
Thanks :)
- 7
- Global Servlet FilterI'm writing a servlet filter that will keep track of the number of hits
for my site but the site is composed of several web applications. I'd
like to write it in such a way as to allow it to work with all of the
applications at one time, instead of tallying individual counts by hand.
Any pointers or suggestions are appreciated.
Thanks,
-Makr
- 8
- 9
- Please help me
"Andrew Thompson" <email***@***.com> wrote in message
news:email***@***.com...
> On Wed, 9 Jun 2004 19:16:11 +0100, April wrote:
> > "Andrew Thompson" <email***@***.com> wrote in message
> >> On Tue, 8 Jun 2004 16:38:14 +0100, April wrote:
> >>
> >>> I have recently got a new pc but for some reason I am unable to get
java
> > on
> >>> it. I have downloaded it several times and it has gone through the
> > motions
> >>> but still does not work. This is starting to annoy me as many web
sites
> > I go
> >>> to use java. Any ideas anyone please.
>
> > Yes I am running windows XP with internet explorer.
>
> Would you consider using a different browser?
>
> Before we go to what might be a great deal
> of effort, I should point out that internet
> explorer is the single most broken browser
> available.
>
> Installing a browser like Mozilla or Opera,
> then (if necessary) installing Java almost
> always goes smoothly on browsers that are *not*
> IE. Both Opera and Mozilla are also better
> at rendering valid web-pages, and offer things
> that IE simply cannot do.
>
> >> Do you know how to open the command line,
> >> also known as DOS?
>
> > I am not too sure about
> > opening the comand line.
>
> We will leave that for the moment, though
> that may be necessary if you really want
> to coax IE into understanding Java (though
> I cannot make any guarantees we will get
> Java working in IE even then)
>
> >> <http://www.physci.org/pc/properties.jsp>
> ...
> >> Once you download it, double click
> >> it and report what happens.
>
> >..I downloaded jtest but am unable to run it as I
> > have not got the programe to run it with. It asks me if I want to choose
a
> > programe to open it with or look on the internet. I looked on the
internet
> > but I am totally lost.
>
> I had hoped this was a more limited problem,
> but that test rules out those hopes..
>
> >..You can email me if you would likl to.
>
> I answer questions on usenet for free,
> email help costs money. ;-)
>
> For the moment I suggest you try one of
> the other fine browsers available, see
> if you can get Java working in it (which
> will probably be as easy as IE promised,
> but failed to deliver), and get back to us..
>
> --
> Andrew Thompson
> http://www.PhySci.org/ Open-source software suite
> http://www.PhySci.org/codes/ Web & IT Help
> http://www.1point1C.org/ Science & Technology
Ok I am going to try morzila and hope for no problems but if I do get any
then I just system restore.
- 10
- JSR 211 CHAPIHello everybody
Does anyone know if some mobile devices implement JSR211?
Thanks for help
--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-
- 11
- Compiling Java code using Ant within EclipseHi,
I am using Eclipse 3.0 to create a number of Java projects all located
within the same workspace. I had everything building ok but decided to
migrate to using Ant to try and manage things a bit better.
Now when I try and compile my app using Ant it does not find references
to external libraries. Now I suspect I need to specify the classpath in
the build.xml file, but is there a way of telling it to use the set of
libraries I have allready specified via Project->Properties->Java Build
Path->Libraries?
I currently have a build.xml file for each of the projects in my
workspace. Is there a way of creating a build.xml file which invokes
each of these in turn so that I can just do one big build?
Thanks for your help.
Andy
- 12
- Embedded underscoresI noticed Ruby has a convention I wish Java would implement. I think
it could be done without breaking existing code.
You simply permit the _ character to appear embedded in numeric
literals in Java source code. The lead _ would not be permitted, so
you still have no trouble telling a number apart from an identifier.
Then you might write a numeric literal like this:
2006_12_31
or
123_456_679
or
0x1234_5678
or
250_361_9093
or
1000_99
The _ is simply ignored. You use it to break the number up in
whatever way you choose to make it more readable.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
- 13
- Help needed with Realm authorization and AuthenticationDear All
I'm somehow new to weblogic workshop, and i want to have a role based
security for a project.
I used XML based security in web.xml and in web-config.xml . Now i have
a problem, regarding to my project, i want for example, if role A was
logged in, to show him A in one pages of pageflow (for example
index.jsp) and if another role was logged in, not to show him the A.
I mean I want to have access to Roles in the pageFlow, and by knowing
which Role change the sequence of pageflow, do you ever reach this
problem ? any suggestions ?
I think there must be an API for accessing the realm security for
Weblogic.
Shahin Sheidaei
- 14
- String exceeding length - Getting absolute string lengthHello,
I am having a problem when inputting very long strings into a database.
The application I am writing can use different databases (thanks to
the wonders of JDBC) so this issue has been causing problems on both
Oracle and SQL Server.
Because one of the design objects was to support any JDBC compatible
database, a concern was raised about text widths. It was therefore
decided that the maximum column width for a VARCHAR would be a
configurable value. We theoretically knew that data could be more than
a single line so we introduced a sequence number to allow multiple
rows. (Don't ask me why we didn't use CLOBs instead, this is the
schema I'm stuck with.)
We now need to store base64 data in the same fields. The problem is
that in an example 4000 characters as defined by the Java string
object, its physical size is approximently 4430. This seems to be
because of the amount of mark-up involved, either in the base64 data or
possibly with the text between.
It occurs to me that while a non-ASCII value many be only a single
character in a unicode string, it is 6 characters in UTF-8. Therefore
I'm looking for a way of calculates the absolute length, rather than a
count of characters.
Is this possible or will I have to change the schema?
- 15
- how does picking and intersection works ?hi
I am interested i knowing how does the picking and intersection of shapes.
I am more concerned about picksegment and shape3d intersection. what's the
algorithm used and how effective it is. I am interested in the thoery of
all this than programming.
I am using pick segment to pind the intersection point, I have to find the
distance and than do some maths to find the intersection point, is there
an built-in function for this.
Thanks
sonu
|
|
|