Go diagram advice, please

General conversations about Go belong here.
User avatar
Jujube
Lives in gote
Posts: 308
Joined: Sun Nov 14, 2010 8:49 am
Rank: EGF 5k Foxy 2k
GD Posts: 0
Has thanked: 54 times
Been thanked: 71 times
Contact:

Re: Go diagram advice, please

Post by Jujube »

Ok so I'm sure that we can get John up and running again with our collective brainpower.

First, to clarify some terms you mentioned John:
  • Java is a programming language that was invented, partly, so that programs could be portable across different operating systems and architectures without having to re-write large portions of the program. So, the JVM was created as a specification that tells us how we can run machine-independent code (in this case called "bytecode") and thus create machine-independent programs.
  • The JRE is an environment that provides the minimum amount of stuff that enables us to run a Java program. It contains an implementation of the JVM and assorted libraries and configuration files.
  • The JDK is the development environment that contains compilers and debuggers, as well as the JVM and JRE, in order that normal-looking Java code can be compiled to machine-independent bytecode, in order to run on the JVM, in the JRE runtime environment.
So, JVM is the "engine" that runs the bytecode, JRE is the runtime environment required for us to run Java programs, and JDK is the development environment required to develop and compile Java programs.

The first step I would take is to see if your computer can "see" your Java installation.

Press the Windows key, and scroll down to 'Windows System' and select the Command Prompt. Alternatively, press the Windows key, and type 'cmd' (without the single quotes) and you should see the Command Prompt application icon appear in the menu, and you can click that to start it.

Now type:

Code: Select all

java -version
And you should get one of these two screenshots or similar:

Image

Or this one:

Image

(Continued in next post)...
12k: 2015.08.11; 11k: 2015.09.13; 10k: 2015.09.27; 9k: 2015.10.10; 8k: 2015.11.08; 7k: 2016.07.10 6k: 2016.07.24 5k: 2018.05.14 4k: 2018.09.03 3k: who knows?
User avatar
Jujube
Lives in gote
Posts: 308
Joined: Sun Nov 14, 2010 8:49 am
Rank: EGF 5k Foxy 2k
GD Posts: 0
Has thanked: 54 times
Been thanked: 71 times
Contact:

Re: Go diagram advice, please

Post by Jujube »

In the first screenshot, the computer sees your Java installation, and that is fine. So, if you get this message, GoWrite2 should also be able to see your Java installation, and we will need to pause here to ask some more questions if this is the case.

----------

But in the case that you get the second screenshot, which means that your computer cannot see your Java installation, then you will need to follow the steps below.

Firstly, a slight tangent. Programs that require other programs to run (as is this case here, where GoWrite2 requires a JVM to run, the JVM effectively being a program called java.exe), the programs search for these other programs on the PATH (or sometimes path, or Path, it doesn't matter).

The PATH is a colon-delimited or semicolon-delimited list of filepaths to an executable. For example, if I use LaTeX, and if I want my document processing program (e.g. TeXstudio) to find the executable to run the code (which if I choose PDFTeX is pdftex.exe), then my software program (TeXstudio) will seek out the executable in the PATH. This is the same as we are doing here: by typing

Code: Select all

java
, the software program (Command Prompt) is seeking out the executable called

Code: Select all

java.exe
in the PATH. If it finds it, it returns the result of the command line argument we provided, which in this case is
-version
.

The second screenshot means that Command Prompt could not find java in the PATH and therefore does not know what you mean when you type java -version. So to correct that, we will need to add java to the path ourselves.

So hit the Windows key and type 'env' (without the single quotes) and select the option for Edit the System Environment Variables. You will get a System Properties dialog box. Then, select Environment Variables as I have done in the below screenshot:


Image

Then, you need to select the Path, then select edit, then select browse, then you have to search your computer for your Java installation! :D Actually it shouldn't be tricky, you should select This PC > Local Disk C: > Progam Files > Java > jre_version230492834 (or whatever) > bin. Select this folder as I have done in the screenshot below. If you have a 32 bit JRE, then you will need to seek out the bin folder in your Program Files (x86) directory, not your Program Files directory.

Image

Then you should close Command Prompt and reopen it. Type java -version and see if it outputs the first screenshot. If it does, then you can try to install GoWrite2 again.
12k: 2015.08.11; 11k: 2015.09.13; 10k: 2015.09.27; 9k: 2015.10.10; 8k: 2015.11.08; 7k: 2016.07.10 6k: 2016.07.24 5k: 2018.05.14 4k: 2018.09.03 3k: who knows?
Calvin Clark
Lives in gote
Posts: 426
Joined: Thu Aug 13, 2015 8:43 am
GD Posts: 0
Has thanked: 186 times
Been thanked: 191 times

Re: Go diagram advice, please

Post by Calvin Clark »

Jujube's Java summary is useful.

I was able to reproduce one of the errors John reported, the one where it says a suitable JVM cannot be found when launching GOWrite.

Technical Overview:
It's a 64-bit vs. 32 problem. GOWrite.exe is using registry calls to find the Java installation. But using sysinternals procmon I can see it is only looking in the 64-bit HKEY_LOCAL_MACHINE tree for them, not in WOW6432Node, which is where the 32-bit version of Java would put its keys. So if trying to run GOWrite.exe (i.e., clicking on the icon that is installed on the desktop), a 32-bit JRE won't be found, but 64-bit ones will be. I tested Java 8 32-bit and 64-bit for this, since I had previously verified that Java 10 works.)
So the combination that yields the best results for me so far on Windows 10:

