Clojure Bootcamp
Day 1 Workshop
"Intro to Clojure"
Vocabulary
Skills
Knowledge
Clojure Questions
LISP
a high-level computer programming language family (and specification) devised for list processing
evaluate (code)
to run or execute code
documentation
functions
code that does something
notes that describe code in terms of inputs, outputs, and any other relevant information
argument
to "pass" something
to give something (such as a value) to a function
a value given to a function
fn
arity
the number of arguments a function can take
an abbreviation for "function"
error
exeception
bad behavior of a program
something that surprises your program (also probably not good)
What is the difference between an error and an exception?
stack traces
lines that are sometimes printed out by a program when an error occurs
maria cloud specific
click on a function to get its documentation
clojure
give a function an argument
run a cell of code by hitting "control" + "enter"
the first thing in a list in Clojure is a function call
function call
where a function is actually used (also called a function "invocation")
string
actual text including letters, numbers, punctuation, and whitespace
make a new code cell by hitting "enter" while at the end of an existing cell
environment
when making a string, it is written in double quotes
use premade functions that belong to maria cloud such as "what-is", "circle", and "doc"
use premade functions such as ... ???
nest a function call within another function call
;;ex: (what-is (circle 25))
;;ex: (circle 25)
Learner Cohort Backgrounds
NLP
Linguistics
Education
Python
Data Analytics
Bootcamp Goals
English
Business
Chemistry
Love learning
Master a language
Learn some Clojure
Work in EduTech
Start our own business
coding notebook
a document with code "cells" that can be individually run, may also allow for "markdown cells"
markdown
Can we do a quick review / demo of replit.com?
What are some suitable / appropriate starter (first week) projects for a Clojure learner?
A text adventure game
(not code) A learner path of Clojure
Resources
Build a random yoga pose generator
Random yoga pose generator
Water & air temperature safety calculator program
A macro nutrient calculator
"read out" some code in "plain English"
Avi's sneak-peek demo of custom written functions: https://replit.com/@avidrucker/MistyroseGratefulMultitasking#main.clj
Cary's text adventure (Python code): https://replit.com/@CarolynMartha/PoetryProjectFado#main.py
Group shared by Laura: https://www.shelovesdata.com/
Bootcamp Day 1 workshop organizational document: https://nextjournal.com/avidrucker/clojure-bootcamp-for-open-source---day-1
This is in contrast to the C family of programming languages (C++, Python, Java, JavaScript, etc.)
Slideshow that delves further into Clojure and it's relationship to other LISPs (see slide 2) https://slidetodoc.com/clojure-lisp-reloaded-versions-of-lisp-n-lisp/
parens
abbreviation of "parentheses"
xkcd cartoon on LISPs: https://images.app.goo.gl/urffc6tm2unvfroeA
symbol
(quires extra code libraries) An animation made with code
Is LISP a family of languages or a language itself?
Avi: It seems that the answer is "it is both". Search for "LISP 1" here: https://en.wikipedia.org/wiki/List_of_Lisp-family_programming_languages
Avi: Further reading on "how to learn Clojure" from 2012: https://eigenhombre.com/resources-for-learning-clojure.html
Clojure is incredibly stable - libraries that are years old are usually still very useful (in contrast w/ JavaScript libraries)
Clojure is built with Java
What is the significance of Clojure being built with Java?
Avi: Java functions (and Java know-how) can be utilized inside of Clojure.
Spanish
Japanese
library
Java
Clojure Bootcamp
Day 2 Workshop
"Intro to Git & GitHub"
Resources
Knowledge
Questions
Vocabulary
repo
short for "repository"
repository
"a place to store something"
local
remote
clone
fork
to download a repository
to copy someone else's code to your remote storage
note that if you fork someone's code and both you and the original owner change your individual versions, that your changes may not be compatible (easily merged back in)
shell / terminal
a text only window for running commands
a special kind of text file that allows for basic styling, links, images, etc.
markdown
see day 1 mindmap for definition
private
public
Repositories are by default public.
Private repositories do not require a paid account for individual usage.
What is the difference between Git and GitHub?
What exactly is Git?
What exactly is GitHub?
It is a program that helps maintain and track files as they change. In other words, Git is a Version Control System.
GitHub is a provider of (and platform that offers) Git Version Control in addition to group / project management, commenting, social media features etc..
"a collection of things"
sometimes referred to as a "project"
only you can access
the whole internet / world can access
on someone's GitHub account
on someone's computer
GUI
acronym for "graphical user interface"
Benevolent Dictator for Life
Examples of Open Source
README.md
A convention of GitHub projects. The README.md (markdown) file is previewed on the home page of all GitHub projects by default. This file is usually used as a project directory and information hub, helping people understand their options regarding contribution, installation, usage, etc..
Skills
(A) download ("clone") someone else's code from GitHub
Example code repository: https://github.com/avidrucker/clojure-bootcamp-may31
(B) make your own GitHub account (skipped this b/c everyone already has one)
(C) "fork" (make a remote copy of) someone else's repository
(D) create a new repository of your own
See Avi's demo: https://github.com/avidrucker/clojure-hello-world
(E) save a file to a repository using the online "GUI", and
(F) share your repository with someone else and have them successfully download or fork its contents
Next Time
Pull Requests
Merging code between forks
Branching
Issues
.gitignore file
Typical workflow to contribute to someone else's project
- Fork someone's project
- Clone your fork
- Modify your code locally
- Commit your changes
- Push your code back up to your remote fork
- Submit a Pull Request against the original project with your fork
- Have your PR merged into the original codebase*
Note: It can be helpful if not ideal that you confirm that your code changes are likely to be reviewed and/or accepted. In other words, confirm that the original project is still "actively maintained" and that your changes are in alignment with the project goals.
- An alternative to #7 is to create your own distinctly unique fork that is not intended for merging back with the original.
Clojure Bootcamp
Day 3 Workshop
"Installing Clojure Locally"
Vocabulary
Knowledge
Skills
Questions
Why must one install Java in order to install Clojure?
Java is necessary for installing Clojure because Clojure runs on the JVM (Java Virtual Machine).
JVM
stands for the "Java Virtual Machine"
enables running of Java and Clojure programs on any platform (PC, Mac, or Linux)
How to install Clojure on a Mac computer
How to start a REPL
- open a terminal window
- type "lein repl" and hit <enter>
How to execute code in the REPL
click to edit
Can the REPL interface somehow with maria.cloud?
Exception: First week in maria.cloud can do animation