Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nid90/clojurebridge-blr
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: nilenso/clojurebridge
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 6 commits
  • 11 files changed
  • 2 contributors

Commits on Sep 11, 2023

  1. Edits to material

    - Remove references to Nightcode
    - Add comments to address
    qptr committed Sep 11, 2023
    Copy the full SHA
    c3b35ce View commit details

Commits on Mar 17, 2024

  1. Update the content file

    Add
    - speaker details
    - structural editing
    - fn example with let block
    - resources link to learn clojure
    alishamohanty committed Mar 17, 2024
    Copy the full SHA
    f3059dd View commit details
  2. Copy the full SHA
    4e82da5 View commit details

Commits on Mar 19, 2024

  1. Add paredit link in structural editing

    - Add compand to evaluate a sexp in REPL section
    - fix the view of paredit table
    - undo the removal of "why? clojurebridge" in the intro
    alishamohanty committed Mar 19, 2024
    Copy the full SHA
    953c7be View commit details
  2. Fix formatting in resources file

    Update the type of file from org to md
    alishamohanty committed Mar 19, 2024
    Copy the full SHA
    5294941 View commit details
  3. Merge pull request #1 from nilenso/clojurebrdige-22ndmarch2024-edits

    Content edits for 22nd March 2024 workshop
    alishamohanty authored Mar 19, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    bb3a85f View commit details
Showing with 94 additions and 356 deletions.
  1. +3 −1 README.md
  2. +68 −16 content.org
  3. +1 −0 ideas.org
  4. +9 −5 land-of-wizards/data.clj
  5. +0 −9 mars-rover/.gitignore
  6. +0 −214 mars-rover/LICENSE
  7. +0 −18 mars-rover/README.md
  8. +0 −5 mars-rover/project.clj
  9. +0 −79 mars-rover/src/mars_rover/core.clj
  10. +6 −9 outline.org
  11. +7 −0 resources.md
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -2,10 +2,12 @@

### [bridge.clj](basic-clj-project/src/basic_clj_project/bridge.clj)

This is a starting point to supplement the workshop. It has a handful of expressions you can simply evaluate in the [InstaREPL](https://sekao.net/nightcode).
This is a starting point to supplement the workshop. It has a handful of expressions you can simply evaluate in your REPL.

### [content.org](content.org)

[//]: # (TODO: Do we want to keep around org-mode files? sandy is probably not using emacs)

Presenter notes, code and exercises for the workshop that one can project using [org-mode](https://orgmode.org).

### [outline.org](outline.org)
84 changes: 68 additions & 16 deletions content.org
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
* Preface
** What is ClojureBridge?

- This workshop is aimed specifically at women. Why? In the past 7
years of my engineering career I have seen the disparity in the
gender ratio at all the companies I have worked with. In some teams,
I was the only female developer. In some teams, I was the only
female. I have never had a female mentor before. But, I have also
seen companies change, grow, become more aware of this issue, and
find ways to fix it. This is a small attempt towards that. Getting
more females to learn programming, learn Clojure and do awesome
things that come with ability to command a computer.
- This workshop is specifically designed for women and non-binary individuals.
It's a small effort to encourage more females to learn programming, particularly
Clojure, and utilize the power of computer technology. Why? In the past decade
years of my engineering career I have seen the disparity in the
gender ratio at all the companies I have worked with. In some teams,
I was the only female developer. In some teams, I was the only
female. I have never had a female mentor before. But, I have also
seen companies change, grow, become more aware of this issue, and
find ways to fix it. This is a small attempt towards that. Getting
more females to learn programming, learn Clojure and do awesome
things that come with ability to command a computer.

- "So before we begin, I want to reinforce that you can program, that
you can do math, that you can design car suspensions and fire
@@ -29,8 +31,24 @@

- Also, thanks to nilenso, IN/Clojure and ClojureBridge core team.

- https://tinyurl.com/clj-bridge-blr
-> outline.org
- https://github.com/nilenso/clojurebridge

** Speakers

*** Somya Maithani

Somya is currently working as a senior platform developer at Helpshift, developing
in Clojure for the past 9 years and hoping to continue for more.
She loves distributed systems, event streaming and exploring new databases.
In her spare time, she loves reading fiction, cooking and learning football.

*** Sezal Jain

Sezal is a full range engineer, having worked with hardware, embedded software,
web applications and AI algorithms. Talk to her about anything ranging from edge
detection algorithms to autonomous river exploration, helicopter landing,
healthcare at home, strawberry farming or scaling logistics solutions.

* Structure
** What is programming
- Programming is the process of creating a set of instructions that
@@ -59,7 +77,7 @@
predominant of which today are Common Lisp and Scheme.

- Clojure (pronounced "closure") is a new dialect of Lisp created by
Rich Hickey. Like Scheme, Clojure is a functional dialect, meaning
Rich Hickey. Clojure is a functional dialect, meaning
that it supports and encourages programming in a "functional style".
[[./img/rich.jpeg]]

@@ -108,9 +126,15 @@
- Let's start a REPL. and we can type and evaluate things as we go on
learning them.

*** How to open a REPL in VSCode
- Open command palette using: `ctrl+shift+P` or `cmd+shift+P`
- Write `Calva: Start a project REPL`
- Select the project and tool accordingly
- Once the REPL is up, navigate to the line you want to evaluate and
press `alt+enter` (`opt+enter` for mac)

- As a first thing, type `nil` in your REPL, and see what it returns.
- `nil` is the most basic value in Clojure, it represents emptiness,
nothing-doing, not-a-thing.
- `nil` is the most basic value in Clojure, it represents emptiness, nothing-doing, not-a-thing.

#+BEGIN_SRC clojure
nil
@@ -282,6 +306,25 @@ Evaluate some normal functions in your REPL
15
#+END_SRC

*** Structural Editing

Structural editing is a method of manipulating code based on its syntactic structure,
rather than its text representation.
It allows for operations like moving, wrapping or editing code blocks as discrete units.

Plugins that enable structural editing:

- Visual Studio Code: Calva (https://calva.io/)

Commonly used Paredits(https://calva.io/paredit/) for Visual Studio:

| Action | Windows | Linux | Mac |
| -------------------------- | ---------------------- | ----------------------| -----------------------|
| Slurp Forward | ctrl+alt+right | ctrl+alt+. | ctrl+opt+right |
| Barf Forward | ctrl+alt+left | ctrl+alt+, | ctrl+opt+left |
| Raise Sexp | ctrl+alt+p ctrl+alt+r | ctrl+alt+p ctrl+alt+r| ctrl+opt+p ctrl+opt+r |
| Drag sexp forward/backward | alt+up/down arrows | alt+up/down arrows | opt+up/down arrows |


** Simple data types - string, bool and numbers
- In any expression, you have nouns and verbs
@@ -342,7 +385,8 @@ List of basic types:
2) Strings: text like "hey", "cats are so nice", "ありがとう"
3) Characters: \a, \b, \c


# TODO: def is talking about symbols. how to move symbols to end. can have smaller explanations if we want
# i dont think we need to move this stuff. underestimating probably
** Special data types - symbols and keywords
*** keywords
- Clojure has a special type called keyword
@@ -431,6 +475,14 @@ List of basic types:
**** defn
#+BEGIN_SRC clojure
(defn same [x] x)

(defn hello-world [name]
(str "Hello world " name))

(defn calculate-area
[length width]
(let [area (* length width)]
(str "The area of the rectangle is " area " square units.")))
#+END_SRC

- Function definitions are composed of five main parts:
@@ -608,7 +660,7 @@ List of basic types:
- first returns the first item in the collection.
#+BEGIN_SRC clojure
(first [5 10 15])
(nth [5 10 15] 0)
;; TODO write using nth function?
;=> 5
#+END_SRC

1 change: 1 addition & 0 deletions ideas.org
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# TODO: sandy can use this to ideaboardz
* Opening

Something along the lines of: https://aphyr.com/posts/301-clojure-from-the-ground-up-welcome
14 changes: 9 additions & 5 deletions land-of-wizards/data.clj
Original file line number Diff line number Diff line change
@@ -9,6 +9,10 @@
:garden "You are in a beautiful garden. There is a well in front of you."
:attic "You are in the attic. There is a giant welding torch in the corner."})

(comment "Let's keep track of the wizard's movements.")

(def wizard-location :living-room)

(comment "The edges map contains information about the where and how of each path into/out of that place. Notice how information-rich this one variable is and how it describes all that's needed to know but not a thing more - Lispers love to create small, concise pieces of code that leave out any fat and are easy to understand just by looking at them.")

(def edges
@@ -27,8 +31,8 @@
:garden [:chain :frog]})

(comment "Given the information above, we intend to:
1. Describe the location the wizard is at.
2. Describe the paths from wizard's current location to another given location.
3. Describe all the paths in and out of wizard's current location
4. Describe all the objects at wizard's current location
5. Write a function that ties up all the above functionality")
1. Describe the paths from wizard's current location to another given location.
2. Describe all the paths in and out of wizard's current location
3. Describe all the objects at wizard's current location
; TODO: elaborate this. how can you do all this in 1 fn:
4. Write a function that ties up all the above functionality")
9 changes: 0 additions & 9 deletions mars-rover/.gitignore

This file was deleted.

Loading