* Announcing JGNAT Professional version 1.0a @ 2000-03-28 0:00 Robert Dewar 2000-03-31 0:00 ` Announcing JGNAT public version 1.0p Robert Dewar 0 siblings, 1 reply; 38+ messages in thread From: Robert Dewar @ 2000-03-28 0:00 UTC (permalink / raw) =========================================================== Ada Core Technologies & ACT Europe Announce JGNAT Professional Release 1.0a New York & Paris, March 27, 2000 Ada Core Technologies and ACT Europe announce JGNAT Professional release 1.0a. JGNAT Professional, the Ada 95 development environment for the Java Platform, is a port of the GNAT Ada 95 technology to the Java environment. JGNAT supports the development of both applications and applets. JGNAT comprises a compiler generating Java bytecode compatible with Java virtual machines conforming to Sun's specification (JDK 1.1 and above), and a set of tools to aid in developing Ada programs for the Java platform. The JGNAT compiler required the development of a new back-end specifically designed for the JVM and written entirely in Ada. JGNAT comes with a powerful tool called jvm2ada that serves to automatically generate compatible Ada bindings for the complete Java API (and in fact for any set of class files). Programmers can use any Java class or component as well as develop Ada classes or components to be used in Java applications and applets and be assured that their code will inter operate with the Java world and Java-enabled browsers. An interesting set of applets and applications is provided with JGNAT to illustrate interfacing between Ada and the Java world. A number of papers comparing Ada 95 and the Java programming language are also provided with this JGNAT release. For further information on JGNAT Professional, please contact our sales offices. In North America and Australia, contact Ada Core Technologies at: Tel: +1 (212) 620 7300 ext 117 Fax: +1 (212) 807 0162 Email: sales@gnat.com In Europe and elsewhere, contact ACT Europe at: Tel: +33 1 49 70 67 16 Fax: +33 1 49 70 05 52 Email: sales@act-europe.fr Sent via Deja.com http://www.deja.com/ Before you buy. ^ permalink raw reply [flat|nested] 38+ messages in thread
* Announcing JGNAT public version 1.0p 2000-03-28 0:00 Announcing JGNAT Professional version 1.0a Robert Dewar @ 2000-03-31 0:00 ` Robert Dewar 2000-04-01 0:00 ` John Merryweather Cooper 0 siblings, 1 reply; 38+ messages in thread From: Robert Dewar @ 2000-03-31 0:00 UTC (permalink / raw) Ada Core Technologies & ACT Europe Announce The first JGNAT public version The Ada 95 Development Environment for the Java Platform New York & Paris, March 31, 2000 Ada Core Technologies and ACT Europe announce the first public release of JGNAT, the Ada 95 Development Environment for the Java Platform. JGNAT is a port of the GNAT Ada 95 technology to the Java environment. JGNAT supports the development of both applications and applets. JGNAT comprises a compiler generating Java bytecode that is compatible with Java virtual machines conforming to Sun's standard (JDK 1.1 and above), and a set of tools to aid in developing Ada programs for the Java platform. The JGNAT compiler required the development of a new back-end specifically designed for the JVM and written entirely in Ada. JGNAT comes with a powerful tool called jvm2ada that serves to automatically generate compatible Ada bindings for the complete set of standardized Java API classes (and in fact for any set of class files). Programmers can use any Java class or component as well as develop Ada classes or components to be used in Java applications and be assured that their code will inter operate with the Java world and Java-enabled browsers. An interesting set of applets and applications is provided with JGNAT to illustrate interfacing between Ada and the Java world. Following the standard policy of Ada Core Technologies and ACT Europe, JGNAT is being distributed under the GNU GPL licensing scheme. Binary versions for this public version of JGNAT are: o GNU/Linux (glibc2.1) o Sun/Solaris o Windows NT 4.0 (as well as Windows 2000, Windows 98 and Windows 95) JGNAT 1.0p can be found at ftp.cs.nyu.edu/pub/gnat/jgnat and on other public sites distributing GNAT related material See the README file for further information on JGNAT. A number of papers comparing Ada 95 and the Java programming language are also provided with JGNAT 1.0p. If you are considering using JGNAT in commercial applications, please contact our sales offices. In the U.S. and Australia, contact Ada Core Technologies at: Tel: +1 (212) 620 7300 ext 117 Fax: +1 (212) 807 0162 Email: sales@gnat.com In Europe and elsewhere, contact ACT Europe at: Tel: +33 1 49 70 67 16 Fax: +33 1 49 70 05 52 Email: sales@act-europe.fr Sent via Deja.com http://www.deja.com/ Before you buy. ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-03-31 0:00 ` Announcing JGNAT public version 1.0p Robert Dewar @ 2000-04-01 0:00 ` John Merryweather Cooper 2000-04-02 0:00 ` Robert Dewar 0 siblings, 1 reply; 38+ messages in thread From: John Merryweather Cooper @ 2000-04-01 0:00 UTC (permalink / raw) Well, I like it. :) Interestingly, the M$ JVM "choked" on the "animation" example, but the same example ran perfectly under the Sun kit . . . and I have the very latest JVM installed along with M$ JDK. :) I'm going to try to compile to an OS/2 binary and see how that works. jmc ================================= "Robert Dewar" <dewar@gnat.com> wrote in message news:8c2613$hce$1@nnrp1.deja.com... > Ada Core Technologies & ACT Europe > > Announce > > The first JGNAT public version The Ada 95 Development > Environment for the Java Platform > > New York & Paris, March 31, 2000 > > > Ada Core Technologies and ACT Europe announce the first > public release of JGNAT, the Ada 95 Development Environment > for the Java Platform. JGNAT is a port of the GNAT Ada 95 > technology to the Java environment. JGNAT supports the > development of both applications and applets. > > JGNAT comprises a compiler generating Java bytecode that is > compatible with Java virtual machines conforming to Sun's > standard (JDK 1.1 and above), and a set of tools to aid in > developing Ada programs for the Java platform. The JGNAT > compiler required the development of a new back-end > specifically designed for the JVM and written entirely in > Ada. > > JGNAT comes with a powerful tool called jvm2ada that serves > to automatically generate compatible Ada bindings for the > complete set of standardized Java API classes (and in fact > for any set of class files). Programmers can use any Java > class or component as well as develop Ada classes or > components to be used in Java applications and be assured > that their code will inter operate with the Java world and > Java-enabled browsers. An interesting set of applets and > applications is provided with JGNAT to illustrate > interfacing between Ada and the Java world. > > Following the standard policy of Ada Core Technologies and > ACT Europe, JGNAT is being distributed under the GNU GPL > licensing scheme. > > Binary versions for this public version of JGNAT are: > > o GNU/Linux (glibc2.1) > o Sun/Solaris > o Windows NT 4.0 (as > well as Windows 2000, Windows 98 and Windows 95) > > JGNAT 1.0p can be found at ftp.cs.nyu.edu/pub/gnat/jgnat > and on other public sites distributing GNAT related material > See the README file for further information on JGNAT. A > number of papers comparing Ada 95 and the Java programming > language are also provided with JGNAT 1.0p. > > If you are considering using JGNAT in commercial > applications, please contact our sales offices. > > In the U.S. and Australia, contact Ada Core Technologies at: > Tel: +1 (212) 620 7300 ext 117 Fax: +1 (212) 807 0162 > Email: sales@gnat.com > > In Europe and elsewhere, contact ACT Europe at: Tel: +33 1 > 49 70 67 16 Fax: +33 1 49 70 05 52 Email: > sales@act-europe.fr > > > > Sent via Deja.com http://www.deja.com/ > Before you buy. > ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-01 0:00 ` John Merryweather Cooper @ 2000-04-02 0:00 ` Robert Dewar 2000-04-02 0:00 ` John Merryweather Cooper 0 siblings, 1 reply; 38+ messages in thread From: Robert Dewar @ 2000-04-02 0:00 UTC (permalink / raw) In article <sedi346n9138@corp.supernews.com>, "John Merryweather Cooper" <jmcoopr@webmail.bmi.net> wrote: > Well, I like it. :) Interestingly, the M$ JVM "choked" on > the "animation" example, but the same example ran perfectly > under the Sun kit Be sure to read the readme file, which discusses which versions of the JVM are compatible with this release of JGNAT. Ideally of course JGNAT should work with all versions of the JVM, and if there really were a secure consistent standard (in the national/international sense) for the JVM that would be easier to achieve. We actually expect to be able to resolve these incompatibilties fairly rapidly, but we did not want to hold up the release till this was dealt with. Meanwhile, be sure to read the documentation! Robert Dewar Ada Core Technologies Sent via Deja.com http://www.deja.com/ Before you buy. ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-02 0:00 ` Robert Dewar @ 2000-04-02 0:00 ` John Merryweather Cooper 2000-04-03 0:00 ` Robert Dewar 0 siblings, 1 reply; 38+ messages in thread From: John Merryweather Cooper @ 2000-04-02 0:00 UTC (permalink / raw) I wasn't SURPRISED that the M$ VM failed (it actually fails twice). Just curious as to how it would behave. It wasn't a criticism of your product so much as an observation that: 1) YMMV depending on the JVM installed; 2) the M$ VM failed (given its long history of incompatibilities--not surprising); and 3) the Sun JDK 1.2.2 had no problem. I had some difficulties getting the source downloaded (can hardly wait to get DSL). But I've got them and I'll start work on an OS/2 binary. jmc ====================== "Robert Dewar" <dewar@gnat.com> wrote in message news:8c7fh4$25g$1@nnrp1.deja.com... > In article <sedi346n9138@corp.supernews.com>, > "John Merryweather Cooper" <jmcoopr@webmail.bmi.net> wrote: > > > Well, I like it. :) Interestingly, the M$ JVM "choked" on > > the "animation" example, but the same example ran perfectly > > under the Sun kit > > Be sure to read the readme file, which discusses which versions > of the JVM are compatible with this release of JGNAT. > > Ideally of course JGNAT should work with all versions of the > JVM, and if there really were a secure consistent standard > (in the national/international sense) for the JVM that would > be easier to achieve. > > We actually expect to be able to resolve these incompatibilties > fairly rapidly, but we did not want to hold up the release till > this was dealt with. Meanwhile, be sure to read the > documentation! > > Robert Dewar > Ada Core Technologies > > > Sent via Deja.com http://www.deja.com/ > Before you buy. ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-02 0:00 ` John Merryweather Cooper @ 2000-04-03 0:00 ` Robert Dewar 2000-04-02 0:00 ` John Merryweather Cooper 2000-04-04 0:00 ` ada_95 0 siblings, 2 replies; 38+ messages in thread From: Robert Dewar @ 2000-04-03 0:00 UTC (permalink / raw) In article <sefra8s2eop75@corp.supernews.com>, "John Merryweather Cooper" <jmcoopr@webmail.bmi.net> wrote: > I wasn't SURPRISED that the M$ VM failed (it actually fails > twice). Just curious as to how it would behave. My point was simply that this should certainly not be a surprise since it is documented in the readme file :-) A general note here is that the readme file is one of the most critical parts of the documentation for a given release. It is where all last minute information is found, and also where we put target dependent information about any system incompatibilities etc. Sent via Deja.com http://www.deja.com/ Before you buy. ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-03 0:00 ` Robert Dewar @ 2000-04-02 0:00 ` John Merryweather Cooper 2000-04-03 0:00 ` Robert Dewar 2000-04-03 0:00 ` Announcing JGNAT public version 1.0p Robert Dewar 2000-04-04 0:00 ` ada_95 1 sibling, 2 replies; 38+ messages in thread From: John Merryweather Cooper @ 2000-04-02 0:00 UTC (permalink / raw) Oh, I agree totally! I did read it. But I was STILL curious what it would do. So, I tried it. :) (What the ****, I have both versions installed . . .) I'm guilty of being "redundant," but I thought it was an important aspect to test. Unfortunately, I've seen way too much documentation that has little to do with reality or the current state of affairs with a particular piece of software. It's nice to have things confirmed. BTW, since the Sun JDK is the "standard," isn't this really a bug issue for the M$ VM and not a failure of JGNAT? jmc =========================== "Robert Dewar" <robert_dewar@my-deja.com> wrote in message news:8c92nl$nqn$1@nnrp1.deja.com... > In article <sefra8s2eop75@corp.supernews.com>, > "John Merryweather Cooper" <jmcoopr@webmail.bmi.net> wrote: > > > I wasn't SURPRISED that the M$ VM failed (it actually fails > > twice). Just curious as to how it would behave. > > My point was simply that this should certainly not be a surprise > since it is documented in the readme file :-) > > A general note here is that the readme file is one of the most > critical parts of the documentation for a given release. It is > where all last minute information is found, and also where we > put target dependent information about any system > incompatibilities etc. > > > Sent via Deja.com http://www.deja.com/ > Before you buy. ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-02 0:00 ` John Merryweather Cooper @ 2000-04-03 0:00 ` Robert Dewar 2000-04-04 0:00 ` Charles Hixson 2000-04-04 0:00 ` JGNAT help puh-leeze G 2000-04-03 0:00 ` Announcing JGNAT public version 1.0p Robert Dewar 1 sibling, 2 replies; 38+ messages in thread From: Robert Dewar @ 2000-04-03 0:00 UTC (permalink / raw) In article <seg4ssgaeop7@corp.supernews.com>, "John Merryweather Cooper" <jmcoopr@webmail.bmi.net> wrote: > Oh, I agree totally! I did read it. But I was STILL curious > what it would do. So, I tried it. :) (What the ****, I have > both versions installed . . > .) I'm guilty of being "redundant," but I thought it was an > important aspect to test. Unfortunately, I've seen way too > much documentation that has little to do with reality or the > current state of affairs with a particular piece of software. > It's nice to have things confirmed. Indeed, it is often difficult to make sure documentation keeps up with software. But the readme files are generally highly accurate since they are prepared for specific releases. For the main GNAT documentation, we have found that it is very helpful that the documentatin source is ASCII (texi) and checked into the same repositories as the sources. This means that developers can modify and update the documentation using the same procedures as they use for the sources. This does not of course guarantee that it gets done, but it is a very useful step forward compared to situations where the documentation is kept in a completely different form, with limited access by specialized documentation folks. We used to keep our documentation in Frame, which made it look a bit nicer, but made if very hard to keep up to date. Robert Dewar Sent via Deja.com http://www.deja.com/ Before you buy. ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-03 0:00 ` Robert Dewar @ 2000-04-04 0:00 ` Charles Hixson 2000-04-05 0:00 ` David Botton 2000-04-05 0:00 ` Geoff Bull 2000-04-04 0:00 ` JGNAT help puh-leeze G 1 sibling, 2 replies; 38+ messages in thread From: Charles Hixson @ 2000-04-04 0:00 UTC (permalink / raw) This is probably just wishful thinking, but is there any smooth way to call Java routines from a GNAT Ada program? (Via a JGnat pass-through would be fine.) ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-04 0:00 ` Charles Hixson @ 2000-04-05 0:00 ` David Botton 2000-04-06 0:00 ` Charles Hixson 2000-04-05 0:00 ` Geoff Bull 1 sibling, 1 reply; 38+ messages in thread From: David Botton @ 2000-04-05 0:00 UTC (permalink / raw) If you are on Windows, the easiest way is through a Java Moniker and COM (any Java class can be used as a COM object with no special coding needed). If you need an example let me know. Also if the distributed Annex (GLADE) becomes available for JGNAT it may also be used. You can also use CORBA as well. David Botton ----- Original Message ----- From: Charles Hixson <charleshixsn@earthlink.net> > This is probably just wishful thinking, but is there any smooth way > to call Java routines from a GNAT Ada program? ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-05 0:00 ` David Botton @ 2000-04-06 0:00 ` Charles Hixson 2000-04-07 0:00 ` hugin777 2000-04-07 0:00 ` Geoff Bull 0 siblings, 2 replies; 38+ messages in thread From: Charles Hixson @ 2000-04-06 0:00 UTC (permalink / raw) I want this to be cross-platform, so a Windows specific answer wouldn't work, and I don't want to need to be present and install software (i.e., I want a truly naive user to be able to just copy it over), so any complex set-up is out. However, another user wrote me to say that ada2jvm, a part of the JGNAT package would do just what I was asking (or was that jvm2ada? need to check it again.). This will let me do the screen designs in Java, where there are tools around and portable libraries that will (almost always) already be installed, and the drive them with an Ada main program that calls the screens to get information. (I believe that JNI would require that the Java program be the main routine, though I haven't checked that out in detail.) David Botton wrote: > If you are on Windows, the easiest way is through a Java Moniker and COM > (any Java class can be used as a COM object with no special coding needed). > If you need an example let me know. > > Also if the distributed Annex (GLADE) becomes available for JGNAT it may > also be used. > > You can also use CORBA as well. > > David Botton > > ----- Original Message ----- > From: Charles Hixson <charleshixsn@earthlink.net> > > > This is probably just wishful thinking, but is there any smooth way > > to call Java routines from a GNAT Ada program? ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-06 0:00 ` Charles Hixson @ 2000-04-07 0:00 ` hugin777 2000-04-07 0:00 ` Robert Dewar ` (3 more replies) 2000-04-07 0:00 ` Geoff Bull 1 sibling, 4 replies; 38+ messages in thread From: hugin777 @ 2000-04-07 0:00 UTC (permalink / raw) In article <38ECB0CC.3B2941E2@earthlink.net>, Charles Hixson <charleshixsn@earthlink.net> wrote: > [..] This will let me do the screen designs in Java, where there are tools around > and portable libraries that will (almost always) already be installed, and the > drive them with an Ada main program that calls the screens to get information. I wonder why you would do that ? AFAICS the only reason could be low-level system interaction (which is not portable:-). The problem with Java is the amount of memory consumed by the JVM, not the speed anymore (again AFAICS). Try this in IBM's JDK 1.1.8: public class Primes { public static void main(String args[]) { final int MAX_PRIME = Integer.parseInt(args[0]); long start = System.currentTimeMillis(); boolean[] isPrime = new boolean[MAX_PRIME]; for (int i = 2; i < MAX_PRIME; i++) isPrime[i] = true; for (int i = 2; i < MAX_PRIME; i++) { if (isPrime[i]) markMultiplum(i, isPrime); } long end = System.currentTimeMillis(); for (int i = 2; i < MAX_PRIME; i++) { if (isPrime[i]) System.out.print(i + ", "); } System.out.print("duration: " + ((end-start)/1000.) + " seconds."); } // This better get inlined !! // (Oh, well, the compiler won't read this, will it ? :-) private static void markMultiplum(int divisor, boolean[] isPrime) { for (int i = divisor+1; i < isPrime.length; i++) { if (isPrime[i] && i % divisor == 0) isPrime[i] = false; } } } <-- cut Note that "markMultiplum" actually get inlined by IBM's JIT ! Then try this in GNAT 3.12: with Ada.text_io; use Ada.text_io; with ada.command_Line; use ada.Command_Line; with Ada.Calendar; use Ada.Calendar; procedure Primes is type BoolArray is array (Integer range <>) of Boolean; -------- procedure MarkMultiplum (Divisor : in Integer; Is_Prime : in out BoolArray) is begin for i in Divisor+1 .. Is_Prime'Last loop if i mod Divisor = 0 then Is_Prime (i) := false; end if; end loop; end MarkMultiplum; pragma Inline (MarkMultiplum); -------- arg : String := Argument (1); Max : Integer := Integer'Value (arg); Is_Prime : BoolArray (2 .. Max) := (others => true); start, finished : Time; tm : Duration; begin start := Clock; for n in Is_Prime'Range loop if Is_Prime(n) then MarkMultiplum (Divisor => n, Is_Prime => Is_Prime); end if; end loop; finished := Clock; tm := finished - start; for I in Is_Prime'Range loop if Is_Prime(i) then Put (i'Img & ","); end if; end loop; Put_Line (tm'Img & " seconds."); end Primes; <-- cut On my machine (with gcc -O3) Java is 3 times faster !! (Due to Pentium optimizations, I guess) Neat 8-) YMMV of course. These kind of "pseudo benchmarks" are of course not worth much - but it gets my point through, anyway :-) PS: I haven't tried JGNAT yet, unfortunately. But I hope the Java version from the Ada source will be as fast as the one from the Java source... Regards, Jens Jakob Jensen, Denmark. Sent via Deja.com http://www.deja.com/ Before you buy. ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-07 0:00 ` hugin777 @ 2000-04-07 0:00 ` Robert Dewar 2000-04-07 0:00 ` Ted Dennison ` (2 more replies) 2000-04-07 0:00 ` Pascal Obry ` (2 subsequent siblings) 3 siblings, 3 replies; 38+ messages in thread From: Robert Dewar @ 2000-04-07 0:00 UTC (permalink / raw) In article <8ckscp$nv7$1@nnrp1.deja.com>, hugin777@my-deja.com wrote: > On my machine (with gcc -O3) Java is 3 times faster !! (Due > to Pentium optimizations, I guess) No, most likely because you did not use the right options for the GNAT run, there are many peformance considerations in doing a comparison like this. For instance, -O3 is usually a bad idea compared to -O2, but likely you should unroll loops, probably you should suppress checks too if you are comparing with Java which has no arithmetic runtime checking. You may also be seeing artifacts in overhead, we often find that primitive benchmarks like this are badly flawed. Of course the main reason for programing in Ada rather than Java is not efficiency, but rather that Ada is a superior language to Java in many respects. I would base the choice primarily on language requirements, unless efficiency becomes known to be a significant issue. Sent via Deja.com http://www.deja.com/ Before you buy. ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-07 0:00 ` Robert Dewar @ 2000-04-07 0:00 ` Ted Dennison 2000-04-08 0:00 ` Geoff Bull 2000-04-08 0:00 ` hugin777 2000-04-08 0:00 ` Geoff Bull 2 siblings, 1 reply; 38+ messages in thread From: Ted Dennison @ 2000-04-07 0:00 UTC (permalink / raw) In article <8ckthd$p99$1@nnrp1.deja.com>, Robert Dewar <robert_dewar@my-deja.com> wrote: > Of course the main reason for programing in Ada rather than > Java is not efficiency, but rather that Ada is a superior > language to Java in many respects. I would base the choice > primarily on language requirements, unless efficiency becomes > known to be a significant issue. ...and in that case, why the heck would you be using Java in the first place? :-) -- T.E.D. http://www.telepath.com/~dennison/Ted/TED.html Sent via Deja.com http://www.deja.com/ Before you buy. ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-07 0:00 ` Ted Dennison @ 2000-04-08 0:00 ` Geoff Bull 0 siblings, 0 replies; 38+ messages in thread From: Geoff Bull @ 2000-04-08 0:00 UTC (permalink / raw) Ted Dennison wrote: > > ...and in that case, why the heck would you be using Java in the first > place? :-) > To avoid some of the woes of C++. (but Java gains a few of its own). ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-07 0:00 ` Robert Dewar 2000-04-07 0:00 ` Ted Dennison @ 2000-04-08 0:00 ` hugin777 2000-04-09 0:00 ` Optimizing flags Was: " Ken O. Burtch 2000-04-08 0:00 ` Geoff Bull 2 siblings, 1 reply; 38+ messages in thread From: hugin777 @ 2000-04-08 0:00 UTC (permalink / raw) In article <8ckthd$p99$1@nnrp1.deja.com>, Robert Dewar <robert_dewar@my-deja.com> wrote: > In article <8ckscp$nv7$1@nnrp1.deja.com>, > hugin777@my-deja.com wrote: > > On my machine (with gcc -O3) Java is 3 times faster !! (Due > > to Pentium optimizations, I guess) > > No, most likely because you did not use the right options > for the GNAT run, there are many peformance considerations in > doing a comparison like this. > > For instance, -O3 is usually a bad idea compared to -O2, > but likely you should unroll loops, probably you should > suppress checks too if you are comparing with Java which > has no arithmetic runtime checking. OK, I tried it with "-O2 -gnatp" - same result. If someone out there has time to find the right way to compile this, or find out where I made an error, please educate me. > You may also be seeing artifacts in overhead, we often find > that primitive benchmarks like this are badly flawed. Yes, I admit that. > Of course the main reason for programing in Ada rather than > Java is not efficiency, but rather that Ada is a superior > language to Java in many respects. I would base the choice > primarily on language requirements, unless efficiency becomes > known to be a significant issue. Yes. My point was that the Java Virtual Machines are quite efficient by now. I didn't intend to say that Java-the-language is better than Ada-the-language - the only reason for not using Ada on the JVM is that I haven't downloaded JGNAT yet ! Regards, Jens Jakob Jensen. Sent via Deja.com http://www.deja.com/ Before you buy. ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Optimizing flags Was: Announcing JGNAT public version 1.0p 2000-04-08 0:00 ` hugin777 @ 2000-04-09 0:00 ` Ken O. Burtch 0 siblings, 0 replies; 38+ messages in thread From: Ken O. Burtch @ 2000-04-09 0:00 UTC (permalink / raw) [snipped discussion of -O3 vs -O2] The Big Online Book of Linux Ada Programming discusses some of the gcc flags for optimizing your gnat code. It also contains an example Ada program and shows the effects of these flags and the various optimization pragmas available. Although the discussion is Linux-focused and doesn't cover JGNAT, it may be helpful to look at it. You can check out the book if you're interested via the Ada Linux Team website at http://www.gnuada.org/alt. Ken Burtch -- Ken O. Burtch: System Manager in a Box / Lintel : Pegasoft http://www.vaxxine.com/pegasoft : R.R.#1 Bio: 34;Bsc,UI,Lang,Games;Toons,Elves,SF,Pizza;Xian : Jordan Station, ON ``````````````````````````````````````````````````````` Canada L0R 1S0 ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-07 0:00 ` Robert Dewar 2000-04-07 0:00 ` Ted Dennison 2000-04-08 0:00 ` hugin777 @ 2000-04-08 0:00 ` Geoff Bull 2 siblings, 0 replies; 38+ messages in thread From: Geoff Bull @ 2000-04-08 0:00 UTC (permalink / raw) Robert Dewar wrote: > For instance, -O3 is usually a bad idea compared to -O2, Why is that? > but likely you should unroll loops, probably you should > suppress checks too if you are comparing with Java which > has no arithmetic runtime checking. I have found turning off Ada checks usually doesn't gain too much. I guess this means the compiler is doing a great job of optimising them. > Ada is a superior language to Java in many respects. I'll second that! Cheers Geoff ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-07 0:00 ` hugin777 2000-04-07 0:00 ` Robert Dewar @ 2000-04-07 0:00 ` Pascal Obry 2000-04-08 0:00 ` Geoff Bull 2000-04-10 0:00 ` Pascal Obry 3 siblings, 0 replies; 38+ messages in thread From: Pascal Obry @ 2000-04-07 0:00 UTC (permalink / raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1105 bytes --] <hugin777@my-deja.com> a �crit dans le message : 8ckscp$nv7$1@nnrp1.deja.com... > In article <38ECB0CC.3B2941E2@earthlink.net>, > > On my machine (with gcc -O3) Java is 3 times faster !! (Due to Pentium > optimizations, I guess) The first thing to do is to build comparable executable :), please try at least with -gnatp. Pascal. -- --|------------------------------------------------------------ --| Pascal Obry Team-Ada Member | --| | --| EDF-DER-IPN-SID- T T I | --| Intranet: http://cln46gb | --| Bureau N-023 e-mail: p.obry@der.edf.fr | --| 1 Av G�n�ral de Gaulle voice : +33-1-47.65.50.91 | --| 92141 Clamart CEDEX fax : +33-1-47.65.50.07 | --| FRANCE | --|------------------------------------------------------------ --| --| http://perso.wanadoo.fr/pascal.obry --| --| "The best way to travel is by means of imagination" ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-07 0:00 ` hugin777 2000-04-07 0:00 ` Robert Dewar 2000-04-07 0:00 ` Pascal Obry @ 2000-04-08 0:00 ` Geoff Bull 2000-04-10 0:00 ` Pascal Obry 3 siblings, 0 replies; 38+ messages in thread From: Geoff Bull @ 2000-04-08 0:00 UTC (permalink / raw) hugin777@my-deja.com wrote: > > In article <38ECB0CC.3B2941E2@earthlink.net>, > Charles Hixson <charleshixsn@earthlink.net> wrote: > > [..] This will let me do the screen designs in Java, where there are > tools around > > and portable libraries that will (almost always) already be installed, > and the > > drive them with an Ada main program that calls the screens to get > information. > > I wonder why you would do that ? Large amount of code already in Ada. Java programs tend to more complicated than Ada programs. low-level system interaction, which can be made reasonably portable. > The problem with Java is the amount of memory consumed by the JVM, not > the speed anymore (again AFAICS). Well I program mainly in Java, not by choice. This claim is plain wrong. Non-trivial java programs require careful design, or they run like a dog. The best I can generally do with Java is half as fast as Ada (that is in a tight loop just calculating with primitive types). > > YMMV of course. These kind of "pseudo benchmarks" are of course not > worth much - but it gets my point through, anyway :-) Well, if what you need to do is calculate primes, then your benchmark would be perfectly reasonable. If you need to model the stock market then your benchmark is irrelevant. I haven't tried your test, but your program is small enough to be able to neatly avoid what is perhaps the worst feature of Java - that all forms of abstraction are heap allocated. The way I reduce this problem in Java is to reuse objects, rather than leaving them to the GC - but that removes one of the supposed benefits of Java. There are other performance gotchas too. Take the Java containers - they contain "generic" objects. When you extract an object you have to cast it back to its actual type, this involves a run time tag check - in practice I have profiled code where this check this check has huge impact. Ada's generics avoids this type of problem all together. Java won't let you turn off any checks to gain speed (which is reasonable for applets, but not for applications). Cheers Geoff If you are finding that Java is a lot faster than native Ada you have definitely done something wrong. ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-07 0:00 ` hugin777 ` (2 preceding siblings ...) 2000-04-08 0:00 ` Geoff Bull @ 2000-04-10 0:00 ` Pascal Obry 2000-04-10 0:00 ` hugin777 3 siblings, 1 reply; 38+ messages in thread From: Pascal Obry @ 2000-04-10 0:00 UTC (permalink / raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 2046 bytes --] <hugin777@my-deja.com> a �crit dans le message : 8ckscp$nv7$1@nnrp1.deja.com... > In article <38ECB0CC.3B2941E2@earthlink.net>, > Charles Hixson <charleshixsn@earthlink.net> wrote: Ok, now I see the problem. You did not code the same algorithm :) Look at markMultiplum in Java you have added a first test isPrime[i] and this is not coded in Ada, most certainly this would reduce Ada time :) > // This better get inlined !! > // (Oh, well, the compiler won't read this, will it ? :-) > private static void markMultiplum(int divisor, boolean[] isPrime) { > for (int i = divisor+1; i < isPrime.length; i++) { > if (isPrime[i] && i % divisor == 0) isPrime[i] = false; > } > procedure MarkMultiplum (Divisor : in Integer; > Is_Prime : in out BoolArray) is > begin > for i in Divisor+1 .. Is_Prime'Last loop > if i mod Divisor = 0 then Is_Prime (i) := false; end if; > end loop; > end MarkMultiplum; Do you mind to try with for i in Divisor+1 .. Is_Prime'Last loop if Is_Prime (i) and then i mod Divisor = 0 then Is_Prime (i) := false; end if; end loop; And anyway this algorithm is very far from being efficient... Pascal. -- --|------------------------------------------------------------ --| Pascal Obry Team-Ada Member | --| | --| EDF-DER-IPN-SID- T T I | --| Intranet: http://cln46gb | --| Bureau N-023 e-mail: p.obry@der.edf.fr | --| 1 Av G�n�ral de Gaulle voice : +33-1-47.65.50.91 | --| 92141 Clamart CEDEX fax : +33-1-47.65.50.07 | --| FRANCE | --|------------------------------------------------------------ --| --| http://perso.wanadoo.fr/pascal.obry --| --| "The best way to travel is by means of imagination" ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-10 0:00 ` Pascal Obry @ 2000-04-10 0:00 ` hugin777 2000-04-10 0:00 ` David Starner ` (3 more replies) 0 siblings, 4 replies; 38+ messages in thread From: hugin777 @ 2000-04-10 0:00 UTC (permalink / raw) In article <8cs4ad$ft3$1@clnews.edf.fr>, "Pascal Obry" <p.obry@der.edf.fr> wrote: > Ok, now I see the problem. You did not code the same algorithm :) > > Look at markMultiplum in Java you have added a first test isPrime[i] and > this is not coded in Ada, most certainly this would reduce Ada time :) > > if (isPrime[i] && i % divisor == 0) isPrime[i] = false; > > if i mod Divisor = 0 then Is_Prime (i) := false; end if; > Do you mind to try with > for i in Divisor+1 .. Is_Prime'Last loop > if Is_Prime (i) and then i mod Divisor = 0 then > Is_Prime (i) := false; > end if; > end loop; > > And anyway this algorithm is very far from being efficient... Thanks a lot ! As you can imaging I feel a bit stupid. But what worries me even more is that the Java version still is consistently faster (but not so much any more) even with the same algorithm (even tried with various combinations of -O2, -O3, -gnatp, Component_Size=1,8,32 &c) !! If Robert Dewar is right and it isn't caused by Pentium optimizations then IBM truly does magic ! How can it be faster when it has to be profiled, JIT'ed and _then_ run at full speed ? Amazing... Or maybe I have overlooked something else. I think I will go back to just lurking for a while :-) Keep up the good work ! PS: I do not really _want_ to calculate primes :-) I just wanted to see how it looked like in ML, Ada and Java. But when I ran it I got a surprise !! PPS: I have just begun studying CS in Denmark (DIKU, Copenhagen), where they apparently love ML. I haven't met others interested in Ada yet. They all seem to prefer the short'n'fast way of ML; sadly. Maybe there's no hope for them... ;-) PPPS: Please educate me as to where I would find a better algorithm! Regards, Jens Jakob Jensen. Sent via Deja.com http://www.deja.com/ Before you buy. ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-10 0:00 ` hugin777 @ 2000-04-10 0:00 ` David Starner 2000-04-11 0:00 ` Brian Rogoff 2000-04-10 0:00 ` Al Christians ` (2 subsequent siblings) 3 siblings, 1 reply; 38+ messages in thread From: David Starner @ 2000-04-10 0:00 UTC (permalink / raw) On Mon, 10 Apr 2000 18:55:55 GMT, hugin777@my-deja.com <hugin777@my-deja.com> wrote: >PS: I do not really _want_ to calculate primes :-) I just wanted to see >how it looked like in ML, Ada and Java. But when I ran it I got a >surprise !! > >PPS: I have just begun studying CS in Denmark (DIKU, Copenhagen), where >they apparently love ML. I haven't met others interested in Ada yet. >They all seem to prefer the short'n'fast way of ML; sadly. Maybe there's >no hope for them... ;-) ML and Ada aren't really in competition. Ada is a safety orientated, strongly typed imperative langauage. ML is a writablity orientated, weirdly typed (-:, functional language. ML's an excellent language to do prototypes and proofs of concept in, whereas Ada and most other low level (compared to ML) languages aren't. OTOH, ML usually isn't the appropriate language for a shipping product. Last time I tried to run a big program in ML, it got bogged down, swapping stuff in and out of core. When I tried rewriting in Ada, I kept having bugs in what ML did automatically (my lists implementation, in specific). -- David Starner - dstarner98@aasaa.ofe.org Only a nerd would worry about wrong parentheses with square brackets. But that's what mathematicians are. -- Dr. Burchard, math professor at OSU ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-10 0:00 ` David Starner @ 2000-04-11 0:00 ` Brian Rogoff 2000-04-11 0:00 ` David Starner 2000-04-11 0:00 ` Tucker Taft 0 siblings, 2 replies; 38+ messages in thread From: Brian Rogoff @ 2000-04-11 0:00 UTC (permalink / raw) On 10 Apr 2000, David Starner wrote: > On Mon, 10 Apr 2000 18:55:55 GMT, hugin777@my-deja.com <hugin777@my-deja.com> wrote: > >PS: I do not really _want_ to calculate primes :-) I just wanted to see > >how it looked like in ML, Ada and Java. But when I ran it I got a > >surprise !! > > > >PPS: I have just begun studying CS in Denmark (DIKU, Copenhagen), where > >they apparently love ML. I haven't met others interested in Ada yet. > >They all seem to prefer the short'n'fast way of ML; sadly. Maybe there's > >no hope for them... ;-) Ouch! Some of us Ada fans are actually ML fans too. But I agree that the DIKU folks have it all wrong since they favor SML, rather than OCaml. Don't they know yet that all of the best programming languages have a strong French design heritage? ;-) Seriously though, SML is a fine language to learn. Knowing proper ML style will help you write clean Ada code in the same way that knowing Ada helps you to write clean C code. If I'm not mistaken, the SML module system even had some impact on the design of Ada 95, in particular generic formal package parameters. I suspect though that SML may be the one language that even Robert Dewar wouldn't learn from its formal definition :-). > ML and Ada aren't really in competition. Ada is a safety orientated, strongly > typed imperative langauage. ML is a writablity orientated, weirdly typed (-:, > functional language. ML's an excellent language to do prototypes and proofs > of concept in, whereas Ada and most other low level (compared to ML) languages > aren't. OTOH, ML usually isn't the appropriate language for a shipping > product. Ouch again a few times. Weirdly typed? Writability orientated? BTW, the company I work for ships a product in (OCa)ML. I see no reason why it is less appropriate than say Perl, Tcl, Python, or Java, all of which are used in shipping products. > Last time I tried to run a big program in ML, it got bogged down, > swapping stuff in and out of core. When I tried rewriting in Ada, I kept > having bugs in what ML did automatically (my lists implementation, > in specific). That's a complaint about implementation, not language. People used to complain that Ada code was slow, too. -- Brian ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-11 0:00 ` Brian Rogoff @ 2000-04-11 0:00 ` David Starner 2000-04-11 0:00 ` Tucker Taft 1 sibling, 0 replies; 38+ messages in thread From: David Starner @ 2000-04-11 0:00 UTC (permalink / raw) On Tue, 11 Apr 2000 08:44:41 -0700, Brian Rogoff <bpr@shell5.ba.best.com> wrote: >On 10 Apr 2000, David Starner wrote: >> ML and Ada aren't really in competition. Ada is a safety orientated, strongly >> typed imperative langauage. ML is a writablity orientated, weirdly typed (-:, >> functional language. ML's an excellent language to do prototypes and proofs >> of concept in, whereas Ada and most other low level (compared to ML) languages >> aren't. OTOH, ML usually isn't the appropriate language for a shipping >> product. > >Ouch again a few times. Weirdly typed? Writability orientated? Okay, strongly typed with type inferance. I've never seen ML's form of typing in any other language. SML seems strongly orientated to writability, including constructs ("and", as opposed to forward references) orienated towards typing into an interpreter instead of writing it and running it through the interpreter. >BTW, the company I work for ships a product in (OCa)ML. I see no reason >why it is less appropriate than say Perl, Tcl, Python, or Java, all of >which are used in shipping products. Fair enough. But all of those languages are in a different class than C++ or Ada, and appropriately used for a different set of shipping products. >> Last time I tried to run a big program in ML, it got bogged down, >> swapping stuff in and out of core. When I tried rewriting in Ada, I kept >> having bugs in what ML did automatically (my lists implementation, >> in specific). > >That's a complaint about implementation, not language. People used to >complain that Ada code was slow, too. Yes and no. The reason why Ada code was slow, was partially because Ada's main goal was safety. While efficency was a primary goal, other things took precedence. Hence it took work to make an efficent Ada compiler, more than it would have for C or Fortran, two languages with efficency as a main goal. (S)ML doesn't seem to have efficency as a major goal. Hence, a naive implementation will be slow. Can a good implementation make up much of the difference? Probably. But there's only so much that can be done, and it's questionable whether a well-written functional program will ever catch up to a well-written imperative program, just like well-written assembly is still faster than well-written imperative programs. -- David Starner - dstarner98@aasaa.ofe.org Only a nerd would worry about wrong parentheses with square brackets. But that's what mathematicians are. -- Dr. Burchard, math professor at OSU ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-11 0:00 ` Brian Rogoff 2000-04-11 0:00 ` David Starner @ 2000-04-11 0:00 ` Tucker Taft 2000-04-11 0:00 ` Brian Rogoff 1 sibling, 1 reply; 38+ messages in thread From: Tucker Taft @ 2000-04-11 0:00 UTC (permalink / raw) Brian Rogoff wrote: > ... > Seriously though, SML is a fine language to learn. Knowing proper ML style > will help you write clean Ada code in the same way that knowing Ada helps > you to write clean C code. If I'm not mistaken, the SML module system > even had some impact on the design of Ada 95, in particular generic > formal package parameters. SML may be nice, but the designer of the Ada95 formal package parameter facility (;-) had very little knowledge of SML at the time of its design. I wonder where the idea that SML influenced Ada 95 came from... (For what it is worth, the VHDL library system was the initial spark toward developing the "child package" capability in Ada 95, although the Ada95 capability is a more general mechanism.) > ... > -- Brian -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-11 0:00 ` Tucker Taft @ 2000-04-11 0:00 ` Brian Rogoff 0 siblings, 0 replies; 38+ messages in thread From: Brian Rogoff @ 2000-04-11 0:00 UTC (permalink / raw) On Tue, 11 Apr 2000, Tucker Taft wrote: > Brian Rogoff wrote: > > ... > > Seriously though, SML is a fine language to learn. Knowing proper ML style > > will help you write clean Ada code in the same way that knowing Ada helps > > you to write clean C code. If I'm not mistaken, the SML module system > > even had some impact on the design of Ada 95, in particular generic > > formal package parameters. > > SML may be nice, but the designer of the Ada95 formal package parameter > facility (;-) had very little knowledge of SML at the time of its design. > I wonder where the idea that SML influenced Ada 95 came from... Well, obviously, you know better than I do :-) I got this idea from these papers. The bracketed comment is from one of the authors, as I clipped the refs from a web page. Shen J., Cormack G.V., and Duggan D., Local package instances are not equivalent to generic formal package parameters, ACM Ada Letters 12:6 (1992), 47-49. Shen J. and Cormack G.V., On generic formal package parameters in Ada 9X, ACM Ada Letters 12:3 (1992), 110-116. [Part of this work was adopted by the Ada 9X committee for incorporation into the programming language Ada] These papers mention the SML module system as an influence on their proposals and their propsals as influential on Ada 95. Sorry for spreading misinformation! -- Brian ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-10 0:00 ` hugin777 2000-04-10 0:00 ` David Starner @ 2000-04-10 0:00 ` Al Christians 2000-04-11 0:00 ` Pascal Obry 2000-04-12 0:00 ` Pascal Obry 3 siblings, 0 replies; 38+ messages in thread From: Al Christians @ 2000-04-10 0:00 UTC (permalink / raw) hugin777@my-deja.com wrote: > > How can it be faster when it has to be > profiled, JIT'ed and _then_ run at full speed ? > > Amazing... Or maybe I have overlooked something else. > There's some theory that virtual machine bytecode languages gain much performance advantage from modern hardware because of caching. Accessing memory takes much more time than processing data. Still, on my machine, Java runs as fast or slightly faster than compiled languages expected to be efficient only when little or no creation/destruction of objects is going on. When Java has to do that, it runs many times slower than the competition. But the hardware is getting so fast that, for many things, you might use jvm for a week before you even noticed that it was slower than anything else. Al ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-10 0:00 ` hugin777 2000-04-10 0:00 ` David Starner 2000-04-10 0:00 ` Al Christians @ 2000-04-11 0:00 ` Pascal Obry 2000-04-12 0:00 ` Pascal Obry 3 siblings, 0 replies; 38+ messages in thread From: Pascal Obry @ 2000-04-11 0:00 UTC (permalink / raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1341 bytes --] <hugin777@my-deja.com> a �crit dans le message : 8ct83j$ho3$1@nnrp1.deja.com... > > PPPS: Please educate me as to where I would find a better algorithm! Well at least you could write MarkMultiplum this way (code not tested): procedure MarkMultiplum (Divisor : in Integer; Is_Prime : in out BoolArray) is K : Integer := Divisor; begin loop Is_Prime (K) := False; K := K + Disivor; exit when K > Is_Prime'Last; end loop; end MarkMultiplum; Pascal. -- --|------------------------------------------------------------ --| Pascal Obry Team-Ada Member | --| | --| EDF-DER-IPN-SID- T T I | --| Intranet: http://cln46gb | --| Bureau N-023 e-mail: p.obry@der.edf.fr | --| 1 Av G�n�ral de Gaulle voice : +33-1-47.65.50.91 | --| 92141 Clamart CEDEX fax : +33-1-47.65.50.07 | --| FRANCE | --|------------------------------------------------------------ --| --| http://perso.wanadoo.fr/pascal.obry --| --| "The best way to travel is by means of imagination" ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-10 0:00 ` hugin777 ` (2 preceding siblings ...) 2000-04-11 0:00 ` Pascal Obry @ 2000-04-12 0:00 ` Pascal Obry 3 siblings, 0 replies; 38+ messages in thread From: Pascal Obry @ 2000-04-12 0:00 UTC (permalink / raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1290 bytes --] hugin777@my-deja.com a �crit dans le message <8ct83j$ho3$1@nnrp1.deja.com>... >In article <8cs4ad$ft3$1@clnews.edf.fr>, > "Pascal Obry" <p.obry@der.edf.fr> wrote: > > >Thanks a lot ! You're welcome :) > >As you can imaging I feel a bit stupid. But what worries me even more is >that the Java version still is consistently faster (but not so much any >more) even with the same algorithm (even tried with various combinations >of -O2, -O3, -gnatp, Component_Size=1,8,32 &c) !! > If Robert Dewar is right and it isn't caused by Pentium optimizations >then IBM truly does magic ! How can it be faster when it has to be >profiled, JIT'ed and _then_ run at full speed ? Well, I don't have the full source right now, but I think that the time computation was inside the code so it compute only the time spent in the program not the profile, JIT phase. Right ? > >Amazing... Or maybe I have overlooked something else. > See above. Pascal. --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://perso.wanadoo.fr/pascal.obry --| --| "The best way to travel is by means of imagination" ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-06 0:00 ` Charles Hixson 2000-04-07 0:00 ` hugin777 @ 2000-04-07 0:00 ` Geoff Bull 1 sibling, 0 replies; 38+ messages in thread From: Geoff Bull @ 2000-04-07 0:00 UTC (permalink / raw) Charles Hixson wrote: > > I want this to be cross-platform, so a Windows specific answer wouldn't work, > and I don't want to need to be present and install software (i.e., I want a > truly naive user to be able to just copy it over), so any complex set-up is > out. > > However, another user wrote me to say that ada2jvm, a part of the JGNAT package > would do just what I was asking (or was that jvm2ada? need to check it again.). > This will let me do the screen designs in Java, where there are tools around > and portable libraries that will (almost always) already be installed, and the > drive them with an Ada main program that calls the screens to get information. > > (I believe that JNI would require that the Java program be the main routine, > though I haven't checked that out in detail.) > You obviously didn't check out my previous reply: Geoff Bull wrote: > You can use the jni binding at http://www.acenet.com.au/~gbull All the examples provided there have the main routine written in Java. If it were not possible to to this, it would be *very* difficult to write a java launcher :-) I am confused as to whether you want to compile your Ada with gnat or jgnat. Cheers Geoff Cheers Geoff ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-04 0:00 ` Charles Hixson 2000-04-05 0:00 ` David Botton @ 2000-04-05 0:00 ` Geoff Bull 1 sibling, 0 replies; 38+ messages in thread From: Geoff Bull @ 2000-04-05 0:00 UTC (permalink / raw) Charles Hixson wrote: > > This is probably just wishful thinking, but is there any smooth way > to call Java routines from a GNAT Ada program? (Via a JGnat > pass-through would be fine.) I think you mean from native ada? ('cause from jgnat it is trivial). You can use the jni binding at http://www.acenet.com.au/~gbull and see if that is smooth enough (might be a bit tedious if you have lots of methods to call). What's a "pass-through"? Cheers Geoff ^ permalink raw reply [flat|nested] 38+ messages in thread
* JGNAT help puh-leeze 2000-04-03 0:00 ` Robert Dewar 2000-04-04 0:00 ` Charles Hixson @ 2000-04-04 0:00 ` G 2000-04-04 0:00 ` Geoff Bull 1 sibling, 1 reply; 38+ messages in thread From: G @ 2000-04-04 0:00 UTC (permalink / raw) I am still working at a novice level in all of this. However - I am wondering, after installing the JGNAT over my GNAT, I have problems running some examples because of an aborted installation of Borland's JBUILDER which has inserted itself into some of the path operations. It is not evident in my autoexec.bat file... so I can't trial the examples. Any advice ? Also - The JGNAT outputs class files. Ok, but why is it that after compiling the hello.adb file to hello.class that I can't run the class file with "java hello" at the command line prompt ? Thanks, Graeme Robert Dewar wrote: > In article <seg4ssgaeop7@corp.supernews.com>, > "John Merryweather Cooper" <jmcoopr@webmail.bmi.net> wrote: > > Oh, I agree totally! I did read it. But I was STILL curious > > what it would do. So, I tried it. :) (What the ****, I have > > both versions installed . . > > .) I'm guilty of being "redundant," but I thought it was an > > important aspect to test. Unfortunately, I've seen way too > > much documentation that has little to do with reality or the > > current state of affairs with a particular piece of software. > > It's nice to have things confirmed. > > Indeed, it is often difficult to make sure documentation keeps > up with software. But the readme files are generally highly > accurate since they are prepared for specific releases. > > For the main GNAT documentation, we have found that it is > very helpful that the documentatin source is ASCII (texi) and > checked into the same repositories as the sources. This means > that developers can modify and update the documentation using > the same procedures as they use for the sources. This does not > of course guarantee that it gets done, but it is a very useful > step forward compared to situations where the documentation is > kept in a completely different form, with limited access by > specialized documentation folks. We used to keep our > documentation in Frame, which made it look a bit nicer, but > made if very hard to keep up to date. > > Robert Dewar > > Sent via Deja.com http://www.deja.com/ > Before you buy. -- ---------------------------------------------------------------- G.M. Wallace Australia ---------------------------------------------------------------- "They paved paradise, put up a parking lot." ~ Joni Mitchell ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: JGNAT help puh-leeze 2000-04-04 0:00 ` JGNAT help puh-leeze G @ 2000-04-04 0:00 ` Geoff Bull 2000-04-06 0:00 ` G 0 siblings, 1 reply; 38+ messages in thread From: Geoff Bull @ 2000-04-04 0:00 UTC (permalink / raw) maybe you should take this to the gnat chat list G wrote: > > after installing the JGNAT over my GNAT, ^^^^ Why did you do that? - I installed it somewhere else. > I have problems running some > examples because of an aborted installation of Borland's JBUILDER which > has inserted itself > into some of the path operations. I don't understand what you are saying here? > It is not evident in my autoexec.bat > file... so I can't trial the examples. Oh so you're using win95/98, always helpful to say so. Do you mean the JBUILDER install has screwed up your autoexec and you don't know how to fix it? > Any advice ? Without more information on the problem, nobody can help you. You could restore your autoexec form a backup. > Also - The JGNAT outputs class files. Ok, but why is it that after > compiling the hello.adb file to hello.class that I can't run the class > file with "java hello" at the command line prompt ? I tried this out on nt and had no problems. If you don't say what happened when you tried "java hello" nobody can do any more than guess at your problem Here is my guess: You didn't read the documentation (in particular jgnat-1.0p-README.txt) you got java.lang.NoClassDefFoundError, right? Search the doco for CLASSPATH and you will find the solution. If my guess is wrong, maybe you fouled up the installation? Cheers Geoff ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: JGNAT help puh-leeze 2000-04-04 0:00 ` Geoff Bull @ 2000-04-06 0:00 ` G 2000-04-06 0:00 ` Geoff Bull 0 siblings, 1 reply; 38+ messages in thread From: G @ 2000-04-06 0:00 UTC (permalink / raw) Geoff Bull wrote: > maybe you should take this to the gnat chat list > sorry > > G wrote: > > > > > after installing the JGNAT over my GNAT, > ^^^^ > Why did you do that? - I installed it somewhere else. > I botched it. > > > I have problems running some > > examples because of an aborted installation of Borland's JBUILDER which > > has inserted itself > > into some of the path operations. > > I don't understand what you are saying here? > > > It is not evident in my autoexec.bat > > file... so I can't trial the examples. > > Oh so you're using win95/98, always helpful to say so. > Do you mean the JBUILDER install has screwed up your autoexec > and you don't know how to fix it? > I can fix autoexec - but when I enter "make run" at the prompt in DOS everything starts fine but then I get an error message with can't find C:\JBUILDER\JDK1.2.2 ... (etc.) But the JBUILDER directory doesn't exist > > > Any advice ? > Without more information on the problem, nobody can help you. > You could restore your autoexec form a backup. > > > Also - The JGNAT outputs class files. Ok, but why is it that after > > compiling the hello.adb file to hello.class that I can't run the class > > file with "java hello" at the command line prompt ? > > I tried this out on nt and had no problems. > If you don't say what happened when you tried "java hello" > nobody can do any more than guess at your problem > Here is my guess: > You didn't read the documentation (in particular jgnat-1.0p-README.txt) > you got java.lang.NoClassDefFoundError, right? No. > > Search the doco for CLASSPATH and you will find the solution. > > If my guess is wrong, maybe you fouled up the installation? > You got that right. I scrapped it and gnat and am re-downloading gnat altogether > > Cheers > Geoff thanks G -- ---------------------------------------------------------------- G.M. Wallace Australia ---------------------------------------------------------------- "They paved paradise, put up a parking lot." ~ Joni Mitchell ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: JGNAT help puh-leeze 2000-04-06 0:00 ` G @ 2000-04-06 0:00 ` Geoff Bull 0 siblings, 0 replies; 38+ messages in thread From: Geoff Bull @ 2000-04-06 0:00 UTC (permalink / raw) To: G G wrote: > I can fix autoexec - but when I enter "make run" at the prompt in DOS > everything starts fine but then I get an error message with > can't find C:\JBUILDER\JDK1.2.2 ... (etc.) But the JBUILDER directory > doesn't exist > > > > > > Any advice ? Here's another guess (but more informed). Try searching the registry for C:\JBUILDER\JDK1.2.2 Did you install jbuilder after Sun's jdk? Maybe it overwrote the keys the jdk launcher users to find its runtime (highly likely 'cause it is shipped with a sun jvm). I would check the registry keys sun's jdk uses: Software\JavaSoft\Java Runtime Environment\1.2 Software\JavaSoft\Java Development Kit\1.2 Might be just as easy to uninstall & reinstall jdk. Hope this helps Geoff ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-02 0:00 ` John Merryweather Cooper 2000-04-03 0:00 ` Robert Dewar @ 2000-04-03 0:00 ` Robert Dewar 1 sibling, 0 replies; 38+ messages in thread From: Robert Dewar @ 2000-04-03 0:00 UTC (permalink / raw) In article <seg4ssgaeop7@corp.supernews.com>, "John Merryweather Cooper" <jmcoopr@webmail.bmi.net> wrote: > BTW, since the Sun JDK is the "standard," isn't this really a > bug issue for the M$ VM and not a failure of JGNAT? It is only a behavioral standard, and not immune to bugs, so one cannot be certain of this judgment. In practice not all JVM's behave the same way in various marginal cases :-) It would be nice if we could take this attitude, but from a realistic point of view, it is not reasonable to do so! Sent via Deja.com http://www.deja.com/ Before you buy. ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: Announcing JGNAT public version 1.0p 2000-04-03 0:00 ` Robert Dewar 2000-04-02 0:00 ` John Merryweather Cooper @ 2000-04-04 0:00 ` ada_95 1 sibling, 0 replies; 38+ messages in thread From: ada_95 @ 2000-04-04 0:00 UTC (permalink / raw) Will there be a chat list dedicated for JGNAT? Sent via Deja.com http://www.deja.com/ Before you buy. ^ permalink raw reply [flat|nested] 38+ messages in thread
end of thread, other threads:[~2000-04-12 0:00 UTC | newest] Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2000-03-28 0:00 Announcing JGNAT Professional version 1.0a Robert Dewar 2000-03-31 0:00 ` Announcing JGNAT public version 1.0p Robert Dewar 2000-04-01 0:00 ` John Merryweather Cooper 2000-04-02 0:00 ` Robert Dewar 2000-04-02 0:00 ` John Merryweather Cooper 2000-04-03 0:00 ` Robert Dewar 2000-04-02 0:00 ` John Merryweather Cooper 2000-04-03 0:00 ` Robert Dewar 2000-04-04 0:00 ` Charles Hixson 2000-04-05 0:00 ` David Botton 2000-04-06 0:00 ` Charles Hixson 2000-04-07 0:00 ` hugin777 2000-04-07 0:00 ` Robert Dewar 2000-04-07 0:00 ` Ted Dennison 2000-04-08 0:00 ` Geoff Bull 2000-04-08 0:00 ` hugin777 2000-04-09 0:00 ` Optimizing flags Was: " Ken O. Burtch 2000-04-08 0:00 ` Geoff Bull 2000-04-07 0:00 ` Pascal Obry 2000-04-08 0:00 ` Geoff Bull 2000-04-10 0:00 ` Pascal Obry 2000-04-10 0:00 ` hugin777 2000-04-10 0:00 ` David Starner 2000-04-11 0:00 ` Brian Rogoff 2000-04-11 0:00 ` David Starner 2000-04-11 0:00 ` Tucker Taft 2000-04-11 0:00 ` Brian Rogoff 2000-04-10 0:00 ` Al Christians 2000-04-11 0:00 ` Pascal Obry 2000-04-12 0:00 ` Pascal Obry 2000-04-07 0:00 ` Geoff Bull 2000-04-05 0:00 ` Geoff Bull 2000-04-04 0:00 ` JGNAT help puh-leeze G 2000-04-04 0:00 ` Geoff Bull 2000-04-06 0:00 ` G 2000-04-06 0:00 ` Geoff Bull 2000-04-03 0:00 ` Announcing JGNAT public version 1.0p Robert Dewar 2000-04-04 0:00 ` ada_95
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox