This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-31
Channels
- # ai (5)
- # announcements (11)
- # beginners (19)
- # biff (1)
- # calva (8)
- # cider (3)
- # clj-kondo (12)
- # clojure (97)
- # clojure-europe (39)
- # clojure-nl (1)
- # clojure-norway (74)
- # clojure-uk (35)
- # clojurescript (8)
- # component (8)
- # conjure (4)
- # cursive (13)
- # data-science (1)
- # datahike (55)
- # datomic (2)
- # emacs (3)
- # etaoin (6)
- # gratitude (1)
- # hoplon (12)
- # hyperfiddle (54)
- # introduce-yourself (1)
- # lsp (70)
- # missionary (40)
- # music (1)
- # off-topic (79)
- # re-frame (78)
- # releases (4)
- # sql (5)
- # squint (9)
- # tree-sitter (4)
- # xtdb (20)
Morning!
Good morning! Today’s cursing quota is dedicated to Notion.
I just agreed to set up and hold a course/workshop introducing a small team to Clojure! The customer is one of the people responsible for me finding my way here, which makes it extra surreal. The task involves setting up VS Code and Calva, so I guess I am an expert on at least parts of it. And I am particularly interested in the Get Started part of Clojure journeys so the whole prospect makes me happy. Also nervous. I have a few days short of two weeks to prepare. I guess starting to prepare is the way to get my tummy in control. If anyone has advice, or any thoughts to share on the subject, please shoot them as replies to this post. 🙏 I think I will have more concrete questions as I progress. Edit: It’s a one-day course/workshop. The team is going to adopt an existing Clojure+ClojureScript project. Probably focusing the afternoon on getting some thing done in that project.
I always say, just remember that there are 3 presentations, the one you prepare, the one you give and the one you wanted to give. You will forget to say things, you will add things and afterwards you will suddenly realise things you should have said. All those things will happen. So don't worry too much about what you actually say in the presentation. just my 2 c.
Awesome. I taught a function programming module using clojure on an undergrad uni course a few years ago. I think that I found it best to stay engaged with the people listening and trying to answer their questions. They all had different expectations as to what the process of programming was like and introducing them to REPL driven development challenged different people's assumptions in different ways. Two way interaction was key to getting past that. A workshop focused on a specific codebase sounds like a good forum to help with that 😉 Good luck.
I feel like getting them to write actual code as soon as is practicable is maybe a good idea.
one day is not a long period of time.
Learning is in the fingers
I don’t think I can hope to help them learn very much Clojure during just a day. My assignment is actually to inject some enthusiasm into the prospect of them taking responsibility for the Clojure+ClojureScript app in question. And to get them started with that. About the enthusiasm part…. my customer also wants me to inject some enthusiasm for Clojure to a broader audience, so the day will start with a presentation and some demos of interactive programming. Then workshop for the team. and that will have them learning via their fingers for the rest of the day, I have just decided 😃. (Which is also shorter than a full day, I just learnt.)
It certainly is a short amount of time. I did a looooot of fumbling around when I first learned Clojure on my own. Without dot completion as I knew it from Java, it's hard to know which function to call and really get started. A mentor would have helped immensely, but you can't sit on everyone's shoulder. I would maybe think about a very restricted domain for them to work with, naming some pertinent functions in advance. But I've never done this sort of thing, only 1-1 mentoring, so idk what works best. Maybe they're all superstars and will figure everything out 🙂
Good morning! Thanks for help and encouragement with this! 🙏 ❤️ Today was the day and from what I can tell they seemed super happy. The first, more general, part was recorded, so hopefully I got some content for CalvaTV out of it as well.
hmm... I think I might need to write a macro (this might be the first one I've written)
I'd like to turn the passed in global var name and turn it into a bit of text to display
This macro does what I want (I think)
(defmacro var-name-str [expr]
`(name (quote ~expr)))
(var-name-str clerk/vl)
"vl"
If you're just looking to get the name from a symbol without quoting it, you could do something like
(defmacro var-name-str [expr]
(name expr))
... the backtick/quote/tilde is just quoting and unquoting expr
, so you could just call name
... but if you're actually dealing with vars and are prepared to var-quote them, you could use a function like
(defn var-name-str2 [v]
(name (.toSymbol v)))
(var-name-str2 #'clojure.core/map) ;; => "map"
not sure if that's of any use to you?I think macro's are fine if you want to control the syntax, but if you're ok with quoting things in your code or wrapping them in functions to pass around, then you very rarely need them. And the advantage of var quoting them will be less typos. The macro will swallow errors if the var doesn't exist.