-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mmj2 tutorial issues: can't start on Linux; chapter 5 is broken #37
Comments
cc @david-a-wheeler , who added those pages to the tutorial |
Thanks so much for the report and fof some suggested fixes!! Yes, we need to fix this. |
Fix problems noted in digama0#37 What's missing - we need to explain how to install set.mm for the tutorial, since the tutorial requires it. Signed-off-by: David A. Wheeler <[email protected]>
@cwitty Does this work with the fix of #38 ? I'm also using Debian testing and I had to downgrade to JDK 8 (see https://groups.google.com/d/topic/metamath/WFoQTXy17lU/discussion). I'd be glad if it works with current Java. @david-a-wheeler I don't know much about garbage collection, but what does removing -Xincgc entail ? I replaced it with -XX:+UseConcMarkSweepGC but not sure how performance compares. |
@benjub: Java has always had a garbage collector. The -Xincgc option was originally off by default; when the option was added, it enabled the incremental garbage collector, which reduces "the occasional long garbage-collection pauses during program execution." However, it's been on by default for many versions, and they've removed the option. I think it's absurd to remove a no-op, it makes it hard to support many Java versions simultaneously. But since newer versions don't accept it, and it's been a no-op for many years, it makes more sense to just remove calling the option. Fiddling with garbage collectors can bring you down a deep rabbit hole; I don't feel like jumping down that hole today :-). |
I always ran mmj2, even when doing the tutorial, so I never noticed the problems with mmj2PATutorial.bat. |
@benjub, after I commented out the body of checkVersion() in BatchMMJ2.java and recompiled (as described in #36) and removed -Xincgc from the command line, I was able to go through the tutorial with a current Debian testing openjdk-14-jdk (until I got to chapter 5, where I had to replace setFirst100.mm with the real set.mm). I haven't tested it, but my expectation would be that any set of garbage collector parameters would work fine for mmj2. I agree with @david-a-wheeler that it's not worth my time fiddling with them. In other words: feel free to keep using -XX:+UseConcMarkSweepGC or to leave it off; I doubt if you'll notice a difference either way, unless you try doing careful benchmarks and statistics. |
@cwitty Thanks. Using openjdk-8 and openjdk-11 (default-jdk) on Debian testing, mmj2 launches but has unexpected behavior which makes it unusable (described in the linked thread) which I cannot fix... Edit:
Command line: |
Fix problems noted in #37 What's missing - we need to explain how to install set.mm for the tutorial, since the tutorial requires it. Signed-off-by: David A. Wheeler <[email protected]>
@benjub, it looks like your problem is that you can't compile mmj2 because of the missing JSON files? I just tested this, so here's a chunk of my "history" where I successfully cloned my existing repository, updated it with the JSON files, and compiled:
(You'd probably want to clone from github instead of "../mmj2". Also, if you're on openjdk-14-jdk, you'll need to coment out the body of checkVersion() to get a jar file you can use.) The magic incantation:
is actually in mmj2's INSTALL.html, if you scroll far enough down past the instructions on installing the 2011 version of Java... |
Thanks @cwitty. I'll give it a try when I have time. (I don't know if it's a mistake, but I don't use git for mmj2 since I don't plan on modifying it; I simply download it the old-fashioned way.) |
@benjub - okay, you have the lead. Please post a link here to your try. A few thoughts:
|
@david-a-wheeler Sorry if my words misled you. What I meant by "I'll give it a try when I have time" was "I'll give it a try next time I want / have time to use mmj2... which may not be too soon". When I try, I'll report it, but this may be in a while. |
@benjub - thanks for the clarification. In that case, I'll try to work up something. |
I wanted to run the tutorial, but there were several roadblocks in my way.
The instructions talk about Mac OS-X and Windows, but not Linux. Not a big problem; I just copied the command line out of mmj2PATutorial.bat and ran it by hand.
That command line uses the obsolete "-Xincgc" flag, so it doesn't work on the version of Java I have ("14-ea", from Debian openjdk-14-jdk 14~36-2). So I deleted the "-Xincgc" part from the command line and re-ran.
The command line references RunParmsPATutorial.txt , which has this line:
That pathname doesn't work on Linux. So I copied PATutorial/Page101.mmp to PATutorial\Page101.mmp and re-ran.
I eventually figured out that this is because RunParmsPATutorial.txt loads setFirst100.mm, which doesn't have decimal notation (or real numbers, or set theory, or predicate calculus).
I can see a couple of possible fixes: either copy enough of the current set.mm into setFirst100.mm to get through the tutorial, or get rid of setFirst100.mm altogether and tell users they need to download the real set.mm. But the current situation, where following instructions gets a tutorial that breaks mysteriously at chapter 5, is very bad.
The text was updated successfully, but these errors were encountered: