I understand what you're saying WRT managed vs. unsafe code. But I don't think it's really analogous to JNI. JNI is an API. You might, for that matter, consider sockets and network connections to make Java unsafe because they could invoke unsafe code.
Everything that runs in the Java VM must pass the verifier and any security policy first. The checks are then at a much higher level: can I use this API? Can I call this method?
No one uses JNI for normal programming... it's an integration thing.
I wasn't trying to say anything in particular about.NET... I know that it has a similar VM. I was just trying to explain what the type safety issue means and what Gosling is talking about WRT Java. I probably could have phrased it differently.
But JNI is not Java... It's an API. For that matter you might consider sockets and network connections to make Java unsafe because they could invoke unsafe applications.
It is completely fair to point out that.NET allows you to choose safe vs. unsafe code... but it is a little different from the Java scenario in that this is unsafe code that is run through the VM. It's just an odd choice to make.
Pat Niemeyer Author of Learning Java, O'Reilly & Associates
Yes, actually, it does. Have you checked it recently? The only overhead that natively compiled Java code would have over comparable C++ is that it always does array bounds checking. Other than that you just have to ask yourself, what kind of optimization can a static compiler (C/C++) do that a dynamic, profiling runtime compiler (Java) can't do?
Garbage collection in Java has been faster than free/malloc in C for years. This is in large part due to the fact that the runtime can recognize very short lived objects and put them on a special part of the heap.
It's not necessary to use unsafe languages to get performance any more.
This is what really distinguishes Java from other languages. The Java verifier is a sort of theorum prover that examines the byte-code and can guarantee that it does not violate certain rules such as forging the type of a reference or under/over-flowing the stack. Because this is done at the verify stage it is still possible to compile the bytecode down to machine level instructions after that and run at full speed. This is why Java is both safe and fast.
To support C/C++ semantics (ad-hoc pointers) you'd have to throw all that out the window and I assume that's what he's talking about.
Pat Niemeyer, Author of Learning Java, O'Reilly & Associates and the BeanShell Java Scripting language.
What I think a lot of us are waiting for is a cheap DDL capable card for the PC to drive a larger monitor. PNY has the Quatro series but they are all priced for the "workstation" market.
Nvidia has the 6800 DDL for the Mac (to drive the 30" cinema display) but nothing for the PC as of yet.
I often like to point out that even with my eyelids closed (which I think most people would grant is an imperfect eye) I can still determine if it's night or day and figure out roughly where in the sky the sun is. With that information I could not only decide the best time to sleep/wake, but over time determine my lattitude or the coming of the change of seasons. Not to mention flinching if something big jumps right in front of me.
I am very happy with my linux / 3Ware 4 port raid card combination. It makes it brain dead simple and takes linux out of the loop of things that could trash the raid. I even forgot to install the *drivers* for the raid in the initial install and it all just worked fine... because the box thinks it's one big magical drive. (The drivers were only necessary for monitoring...)
Spend the extra $200 on a 4 port card... put a *big* fan on the drives because that's the #1 killer and you'll be happy.
I've always wondered about this... Whether it's dogs sniffing drugs or million dollar machines sniffing for explosives - Why don't the bad guys just contaminate the entire area so that you can't use the detector? I mean, wouldn't somebody walking around spilling some nitrate material all over the airport carpets just ruin that airport permanently?
If it's so sensitive that the bad guys can't cleanse themselves of it, how could one possibly clean an entire airport?
Isn't spread spectrum or other frequency hopping technology essentially undetectable? I was wondering about this during all the talk of secret ear-piece communications during the debate;)
I thought the idea was that if you did spread-spectrum right it just looks like noise... isn't that why they invented it? How could anyone detect that just by sniffing?
I almost wrote about this earlier, because it seemed to be such a secret. I bought a Sony DSC-T1 for my wife, just because it was tiny and had good image quality. What I never expected was full quality 30fps MPEG1 video. The video from this camera looks like that from a reasonable camcorder... which is amazing for its size. You have to remember that this thing is *tiny*.
What seemed so odd to me is that Sony wasn't advertising this feature at all. In fact the box says "digital still camera" right on it... It's weird. I haven't taken anything but video with it basically since we got it.
Now, granted with the max memory card size available at the time it only holds six minutes, but that's actually not too bad for many purposes... especially with the ease that you can drop the video onto your laptop.
Southampton's programs executed a known series of 5 to 10 moves which allowed them to recognize each other. After recognition, the two Southampton programs became 'master and slave': one program would keep defecting and the other would keep cooperating.
Am I the only one who thinks this is just kind of obvious and silly?
Also, what kind of "moves" can be made by a "prisoner" that can be seen by the other prisoner?
I just returned from China, where I travelled with my PowerBook and used both dial-up and ethernet connections at many places, including internet cafes and people's homes. After hearing all about the authoritarian firewall and net filtering I was a little surprised to see absolutely no firewall or filtering of any kind in effect. I was able to connect back to my home using SSH, use https to web sites in the U.S. and get to arbitrary places, news sites, and web based email every where I tried.
I could find no evidence of a firewall of any kind. I read about the google results, but what else are people talking about?
I just returned from three weeks running around China with my 17" Powerbook and SLR camera. The best setup I've found is to use a bicycling backpack - they are very strong, but lightweight and have cross straps to help with the weight - in combination with a thin case for the laptop. In my case I've got an "inCase" leather case for the PowerBook and an "Outdoor products" cycling backpack. The pack came with a big pouch for a water bottle, which of course I removed.
The PB just barely fits, but there is enough room for the camera, an extra lense and misc other stuff. You'd never believe it from looking at it. Actually, that's another benefit - it doesn't *look* like you're carrying thousands of dollars worth of electronics around wtih you... You look like a backpacking kid.
In the future I'm planning on fabricating some kind of custom padded interior for the thing to hold camera and camcorder, lenses, etc. individually so that I don't need the individual cases.
I've had the Canon VB-C10 point/tilt/zoom networked camera for over a year now and it is the best I've seen anywhere. The quality of the image and zoom capability means that I can check out my whole living room or zoom in on individual fish in my aquarium.
It has an embedded linux system that serves up an applet viewer, so you can use any web browser to connect to it... it's reasonably fast and works well. On my local network it runs 30fps easily.
It's a bit expensive, but I think it's worth it for the peace of mind when travelling, etc.
Every year the Java naysayers get more and more frustrated and more desperate to find a reason that Java just won't do. For years it was that Java was too slow... that one was true for about 18 months in 1995. Well, maybe now that we can do crypto in Java, play DOOM in Java, and do speech recognition in Java we can finally put it to rest.
Next up - Java's footprint and startup time is too slow... Take a look at what they're doing in Java 1.5 to memory map and share core classes and pre-bind read only classes. Also think about the fact that all that work the HotSpot engine does to optimize things at runtime just gets thrown away every time the VM restarts and ask - why?
Pat Niemeyer Author of Learning Java, O'Reilly & Associates
1) The raid card is well worth the $200 - it will all just work out of the box, looking like one big disk. I forgot to install the 3ware drivers on my first pass and the raid still set up and worked just fine out of firmware - the monitor just wasn't there. Don't mess with software... just buy the card.
2) Put it in the basement! It's always cooler down there... and a little noise won't matter. Temperature is the key to the life span of disks.
3) Also - it's really important that you churn through the data on a regular basis so that the raid can detect bad sectors and repair them in a timely matter or warn you of impending disk failure. The 3ware software does this automatically... but regular backups would accomplish the same. I'm a bit torn on how much reading through the data to do, since I don't use my raid heavily and the read cycle is actually the largest usage... If I overdo it I'm probably shortening the life of the disks.
Pat Niemeyer Author of Learning Java, O'Reilly & Associates
I went through this last year and here's what I came up with for the best benefit to cost ratio with the lowest hassle. In short, take an old PC and put a four channel raid controller card in it to do RAID 5. Add a big extra fan for safety and you're done.
Here's what I came up with: Total cost about $1200 (probably less by now).
0) Red Hat Linux, ext3 filesystem. 1) 3Ware Escalade 7506-4LP card (64 bit card, but fits in 32bit slot) 2) 4x 250Gb Western Digital drives 3) Big fan.
At RAID 5 This yields 750gigs (715Gb after crappy GB conversion).
The 3Ware software has a nice web monitor interface and does daily or weekly integrity checks. It emails me if there is a problem - I did have one drive die already and replaced it easily.
Pat Niemeyer Author of Learning Java, O'Reilly & Associates
As both a developer and a writer I have to say that I don't think I've ever used the caps lock in my life... And it frustrates me to no end that I cannot reliably map it to control on all platforms because of the damned stickiness.
Pat Niemeyer Author of Learning Java, Exploring java, O'Reilly & Associates.
So, I thought that was the rationale for why a D.J. is more than just some poser replacing a CD player... that they somehow responded to the crowd.
If you don't want input from the jackasses in the crowd then what are you doing up there? Wouldn't you do a better job mixing up your stuff if you did it in a sound room and recorded it?
I understand what you're saying WRT managed vs. unsafe code. But I don't think it's really analogous to JNI. JNI is an API. You might, for that matter, consider sockets and network connections to make Java unsafe because they could invoke unsafe code.
Everything that runs in the Java VM must pass the verifier and any security policy first. The checks are then at a much higher level: can I use this API? Can I call this method?
No one uses JNI for normal programming... it's an integration thing.
Pat Niemeyer
I wasn't trying to say anything in particular about .NET... I know that it has a similar VM. I was just trying to explain what the type safety issue means and what Gosling is talking about WRT Java. I probably could have phrased it differently.
Pat Niemeyer
Would you like to be a little more specific in your criticism?
Have you had to generate byte code or deal with the Java verifier? I have.
Pat Niemeyer
But JNI is not Java... It's an API. For that matter you might consider sockets and network connections to make Java unsafe because they could invoke unsafe applications.
.NET allows you to choose safe vs. unsafe code... but it is a little different from the Java scenario in that this is unsafe code that is run through the VM. It's just an odd choice to make.
It is completely fair to point out that
Pat Niemeyer
Author of Learning Java, O'Reilly & Associates
Yes, actually, it does. Have you checked it recently? The only overhead that natively compiled Java code would have over comparable C++ is that it always does array bounds checking. Other than that you just have to ask yourself, what kind of optimization can a static compiler (C/C++) do that a dynamic, profiling runtime compiler (Java) can't do?
Garbage collection in Java has been faster than free/malloc in C for years. This is in large part due to the fact that the runtime can recognize very short lived objects and put them on a special part of the heap.
It's not necessary to use unsafe languages to get performance any more.
Pat Niemeyer
This is what really distinguishes Java from other languages. The Java verifier is a sort of theorum prover that examines the byte-code and can guarantee that it does not violate certain rules such as forging the type of a reference or under/over-flowing the stack. Because this is done at the verify stage it is still possible to compile the bytecode down to machine level instructions after that and run at full speed. This is why Java is both safe and fast.
To support C/C++ semantics (ad-hoc pointers) you'd have to throw all that out the window and I assume that's what he's talking about.
Pat Niemeyer,
Author of Learning Java, O'Reilly & Associates and the BeanShell Java Scripting language.
Would this technique apply to DV video?
What I think a lot of us are waiting for is a cheap DDL capable card for the PC to drive a larger monitor. PNY has the Quatro series but they are all priced for the "workstation" market.
Nvidia has the 6800 DDL for the Mac (to drive the 30" cinema display) but nothing for the PC as of yet.
Pat
I often like to point out that even with my eyelids closed (which I think most people would grant is an imperfect eye) I can still determine if it's night or day and figure out roughly where in the sky the sun is. With that information I could not only decide the best time to sleep/wake, but over time determine my lattitude or the coming of the change of seasons. Not to mention flinching if something big jumps right in front of me.
Imperfect eyes would still be very useful.
Pat
I am very happy with my linux / 3Ware 4 port raid card combination. It makes it brain dead simple and takes linux out of the loop of things that could trash the raid. I even forgot to install the *drivers* for the raid in the initial install and it all just worked fine... because the box thinks it's one big magical drive. (The drivers were only necessary for monitoring...)
Spend the extra $200 on a 4 port card... put a *big* fan on the drives because that's the #1 killer and you'll be happy.
Pat
I've always wondered about this... Whether it's dogs sniffing drugs or million dollar machines sniffing for explosives - Why don't the bad guys just contaminate the entire area so that you can't use the detector? I mean, wouldn't somebody walking around spilling some nitrate material all over the airport carpets just ruin that airport permanently?
If it's so sensitive that the bad guys can't cleanse themselves of it, how could one possibly clean an entire airport?
Pat
Isn't spread spectrum or other frequency hopping technology essentially undetectable? I was wondering about this during all the talk of secret ear-piece communications during the debate ;)
I thought the idea was that if you did spread-spectrum right it just looks like noise... isn't that why they invented it? How could anyone detect that just by sniffing?
Pat
I almost wrote about this earlier, because it seemed to be such a secret. I bought a Sony DSC-T1 for my wife, just because it was tiny and had good image quality. What I never expected was full quality 30fps MPEG1 video. The video from this camera looks like that from a reasonable camcorder... which is amazing for its size. You have to remember that this thing is *tiny*.
What seemed so odd to me is that Sony wasn't advertising this feature at all. In fact the box says "digital still camera" right on it... It's weird. I haven't taken anything but video with it basically since we got it.
Now, granted with the max memory card size available at the time it only holds six minutes, but that's actually not too bad for many purposes... especially with the ease that you can drop the video onto your laptop.
Pat
Southampton's programs executed a known series of 5 to 10 moves which allowed them to recognize each other. After recognition, the two Southampton programs became 'master and slave': one program would keep defecting and the other would keep cooperating.
Am I the only one who thinks this is just kind of obvious and silly?
Also, what kind of "moves" can be made by a "prisoner" that can be seen by the other prisoner?
Pat
I was only in and around Beijing and Xi'an, so I can't speak to the rest of the country.
Pat
I just returned from China, where I travelled with my PowerBook and used both dial-up and ethernet connections at many places, including internet cafes and people's homes. After hearing all about the authoritarian firewall and net filtering I was a little surprised to see absolutely no firewall or filtering of any kind in effect. I was able to connect back to my home using SSH, use https to web sites in the U.S. and get to arbitrary places, news sites, and web based email every where I tried.
I could find no evidence of a firewall of any kind. I read about the google results, but what else are people talking about?
Pat
I just returned from three weeks running around China with my 17" Powerbook and SLR camera. The best setup I've found is to use a bicycling backpack - they are very strong, but lightweight and have cross straps to help with the weight - in combination with a thin case for the laptop. In my case I've got an "inCase" leather case for the PowerBook and an "Outdoor products" cycling backpack. The pack came with a big pouch for a water bottle, which of course I removed.
The PB just barely fits, but there is enough room for the camera, an extra lense and misc other stuff. You'd never believe it from looking at it. Actually, that's another benefit - it doesn't *look* like you're carrying thousands of dollars worth of electronics around wtih you... You look like a backpacking kid.
In the future I'm planning on fabricating some kind of custom padded interior for the thing to hold camera and camcorder, lenses, etc. individually so that I don't need the individual cases.
Pat Niemeyer
I've had the Canon VB-C10 point/tilt/zoom networked camera for over a year now and it is the best I've seen anywhere. The quality of the image and zoom capability means that I can check out my whole living room or zoom in on individual fish in my aquarium.
It has an embedded linux system that serves up an applet viewer, so you can use any web browser to connect to it... it's reasonably fast and works well. On my local network it runs 30fps easily.
It's a bit expensive, but I think it's worth it for the peace of mind when travelling, etc.
Pat Niemeyer
Every year the Java naysayers get more and more frustrated and more desperate to find a reason that Java just won't do. For years it was that Java was too slow... that one was true for about 18 months in 1995. Well, maybe now that we can do crypto in Java, play DOOM in Java, and do speech recognition in Java we can finally put it to rest.
Next up - Java's footprint and startup time is too slow... Take a look at what they're doing in Java 1.5 to memory map and share core classes and pre-bind read only classes. Also think about the fact that all that work the HotSpot engine does to optimize things at runtime just gets thrown away every time the VM restarts and ask - why?
Pat Niemeyer
Author of Learning Java, O'Reilly & Associates
I called my dealer today and he hasn't heard of this yet. He thought I was crazy
Pat
A few more things -
1) The raid card is well worth the $200 - it will all just work out of the box, looking like one big disk. I forgot to install the 3ware drivers on my first pass and the raid still set up and worked just fine out of firmware - the monitor just wasn't there. Don't mess with software... just buy the card.
2) Put it in the basement! It's always cooler down there... and a little noise won't matter. Temperature is the key to the life span of disks.
3) Also - it's really important that you churn through the data on a regular basis so that the raid can detect bad sectors and repair them in a timely matter or warn you of impending disk failure. The 3ware software does this automatically... but regular backups would accomplish the same. I'm a bit torn on how much reading through the data to do, since I don't use my raid heavily and the read cycle is actually the largest usage... If I overdo it I'm probably shortening the life of the disks.
Pat Niemeyer
Author of Learning Java, O'Reilly & Associates
I went through this last year and here's what I came up with for the best benefit to cost ratio with the lowest hassle. In short, take an old PC and put a four channel raid controller card in it to do RAID 5. Add a big extra fan for safety and you're done.
Here's what I came up with: Total cost about $1200 (probably less by now).
0) Red Hat Linux, ext3 filesystem.
1) 3Ware Escalade 7506-4LP card (64 bit card, but fits in 32bit slot)
2) 4x 250Gb Western Digital drives
3) Big fan.
At RAID 5 This yields 750gigs (715Gb after crappy GB conversion).
The 3Ware software has a nice web monitor interface and does daily or weekly integrity checks. It emails me if there is a problem - I did have one drive die already and replaced it easily.
Pat Niemeyer
Author of Learning Java, O'Reilly & Associates
As both a developer and a writer I have to say that I don't think I've ever used the caps lock in my life... And it frustrates me to no end that I cannot reliably map it to control on all platforms because of the damned stickiness.
Pat Niemeyer
Author of Learning Java, Exploring java, O'Reilly & Associates.
So, I thought that was the rationale for why a D.J. is more than just some poser replacing a CD player... that they somehow responded to the crowd.
If you don't want input from the jackasses in the crowd then what are you doing up there? Wouldn't you do a better job mixing up your stuff if you did it in a sound room and recorded it?
Pat
Building BeanShell on my 17" 1Ghz powerbook is faster than on my sparc ultra 60.
But, forget about speed, you'll love the PowerBook.
I've pretty much migrated all my Java development to it without even noticing... It's just a nice platform.
Pat Niemeyer
Author of Learning Java, O'Reilly & Associates and the BeanShell Java scirpting language.