Java 8 64-bit from the manual download page:

https://java.com/en/download/manual.jsp

GOWrite2 version 3.0.17 (Development Version) from https://gowrite.net/GOWrite2_download.html
User avatar
PeterHB
Lives with ko
Posts: 130
Joined: Wed Apr 21, 2010 6:31 pm
Rank: 3k EGF 3k KGS
GD Posts: 0
Location: UK, Nr. London
Has thanked: 163 times
Been thanked: 67 times

Re: Go diagram advice, please

Post by PeterHB »

Idea 1.

Command to convert a directory of .eps to .svg files from a windows batch file:
FOR %%G IN ( *.eps ) DO CMD /C "C:\Program Files\Inkscape\inkscape.exe" --file=%%G --export-plain-svg=%%~nG.svg --without-gui

Idea 2. ( more advanced & vague)

Could do sgf -> eps -> svg -> doc for all 1000 diagrams in one step with a Window automation/scripting tool, e.g. https://www.autoitscript.com/ to externally control SmartGo/Inkscape/Word etc.
WinActivate("SmartGo")
Send ( "!fd{TAB 6}^v{ENTER}" ) ; Export Diagrams

The effort of creating such a script for one book may not be worth it, but may pay off across multiple books.
Calvin Clark
Lives in gote
Posts: 426
Joined: Thu Aug 13, 2015 8:43 am
GD Posts: 0
Has thanked: 186 times
Been thanked: 191 times

Re: Go diagram advice, please

Post by Calvin Clark »

Bill Spight wrote:My version of GoWrite 2 says this.

Version 2.3.46

Java version 1.6.0_65-b14-468

It stopped working after a MacOS upgrade which installed Java 8.
Remind me: Was there a reason that the 3.0 GOWrite versions weren't working for you?
John Fairbairn
Oza
Posts: 3724
Joined: Wed Apr 21, 2010 3:09 am
Has thanked: 20 times
Been thanked: 4672 times

Re: Go diagram advice, please

Post by John Fairbairn »

I now have GoWrite working. I don't know why. I first followed jujube's instructions but that did not work, with either 32-bit or 64-bit (and in 64-bit there wasn't even a bin file).

I then moved on to Calvin Clark's post and out of desperation download Java 8 again. I am 100% certain I downloaded this earlier (I accept all the update prompts from Sun/Oracle and the fact I knew about the threatened future hassle from them supports me in my conviction that I must have downloaded the most recent update already.

However, this time installing GoWrite worked, and I didn't have to do anything to the environment path.

Assuming I'm not deluding myself about updating properly, I can think of two scenarios. (1) Changing the environment path DID work, but this only becomes apparent after a re-install of GoWrite. (2) When I installed the latest Java update, I should have uninstalled GoWrite and re-installed.

BTW I have written to Lauri Paatero in the past but got no reply. Since I dislike getting pestered online myself, I was unperturbed by that, and eventually got GoWrite working again myself - probably along the lines that worked today.

Anyway, I'm grateful for all the advice and look forward to trying also the tip on svg files (one I find out what they are).
Bill Spight
Honinbo
Posts: 10905
Joined: Wed Apr 21, 2010 1:24 pm
Has thanked: 3651 times
Been thanked: 3373 times

Re: Go diagram advice, please

Post by Bill Spight »

Calvin Clark wrote:
Bill Spight wrote:My version of GoWrite 2 says this.

Version 2.3.46

Java version 1.6.0_65-b14-468

It stopped working after a MacOS upgrade which installed Java 8.
Remind me: Was there a reason that the 3.0 GOWrite versions weren't working for you?
2.3.46 is the latest version for MacOS. :(

Since MacOS is based on Unix (which may not have been the case when the download page was last updated), maybe I should try the Unix version.

Now if I can just uninstall the Mac Java 6 "fix". :mad:
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
Calvin Clark
Lives in gote
Posts: 426
Joined: Thu Aug 13, 2015 8:43 am
GD Posts: 0
Has thanked: 186 times
Been thanked: 191 times

Re: Go diagram advice, please

Post by Calvin Clark »

Bill Spight wrote: 2.3.46 is the latest version for MacOS. :(
Yes, but that's just for the fancy installer. Here is something that works for me (macOS High Sierra, 10.3.16)

1. Go to the main download page: https://gowrite.net/GOWrite2_download.html
2. Scroll down to "Other platforms", "Most Recent Stable".
3. Click on 3.0.14. This will download a .zip file.
4. Unzip the .zip file <somewhere>.
5. From a Terminal, cd into that <somewhere> directory.

It should contain files like this:

gowrite2_3_0_14 $ ls
GOWrite.exe gowrite.ico
GOWrite.jar gowrite.png
GOWriteHelp.jar gowrite.svg
GOWriteWin.dll gowrite.xml
application-x-go-sgf.png gowrite2
application-x-go-sgf.svg gowrite_hires.png
application-x-go-sgf_hires.png lib
aspireone-icon license.txt
goboard.ico order.txt
gowrite readme.txt
gowrite.desktop

6. Now, 'gowrite' is a bash script that passes all the right parameters to launch, so:
7. Type:

gowrite2_3_0_14 $ bash ./gowrite

It will complain about the lack of some native macOS support, but I'm not sure how much that loses. I can save .sgf, export .svg and .png files that way, for example:

Here's a .png:
gowrite2_3_0_14_1.png
gowrite2_3_0_14_1.png (3.35 KiB) Viewed 10260 times
Before I infest my machine with Java 6, what symptoms does it cause you? Are saying you can't remove it, or that it breaks other Java apps?

BTW, OSX 10.0 for consumers was 2001, so it's been Unix-like for 17 years, give or take and that's not even counting the 1999 server version.
Bill Spight
Honinbo
Posts: 10905
Joined: Wed Apr 21, 2010 1:24 pm
Has thanked: 3651 times
Been thanked: 3373 times

Re: Go diagram advice, please

Post by Bill Spight »

Calvin Clark wrote:
Bill Spight wrote: 2.3.46 is the latest version for MacOS. :(
Yes, but that's just for the fancy installer. Here is something that works for me (macOS High Sierra, 10.3.16)
Many thanks, Calvin. :)
Before I infest my machine with Java 6, what symptoms does it cause you?
Please do not infest your machine.
Are saying you can't remove it, or that it breaks other Java apps?
Both. GoWrite works, as does the program that uses its own dedicated Java. But any Java program that requires a later version of Java does not work.

For a while, despite the Mac "fix", I updated my Java as occasionally prompted. However, when I actually tried a program that required Java 8, it did not work. Finally I decided to uninstall Java completely, reinstall Java 8, and worry about GoWrite later. I even followed instructions on a web site that said, here is how to really, completely uninstall java. As a result, I don't even have Java Control Panel. But GoWrite still works. ;)
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
tj86430
Gosei
Posts: 1348
Joined: Wed Apr 28, 2010 12:42 am
Rank: FGA 7k GoR 1297
GD Posts: 0
Location: Finland
Has thanked: 49 times
Been thanked: 129 times

Re: Go diagram advice, please

Post by tj86430 »

I have no problems having both Java 1.6 for GoWrite and 1.8 for everything else on MacOS 10.13.4

You should have different versions of java in /Library/Java/JavaVirtualMachines:

Code: Select all

MacBook-Pro-2:~ tj86430$ ls -la /Library/Java/JavaVirtualMachines
total 0
drwxr-xr-x  5 root  wheel  160  9 Elo 09:18 .
drwxr-xr-x  4 root  wheel  128 27 Maa 00:31 ..
drwxr-xr-x  3 root  wheel   96 15 Hei  2015 1.6.0.jdk
drwxr-xr-x  3 root  wheel   96 15 Mar  2017 jdk1.8.0_131.jdk
drwxr-xr-x  3 root  wheel   96 11 Elo  2015 jdk1.8.0_51.jdk
You should also have 1.8 in /System/Library/Frameworks/JavaVM.framework/Versions:

Code: Select all

MacBook-Pro-2:~ tj86430$ ls -la /System/Library/Frameworks/JavaVM.framework/Versions
total 0
drwxr-xr-x  4 root  wheel  128 19 Tam  2018 .
drwxr-xr-x  6 root  wheel  192 19 Tam  2018 ..
drwxr-xr-x  8 root  wheel  256 25 Huh 14:19 A
lrwxr-xr-x  1 root  wheel    1 19 Tam  2018 Current -> A
Your java command in path should point to the latter one:

Code: Select all

MacBook-Pro-2:~ tj86430$ java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
MacBook-Pro-2:~ tj86430$ which java
/usr/bin/java
MacBook-Pro-2:~ tj86430$ ls -la /usr/bin/java
lrwxr-xr-x  1 root  wheel  74 19 Tam  2018 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
Yet GoWrite should be able to find the 1.6 it requires.

Deleting 1.6 should be simple, if you want to do that: just delete the entire directory /Library/Java/JavaVirtualMachines/1.6.0.jdk

@Bill Spight: Drop me a PM if your configuration looks different and you want to sort it out

PS there are also other ways to manage Java versions on MacOS, e.g. the method described here: https://stackoverflow.com/questions/262 ... a-versions
Offending ad removed
User avatar
Joaz Banbeck
Judan
Posts: 5546
Joined: Sun Dec 06, 2009 11:30 am
Rank: 1D AGA
GD Posts: 1512
Kaya handle: Test
Location: Banbeck Vale
Has thanked: 1080 times
Been thanked: 1434 times

Re: Go diagram advice, please

Post by Joaz Banbeck »

John Fairbairn wrote:...I seem now to be left high and dry with no sensible way to produce diagrams...

...Still, I'm hoping there's something out there that I've overlooked...

... Any specific suggestions would be welcome.
This thread seems to have lurched into a java-only solution.

If I were going to do it, I would generate the data from an SGF using the diagram generator at Sensei's ( https://senseis.xmp.net/tools/sgf2diagram.php ), then display that diagram on my screen here at L19, then cut-and-paste. Then I would use a graphics editor like gimp to increase the dpi.
That ought to give 200+ dpi images.

Sensei's is not big on copyrights, so I suspect that they won't object. And L19 won't object because I - as an admin - hereby formally give you permission to do so. Gimp is under gnu license.
Help make L19 more organized. Make an index: https://lifein19x19.com/viewtopic.php?f=14&t=5207
Javaness2
Gosei
Posts: 1545
Joined: Tue Jul 19, 2011 10:48 am
GD Posts: 0
Has thanked: 111 times
Been thanked: 322 times
Contact:

Re: Go diagram advice, please

Post by Javaness2 »

Let's be honest now, the diagrams produced by Senseis are shite.
Bill Spight
Honinbo
Posts: 10905
Joined: Wed Apr 21, 2010 1:24 pm
Has thanked: 3651 times
Been thanked: 3373 times

Re: Go diagram advice, please

Post by Bill Spight »

tj86430 wrote:I have no problems having both Java 1.6 for GoWrite and 1.8 for everything else on MacOS 10.13.4
Many thanks. :)
You should have different versions of java in /Library/Java/JavaVirtualMachines:

Code: Select all

MacBook-Pro-2:~ tj86430$ ls -la /Library/Java/JavaVirtualMachines
total 0
drwxr-xr-x  5 root  wheel  160  9 Elo 09:18 .
drwxr-xr-x  4 root  wheel  128 27 Maa 00:31 ..
drwxr-xr-x  3 root  wheel   96 15 Hei  2015 1.6.0.jdk
drwxr-xr-x  3 root  wheel   96 15 Mar  2017 jdk1.8.0_131.jdk
drwxr-xr-x  3 root  wheel   96 11 Elo  2015 jdk1.8.0_51.jdk

Mine is similar, but with only Java 6:

$ ls -la /Library/Java/JavaVirtualMachines
total 0
drwxr-xr-x 3 root wheel 96 Feb 28 06:03 .
drwxr-xr-x 4 root wheel 128 Feb 28 06:03 ..
drwxr-xr-x 3 root wheel 96 Jul 14 2015 1.6.0.jdk
You should also have 1.8 in /System/Library/Frameworks/JavaVM.framework/Versions:

Code: Select all

MacBook-Pro-2:~ tj86430$ ls -la /System/Library/Frameworks/JavaVM.framework/Versions
total 0
drwxr-xr-x  4 root  wheel  128 19 Tam  2018 .
drwxr-xr-x  6 root  wheel  192 19 Tam  2018 ..
drwxr-xr-x  8 root  wheel  256 25 Huh 14:19 A
lrwxr-xr-x  1 root  wheel    1 19 Tam  2018 Current -> A
Looks the same.

$ ls -la /System/Library/Frameworks/JavaVM.framework/Versions
total 0
drwxr-xr-x 4 root wheel 128 Feb 27 12:44 .
drwxr-xr-x 6 root wheel 192 Feb 27 12:44 ..
drwxr-xr-x 8 root wheel 256 Jun 11 18:49 A
lrwxr-xr-x 1 root wheel 1 Feb 27 12:41 Current -> A
Your java command in path should point to the latter one:

Code: Select all

MacBook-Pro-2:~ tj86430$ java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Points to Java 6.

$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)

Code: Select all

MacBook-Pro-2:~ tj86430$ which java
/usr/bin/java
Same.

Code: Select all

MacBook-Pro-2:~ tj86430$ ls -la /usr/bin/java
lrwxr-xr-x  1 root  wheel  74 19 Tam  2018 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
Basically the same.

$ ls -la /usr/bin/java
lrwxr-xr-x 1 root wheel 74 Feb 27 12:43 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
Yet GoWrite should be able to find the 1.6 it requires.

Deleting 1.6 should be simple, if you want to do that: just delete the entire directory /Library/Java/JavaVirtualMachines/1.6.0.jdk

@Bill Spight: Drop me a PM if your configuration looks different and you want to sort it out

PS there are also other ways to manage Java versions on MacOS, e.g. the method described here: https://stackoverflow.com/questions/262 ... a-versions
So I guess the thing to do now is to download and install the latest Java from java.com. Then the java command should point to that version.

If that's the case, then I guess the problems with the other Java program have a different reason. Hmmm.
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
John Fairbairn
Oza
Posts: 3724
Joined: Wed Apr 21, 2010 3:09 am
Has thanked: 20 times
Been thanked: 4672 times

Re: Go diagram advice, please

Post by John Fairbairn »

If I were going to do it, I would generate the data from an SGF using the diagram generator at Sensei's ( https://senseis.xmp.net/tools/sgf2diagram.php ), then display that diagram on my screen here at L19, then cut-and-paste. Then I would use a graphics editor like gimp to increase the dpi.
That ought to give 200+ dpi images.
I'd love to hear I'm wrong, but that doesn't make sense to me. A 200 dpi original contains a lot more image data than a 72 dpi original. Casting a 72 dpi original into 200 dpi format is just adding lots of white space and produces pixellation. Or is Gimp so intelligent that it can interpolate data?
Sensei's is not big on copyrights, so I suspect that they won't object. And L19 won't object because I - as an admin - hereby formally give you permission to do so. Gimp is under gnu license.
SL is not big on observing other people's copyrights either, but copyright is irrelevant here. Using a pen to write a novel doesn't give the pen manufacturer any rights over your material.
Bill Spight
Honinbo
Posts: 10905
Joined: Wed Apr 21, 2010 1:24 pm
Has thanked: 3651 times
Been thanked: 3373 times

Re: Go diagram advice, please

Post by Bill Spight »

John Fairbairn wrote:
Sensei's is not big on copyrights, so I suspect that they won't object. And L19 won't object because I - as an admin - hereby formally give you permission to do so. Gimp is under gnu license.
SL is not big on observing other people's copyrights either, but copyright is irrelevant here. Using a pen to write a novel doesn't give the pen manufacturer any rights over your material.
Welcome to the digital age.
Digital Overlords wrote:We own all your devices and all your data, according to our Terms of Service, which we can change at will. Mwa-ha-ha-ha!
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
Post Reply