Thread pools on the JVM should usually be divided into the following three categories:
- CPU-bound
- Blocking IO
- Non-blocking IO polling
Each of these categories has a different optimal configuration and usage pattern.
(require '[clojure.set :as set]) | |
(def info | |
[{:year 2017 | |
:month 4 | |
:data "x"} | |
{:year 2017 | |
:month 4 | |
:data "y"} |
cmake_minimum_required(VERSION 3.7) | |
project(hotspot) | |
include_directories( | |
src/hotspot/cpu | |
src/hotspot/os | |
src/hotspot/os_cpu | |
src/hotspot/share | |
src/hotspot/share/precompiled | |
src/hotspot/share/include | |
src/java.base/unix/native/include |
This is a bit of a thought exercise. I doubt it’s perfect and I’m hoping for opinions and corrections with the goal of a well reasoned practical approach.
One way to look at type declarations in a static language is as a test which picks up potential incompatible code paths. E.g. data passed is incompatible with code.
In static languages the effort to write the test is reduced by virtue of being declared inline with the code and inference allows a few annotations to permeate - having said that we can achieve a similar results in Clojure.
Medication contraindications
You probably know this, but here's some background so we're all on the same page. Some medicines shouldn't be taken in combination. When two medications shouldn't be taken together, it's called a contraindication.
(def patient-medications [{:name "Blythenal"
:rxNorm "blyth"}
{:name "Masbutol"
:rxNorm "masbut"}
{:name "Welbutril"
My answer to: https://www.reddit.com/r/Clojure/comments/pcwypb/us_engineers_love_to_say_the_right_tool_for_the/ which asked to know when and at what is Clojure "the right tool for the job"?
My take is that in general, the right tool for the job actually doesn't matter that much when it comes to programming language.
There are only a few cases where the options of tools that can do a sufficiently good job at the task become limited.
That's why they are called: General-purpose programming languages, because they can be used generally for most use cases without issues.
Let's look at some of the dimensions that make a difference and what I think of Clojure for them: