Skip to content

Conversation

@samumbach
Copy link
Contributor

@samumbach samumbach commented Mar 26, 2025

This is absolutely awesome @lkitching! I've been working with Clojure and the JVM for years and still learned a lot from working through this. Thank you!!

(Thank you also to @kirahowe for the recommendation 😄 )

I bumped into a few minor issues as I worked through the examples. With the changes in this PR, I was able to work through all the examples, see the same behavior, and get more comfortable with the JVM (and Maven, and tools.build 👍 ).

There are a few other potential stumbling blocks that I wanted to discuss with you before attempting to correct/improve:

  • Chapter 4 JAR Files: I ran into javac: directory not found: ... until I manually created the output directory (mkdir -p classes/libhello / mkdir -p classes/app).
  • Chapter 5 Dependency management: I also ran into javac: directory not found: ..., though if you assume you're in the same directory as Chapter 4 we might just assume these directories already exist...
  • Chapter 5 Dependency management: Even so, I had to mkdir app because of a slight inconsistency between Chapters 4 and 5: javac -d classes/app -cp libhello.jar src/app/Echo.java vs javac -cp json-java.jar:libhello.jar -d app EchoJSON.java.
  • Chapter 5 Dependency management: It wasn't immediately obvious that I needed to cd libhello / cd json-test before mvn package, mvn install, etc.
  • Chapter 9 Deps: Similarly, I needed to cd main before clojure -M -m greet.main --excite everyone.
  • Chapter 3 Class files: "Type reference" might better be called "Type descriptor" (maybe? I just skimmed the .class file format specification for the first time yesterday...)
  • Chapter 3 Class files: There's two different syntax used to name class members: java/lang/System.out in the javap output, and java/lang/System::out in the Constant Pool table. This isn't something I'm intimately familiar with, so perhaps the :: double-colon syntax is common.

I know this is a lot. Happy to split any of this out to separate issues/PRs if that's helpful. Thanks again!!

@lkitching
Copy link
Owner

Hi @sumbach , thanks for these fixes, I'm glad you found the series useful! Your other suggestions all look sensible to me, so I'm happy to merge this as is and apply them myself, or wait if you want to add those to this PR, whichever you prefer.

@samumbach
Copy link
Contributor Author

samumbach commented Apr 7, 2025

@lkitching Glad to hear from you 😀

I was planning to split my "all-suggestions" branch into 3 PRs:

If you're comfortable with that, please merge this PR as-is and I'll rebase and open those follow-up PRs.

@lkitching lkitching merged commit 73c03b3 into lkitching:main Apr 7, 2025
@lkitching
Copy link
Owner

Ok that plan sounds good, thanks!

@samumbach samumbach deleted the technical-corrections branch April 7, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants