Is there an equivalent of Common Lisp's *features
* in Clojure, so you can detect the OS and other environment configuration? Or do I just go through the Java API for that?
相关问题
- slurm: use a control node also for computing
- Better Sequence Duplicate Remover
- Installation of Leiningen 2.X in Mac OS X
- How to read a string array in appSettings.json?
- Questions about Lists and other stuff in Clojure
相关文章
- Factor Clojure code setting many different fields
- Does learning one Lisp help in learning the other?
- How to use relative line numbering universally in
- On scala project - Getting error GC overhead limit
- Better way to nest if-let in clojure
- Debugging with Eclipse CDT and GDB: can't find
- Log4j2 using {} against using %d or %s
- Idiomatic approach for structuring Clojure source
Probably use the Java API. It's easy enough, no sense re-inventing the wheel.
To add to Brian Carper's answer, you could easily create a map of system properties via the Java API and bind it to the symbol features:
Which gives you this structure, for example:
Then access a property in any one of the following ways:
Whichever floats your boat.
Other answers are handling how to get the system info from Java pretty well. If you want more help interpreting it, here are some examples of how Terracotta did that: