Re: [computer-go] Language [offtopic, aside]
On 15/11/2007, steve uurtamo [EMAIL PROTECTED] wrote: the more i think about it, the more i love whatever language i'm using for whatever project i'm working on. some projects would be (or are) horrifying to try to implement in some languages [the matlab-C example springs to mind], so, since learning new languages isn't a gigantic burden, the only relevance is the intended application, i suppose. which is a very cumbersome way of repeating (reinforcing?) what other people have already said. The logical (but worrying) conclusion I draw from that paragraph is that you would like to see a language with an intended application of go... Or am I misunderstanding you? cheers stuart ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language [offtopic, aside]
Hi, On Nov 20, 2007 3:03 PM, Stuart A. Yeates [EMAIL PROTECTED] wrote: The logical (but worrying) conclusion I draw from that paragraph is that you would like to see a language with an intended application of go... Why would that be a worrying conclusion? regards, Vlad ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language
My 2 cents about languages. C is the universal assembly language. I don't think I've ever used a computer family that didn't have a C compiler on it (after C was invented of course). Often new languages, to get started, will just translate into C code and then compile with the C compiler. I wrote my first Go programs earlier this year. I first used Ruby and it was short and easy to write. The GTP protocol (enough for CGOS) took only about 1 page of code. However in timing tests, it could only do about 30 game simulations per second. This was unacceptable and I abandoned Ruby. Next I translated the ideas into C++. Everything was more work, but I anticipated a 10-20 times speed up so it seemed the tradeoff would be worth it. After finishing, I did the same timing tests as with Ruby and it did 9000 game simulations per second without much optimization. I knew, of course, that Ruby is slower than C++ but a factor of 300 is amazing. It helps to have explicit control of memory and mature C compilers that generate fast code. I am still wondering how Ruby could be so much slower than C++. Perhaps this problem is just not suited for Ruby. Chuck Paulson ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language
I'll try that with my Ruby GTP code. I'm assuming random moves until no non-eye-filling moves are left and on a 9x9 board? On Nov 20, 2007 9:58 AM, Chuck Paulson [EMAIL PROTECTED] wrote: My 2 cents about languages. C is the universal assembly language. I don't think I've ever used a computer family that didn't have a C compiler on it (after C was invented of course). Often new languages, to get started, will just translate into C code and then compile with the C compiler. I wrote my first Go programs earlier this year. I first used Ruby and it was short and easy to write. The GTP protocol (enough for CGOS) took only about 1 page of code. However in timing tests, it could only do about 30 game simulations per second. This was unacceptable and I abandoned Ruby. Next I translated the ideas into C++. Everything was more work, but I anticipated a 10-20 times speed up so it seemed the tradeoff would be worth it. After finishing, I did the same timing tests as with Ruby and it did 9000 game simulations per second without much optimization. I knew, of course, that Ruby is slower than C++ but a factor of 300 is amazing. It helps to have explicit control of memory and mature C compilers that generate fast code. I am still wondering how Ruby could be so much slower than C++. Perhaps this problem is just not suited for Ruby. Chuck Paulson ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/ ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language [offtopic, aside]
Go-specific language? Sprinkle in a few Common Lisp macros, stir well ... Terry McIntyre [EMAIL PROTECTED] They mean to govern well; but they mean to govern. They promise to be kind masters; but they mean to be masters. -- Daniel Webster - Original Message From: Vlad Dumitrescu [EMAIL PROTECTED] To: computer-go computer-go@computer-go.org Sent: Tuesday, November 20, 2007 6:46:35 AM Subject: Re: [computer-go] Language [offtopic, aside] Hi, On Nov 20, 2007 3:03 PM, Stuart A. Yeates [EMAIL PROTECTED] wrote: The logical (but worrying) conclusion I draw from that paragraph is that you would like to see a language with an intended application of go... Why would that be a worrying conclusion? regards, Vlad ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language
Hi, I think the reason for Ruby being so much slower is because it is an interpreted language rather than a compiled language. So when you run the program, a Ruby interpreter has to translate the instructions to machine code as they are running, instead of a compiled language like C where this is done at compile time. As for my opinions on languages, most of my experience is with C/C++, but I have begun using Java recently. Java is what I am using for the Go program I am writing, mainly because even after years of using C++, I still find it easier and faster to code in Java (using Eclipse) than with C++. The OP mentioned that Java is slow, but I have actually read that in the recent years it has become comparably faster to C++, although I haven't tested this personally (I hope this isn't going to start a holy war between the Java and C++ people here). I have also done quite a bit of Perl programming, although it's use seems much more specialized that C++ or Java. I basically only use it in two situations: When I have to do a lot of processing with text, or when I want to create a program very quickly to perform a certain task and I don't care that I won't be able to understand what I wrote if I look at it a week later. Colin (I just joined this list last week, this is my first post) On Nov 20, 2007 9:58 AM, Chuck Paulson [EMAIL PROTECTED] wrote: My 2 cents about languages. C is the universal assembly language. I don't think I've ever used a computer family that didn't have a C compiler on it (after C was invented of course). Often new languages, to get started, will just translate into C code and then compile with the C compiler. I wrote my first Go programs earlier this year. I first used Ruby and it was short and easy to write. The GTP protocol (enough for CGOS) took only about 1 page of code. However in timing tests, it could only do about 30 game simulations per second. This was unacceptable and I abandoned Ruby. Next I translated the ideas into C++. Everything was more work, but I anticipated a 10-20 times speed up so it seemed the tradeoff would be worth it. After finishing, I did the same timing tests as with Ruby and it did 9000 game simulations per second without much optimization. I knew, of course, that Ruby is slower than C++ but a factor of 300 is amazing. It helps to have explicit control of memory and mature C compilers that generate fast code. I am still wondering how Ruby could be so much slower than C++. Perhaps this problem is just not suited for Ruby. Chuck Paulson ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/ ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language [offtopic, aside]
On 20/11/2007, Vlad Dumitrescu [EMAIL PROTECTED] wrote: Hi, On Nov 20, 2007 3:03 PM, Stuart A. Yeates [EMAIL PROTECTED] wrote: The logical (but worrying) conclusion I draw from that paragraph is that you would like to see a language with an intended application of go... Why would that be a worrying conclusion? It would be worrying because in the last 20 years there has been a trend away from application specific and domain specific programming languages to application and platform independent languages with application/domain specific libraries. As near as I can tell the primary motivation for this is the resource overhead of building, and maintaining a language and tool chain. The economies of scale are just much better if you cover more {platforms, domains, applications}. You can get much more bang (and many more shiny toys) for your buck by joining an established language / toolchain. There are exceptions to this, mainly where the field is well understood and extremely specialised and the language has the backing of deep-pocketed companies (i.e. PDF, VHDL, etc). cheers stuart ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language [offtopic, aside]
On Thu, Nov 15, 2007 at 04:41:19AM -0800, steve uurtamo wrote: the more i think about it, the more i love whatever language i'm using for whatever project i'm working on. some projects would be (or are) horrifying to try to implement in some languages [the matlab-C example springs to mind], so, since learning new languages isn't a gigantic burden, the only relevance is the intended application, i suppose. which is a very cumbersome way of repeating (reinforcing?) what other people have already said. This also applies _inside_ the domain of Go, I guess. C-ish language might be one of the natural choices if you are writing a Monte Carlo style engine and need to have a blinding fast board library. But if you are approaching the problem completely differently (say, heavy pattern matching and complicated computations - but few iterations), some other language might be quite more appropriate at least for the proof of concept. (Yes, you can write the board library in C and then build on that in some other language. But in case of programs where the Monte Carlo or something alike is at the core, it is likely the bulk of the code anyway, and the part you will be debugging the most. Would the additional headaches and overhead of mixing two languages pay off?) -- Petr Pasky Baudis We don't know who it was that discovered water, but we're pretty sure that it wasn't a fish. -- Marshall McLuhan ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language
Java and C# are both compiled at some point if the same loop is running repeatedly. Java is usually compiled just in time which is to say as each function is first run. I'm not sure how C# is executed, but I think it gets compiled before execution. In theory, ruby and python could also be compiled, it just isn't implemented that way. But, compiling weakly typed languages is unlikely to give a big performance boost and could even hurt it a bit by making large code (if the compiler was not good). If compilers were much smarter though, perhaps python and ruby would be able to be compiled and get a signifigant performance boost. On Nov 20, 2007 12:48 PM, Stefan Nobis [EMAIL PROTECTED] wrote: Colin Kern [EMAIL PROTECTED] writes: I think the reason for Ruby being so much slower is because it is an interpreted language rather than a compiled language. It's not the main problem (interpreted languages are slower than those compiled to native code, but than even Java and C# are interpreted and don't have such big slowdowns). The main reason is that Ruby is not very good optimized -- AFAIK during most of the history of Ruby, running performance was not one of the main objectives. Recently I overheard that this changes these days. Python has much the same problem (not too much effort in high performance interpreters as compared for example to Java or C#). -- Until the next mail..., Stefan. ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/ ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
[computer-go] CGOS 19X19 is down
Hello I was waiting till someone restarts, but nobody seemed to notice. CGOS was hanging yesterday morning (European time) with 3 games 4849..4851 where no black engine placed any stone. If black restarted (one of the black bots was mine) it lost on time because the 30 minutes had been used. Black lost on time without even getting a gen_move command. For about 36 hours now, game 4851 is still waiting for black to start. Jacques. PD I don't know who is in charge of CGOS, Don, Olivier or Jason. If this is not the right place to post CGOS incidents, tell us where. ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language
Colin Kern [EMAIL PROTECTED] writes: I think the reason for Ruby being so much slower is because it is an interpreted language rather than a compiled language. It's not the main problem (interpreted languages are slower than those compiled to native code, but than even Java and C# are interpreted and don't have such big slowdowns). The main reason is that Ruby is not very good optimized -- AFAIK during most of the history of Ruby, running performance was not one of the main objectives. Recently I overheard that this changes these days. Python has much the same problem (not too much effort in high performance interpreters as compared for example to Java or C#). -- Until the next mail..., Stefan. pgpcPyaeKryrr.pgp Description: PGP signature ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] CGOS 19X19 is down
On Nov 20, 2007 1:55 PM, Jacques BasaldĂșa [EMAIL PROTECTED] wrote: PD I don't know who is in charge of CGOS, Don, Olivier or Jason. If this is not the right place to post CGOS incidents, tell us where. Don - 9x9 CGOS, boardspace website Olivier - 19x19 CGOS Jason - sourceforge website As far as the right place to announce CGOS incidents, computer-go is correct at the moment. Don seems to be AWAL lately... 9x9 CGOS has been down for a week. One I get Don and Olivier to join the sourceforge site, the best method would be to create a support request... Something along the lines of please restart 19x19 CGOS server. I need them to join the site before I can make them the automatic recipient of those requests. The advantage of that method is that the admins will be alerted without subjecting the whole computer-go community to the e-mails. ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] CGOS 19X19 is down
I was waiting till someone restarts, but nobody seemed to notice. CGOS was hanging yesterday morning (European time) with 3 games 4849..4851 where no black engine placed any stone. If black restarted (one of the black bots was mine) it lost on time because the 30 minutes had been used. Black lost on time without even getting a gen_move command. I hope it's okay now. I will write my email adress on the web site, so that people know who should be informed of troubles on the 19x19 CGOS. Olivier ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language
On Nov 20, 2007 1:56 PM, Nick Apperson [EMAIL PROTECTED] wrote: On Nov 20, 2007 12:48 PM, Stefan Nobis [EMAIL PROTECTED] wrote: Colin Kern [EMAIL PROTECTED] writes: I think the reason for Ruby being so much slower is because it is an interpreted language rather than a compiled language. It's not the main problem (interpreted languages are slower than those compiled to native code, but than even Java and C# are interpreted and don't have such big slowdowns). Java and C# are both compiled at some point if the same loop is running repeatedly. Java is usually compiled just in time which is to say as each function is first run. I'm not sure how C# is executed, but I think it gets compiled before execution. I just found this looking around for things about Java's speed. Looks like some useful ways to boost Java's performance. http://www.cs.cmu.edu/~jch/java/speed.html -Colin ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language
On 20/11/2007, Colin Kern [EMAIL PROTECTED] wrote: On Nov 20, 2007 1:56 PM, Nick Apperson [EMAIL PROTECTED] wrote: On Nov 20, 2007 12:48 PM, Stefan Nobis [EMAIL PROTECTED] wrote: Colin Kern [EMAIL PROTECTED] writes: I think the reason for Ruby being so much slower is because it is an interpreted language rather than a compiled language. It's not the main problem (interpreted languages are slower than those compiled to native code, but than even Java and C# are interpreted and don't have such big slowdowns). Java and C# are both compiled at some point if the same loop is running repeatedly. Java is usually compiled just in time which is to say as each function is first run. I'm not sure how C# is executed, but I think it gets compiled before execution. I just found this looking around for things about Java's speed. Looks like some useful ways to boost Java's performance. http://www.cs.cmu.edu/~jch/java/speed.html It's an interesting page, but it makes certain assumptions about how you're using Java, mainly that you're compiling to Java bytecode. Almost none of this applies, for example, if you're using gcj to generate platform specific binaries via the gcc/g++ backend. cheers stuart ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language
(I just joined this list last week, this is my first post) Hi Colin, welcome to the group. I still find it easier and faster to code in Java (using Eclipse) than with C++. The OP mentioned that Java is slow, but I have actually read that in the recent years it has become comparably faster to C++, although I haven't tested this personally (I hope this isn't going to start a holy war between the Java and C++ people here). ... Been there, done that, read the archives. For monte carlo random playouts I think the quickest known C++ implementation (libego) is about 6 times faster (600%!) than any java implementation. That is a relatively simple task, but a real-world one (as far as computer go is concerned), so until some advocate makes a really fast java monte carlo program I'm going to continue taking these as fast as C++ claims with a pinch of salt. (I understand the very valid reasons for choosing other languages, and they've already been mentioned a few times in this thread; I was just replying to the java is as fast as C++ rumours.) Darren P.S. A plug for an article I wrote for php|architect (phparch.com) magazine, Oct 2007 edition: I took a realistic data-processing PHP script that was running too slow (and using too much memory) and optimized it into C++, in stages, studying the return against programmer effort. The PHP version took 1m 18s, and 555M, for 1 million lines of data (and took 15-30 minutes to code). The easy-to-read-and-maintain C++ version took 20s and 146M (and about 30-60 minutes of coding). The optimized-and-rather-fragile C++ version took 16.5s and 128M (and another hour of coding). I ran out of (page) space and (programmer) time to then add memory pools. I would expect it to shave a few more seconds off, but not save any more memory. All the code (and script to generate test data) should be downloadable from the php|a site; if anyone tries it in another language (or optimizes the C++ version further) I'd be very interested to hear. ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] CGOS (9x9) hangs
This seems to be one condition that hangs CGOS. At any rate, I finally restarted it. I was actually away from any computers for almost a week. I notice that CGOS has been down for a few days.Sorry about that. It's back up and running now. - Don Christoph Birk wrote: I don't know if I caused it or if it just was a coincidence: I killed my bot shortly before a new round would start, re-compiled and re-started it within some 30 seconds. Immediately I receive a 'newgame' and then a 'genmove' genmove b -1195176189379 And now CGOS hangs ... hope this helps. Christoph ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/ ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language [offtopic, aside]
There are possibilities like inline-perl, inline-ruby, critcl (inline code for tcl) that are not too bad for mixing code.You can move back and forth between C and a high level language fairly easily. I've never tried using one of these (with inline stuff) for go.You really want the core data structure to be C friendly - so I'm not sure this type of approach really works. There are lot's of options but I don't think any of them are really natural. One example is LUA. You can write a C program and add lua routines, or visa versa. But it's always a little bit painful. - Don Petr Baudis wrote: On Thu, Nov 15, 2007 at 04:41:19AM -0800, steve uurtamo wrote: the more i think about it, the more i love whatever language i'm using for whatever project i'm working on. some projects would be (or are) horrifying to try to implement in some languages [the matlab-C example springs to mind], so, since learning new languages isn't a gigantic burden, the only relevance is the intended application, i suppose. which is a very cumbersome way of repeating (reinforcing?) what other people have already said. This also applies _inside_ the domain of Go, I guess. C-ish language might be one of the natural choices if you are writing a Monte Carlo style engine and need to have a blinding fast board library. But if you are approaching the problem completely differently (say, heavy pattern matching and complicated computations - but few iterations), some other language might be quite more appropriate at least for the proof of concept. (Yes, you can write the board library in C and then build on that in some other language. But in case of programs where the Monte Carlo or something alike is at the core, it is likely the bulk of the code anyway, and the part you will be debugging the most. Would the additional headaches and overhead of mixing two languages pay off?) ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] CGOS 19X19 is down
Jacques, I am responsible for 9x9 CGOS and I was away for almost a week. Sorry about the inconvenience but it's now back up and running. - Don Jacques BasaldĂșa wrote: Hello I was waiting till someone restarts, but nobody seemed to notice. CGOS was hanging yesterday morning (European time) with 3 games 4849..4851 where no black engine placed any stone. If black restarted (one of the black bots was mine) it lost on time because the 30 minutes had been used. Black lost on time without even getting a gen_move command. For about 36 hours now, game 4851 is still waiting for black to start. Jacques. PD I don't know who is in charge of CGOS, Don, Olivier or Jason. If this is not the right place to post CGOS incidents, tell us where. ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/ ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language
Colin, I would NOT recommend this site. It was last updated in '98. Many of the optimizations listed were great for back then. They are terrible for 2007 and will likely result in SLOWER execution, not faster. For example, the claim is that a synchronized method call is 10 times slower than one which is not synchronized. While true in '98, this has changed considerably and is now patently false. The cost of acquiring/releasing a lock in most modern production available VMs is now measured in parts of a percent. It is rarely worth optimizing this out as the constraint(s)/bottleneck(s) are very likely elsewhere. Completely changing your architecture to attempt to avoid synchronization is now bad for your code (if you have any intentions to make it multi-thread capable). Another claim is marking a method final in an attempt to promote it to be inlined by the compiler. In '98, this could have a substantial impact on performance. Now, it not only does not desirably impact performance, the modern JVMs have sophisticated implementations around inlining including inlining based on probability with exceptions branched out of a default execution flow path (making the exceptions slower, but the default path the fastest), it makes the class(es) less flexibly to future adaptation. If you are writing high performance Java code, it is worth your while to find references that are no more than 4 years old. The JVMs have change so much in the last 10 years, any assumptions from a recent as 4 years ago are likely fallacious. If you want to follow performance trends and very fixated execution performance engineering for Java, I would recommend starting here: http://www.javaperformancetuning.com/ And for a book: http://www.amazon.com/exec/obidos/ASIN/0596003773/javaperforman-20 I have used both the site and the book for my own Java performance tuning. Excellent stuff. Jim Colin Kern wrote: On Nov 20, 2007 1:56 PM, Nick Apperson [EMAIL PROTECTED] wrote: On Nov 20, 2007 12:48 PM, Stefan Nobis [EMAIL PROTECTED] wrote: Colin Kern [EMAIL PROTECTED] writes: I think the reason for Ruby being so much slower is because it is an interpreted language rather than a compiled language. It's not the main problem (interpreted languages are slower than those compiled to native code, but than even Java and C# are interpreted and don't have such big slowdowns). Java and C# are both compiled at some point if the same loop is running repeatedly. Java is usually compiled just in time which is to say as each function is first run. I'm not sure how C# is executed, but I think it gets compiled before execution. I just found this looking around for things about Java's speed. Looks like some useful ways to boost Java's performance. http://www.cs.cmu.edu/~jch/java/speed.html -Colin ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/ ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Language
Nick Apperson [EMAIL PROTECTED] writes: Java and C# are both compiled at some point if the same loop is At some point everything has to be translated to machine code. But Java, C#, Ruby etc. are doing this at execution time -- that what most people call a interpreter. You are right, the interpreters of Java and C# have got quite some good optimizations, like the JIT (one could say: interpreter cache). Python and Ruby lack these optimizations today. But, compiling weakly typed languages is unlikely to give a big performance boost and could even hurt it a bit by making large code Bullshit. C is weakly typed, Python and Ruby have a dynamic type system. Two completley different things. And there are languages like Smalltalk or Scheme or Common Lisp with dynamic type systems that are compiled to native machine code. And there are big performance boost compared to the interpreted code and you can get a performance comparable to C and fast than Java or C# with these languages. So this is quite possible to do for Python or Ruby, but it seems there is not enough interest or man-power or knowledge in those communities to do it today. It's that simple. -- Until the next mail..., Stefan. pgpOkIysb82F2.pgp Description: PGP signature ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/