1
1
Fork
You've already forked DSW23doingScienceWithClojure
0
Data Science Workshop 20 April 2023
2023年04月24日 08:49:48 +00:00
images Upload file to images 2023年04月21日 16:45:47 +00:00
3235_Doing_Science_with_Clojure_DSW_April_2023.pdf Upload files to '' 2023年04月22日 14:47:42 +00:00
LICENSE Initial commit 2023年04月21日 16:12:48 +00:00
README.md Update 'README.md' 2023年04月24日 08:49:48 +00:00

Doing Science With Clojure

Data Science Workshop 20 April 2023

This repo contains the slides for a hello Clojure talk for scientists in Oklahoma and elsewhere across the US. This talk has the prespective of a Python user and a Jupyter notebook fan.

I review the very bacis of the syntax, and then I demonstrate the following:

  • Run Clojure REPL in the terminal with the `clj' command.
  • Create a clojupyter kernel to allow running Clojure inside Jupyter.
  • Import the clojure.repl into a Jupyter notebook so we can use the doc function.
  • Import the Icanter software, generate random variables for a normal distribution, and make scatterplots. All of this is done using four symoblic expressions. See below. Note that the nteract.app was used to open and edit the Jupyter notebook.

namespaces of interest

IDEs and editor packages that supports working in Clojue with nREPL

Interactive Quizzes

Interopterability

Social media

Videos

Nov 2021 SciCloj recordings Clojure-TV

Java Virtual Machines

In my talk, I assumed that you have one JVM installed. If you have several installed, you may need to specify one. Java 11 is a conservative choice that works with libpython-clj. The following code sets up aliases to several JVMs and then selects JVM version 11. Add to your .bashrc, .zshrc , or .zshenv file.

# Print the current version.
alias jv='java -version'
# List all of the JVMs and their paths.
alias lsjvms='/usr/libexec/java_home -V'
# Set Java homes for each JVM 
export JAVA_8_HOME=$(/usr/libexec/java_home -v1.8.331)
export JAVA_11_HOME=$(/usr/libexec/java_home -v11)
export JAVA_17_HOME=$(/usr/libexec/java_home -v16)
export JAVA_17_HOME=$(/usr/libexec/java_home -v17)
export JAVA_17_HOME=$(/usr/libexec/java_home -v18)
# Make alias for each JVM.
alias java8="export JAVA_HOME=$JAVA_8_HOME"
alias java11="export JAVA_HOME=$JAVA_11_HOME"
alias java16="export JAVA_HOME=$JAVA_16_HOME"
alias java17="export JAVA_HOME=$JAVA_17_HOME"
alias java18="export JAVA_HOME=$JAVA_18_HOME"
# Set the default Java
java11

Funding

Work on this talk was supported in part by the following funding sources:

  • NIH: R01 CA242845
  • NIH: P20 GM103640, P30 CA225520
  • OCAST HR20-002