Fork me on GitHub
#clojure-norway
<
2022-02-15
>
leifericf12:02:50

Hola, venner! Jeg har gjort klart et førsteutkast av slides til https://www.meetup.com/clojure-oslo/events/282504539/, ref. meet-up gruppa. Vedlagt er en kopi av slides (WIP) med presenter notes, som er mest ment som stikkord for meg/en påminnelse om hva jeg har tenkt å si litt om. Vil sannsynligvis tilpasse en del underveis. Setter pris på innspill og tilbakemeldinger!

❤️ 1
Jakub Holý (HolyJak)10:02:31

Awesome! A few thoughts: 1. I would perhaps use clojure cli and deps instead of Leiningen - one less thing to install, more modern. The downside is you need to add a few cli tools such as https://github.com/seancorfield/deps-new to replicate Lein<s all-in-one. But it is just some stuff to add into a deps.edn you can share with the participants... Or did you pick Lein b/c of better Windows support? 2. p9 avoiding side effects - as @ericnormand points out, we do not avoid them b/c they are the core of the value the SW provides, we are just very disciplined about them and evict them from as much of the code as possible. Eric describes the basics as separating Data, Computations, and Actions. The 2nd level of PF according to him is creating data transformation pipelines - ref https://lispcast.com/the-3-levels-of-functional-thinking/ 3. Also, all Lisps are dynamically typed, I would imagine, not just clj? 4. p11 slide text and comment out of sync? comment describes higher order fns while slide is about data. I would perhaps not mention recursion. It is essential to FP but at the same time a low-level mechanism you rarely need. YMMV 🙂 5. Who is your audience? People new too programming? Then it is too technical. Programmers? then you perhaps do not need to explain what functions are at p12? 6. Side note: IMO Clojure is about 3 things: FP, interactive development (aka repl-driven), and a https://blog.jakubholy.net/2021/simplicity/ and composition. 7. p18 "write programs that modify themselves, our output new programs" is true but unclear, IMO. I'd rather say st. like "write code that produces code, so that you can avoid repetition and introduce new abstractions" 8. p20 I would not mention STM and agents. They are an advanced topic that you rarely need (never, in my case) 9. p22 the map is displayed weirdly, looking like {:a1 :b 2 :c37 10. Perhaps ask folks to pre-install some stuff so that they do not waste time during the workshop? Though no matter what you do, some ppl will not prepare. My https://github.com/holyjak/interactive-dev-wshop only needs Docker + VS Code (leveraging Code's support for dev containers), which simplifies the setup considerably. Though never tried it on windows. 11. p32 "Cljs or Luminus" does not make sense to me. The one is a language, the other is an app template. Also, Luminus is replaced by Kit https://yogthos.net/posts/2022-01-08-IntroducingKit.html 12. p38 could also mention interacting with a running minecraft world from the REPL via Witchcraft 🙂

❤️ 1
💯 1
Jakub Holý (HolyJak)10:02:36

BTW this https://vimeo.com/230220635 might be useful to point the participants to. Accordign to a friend, it help him grasp what interactive dev means

👍 1
leifericf11:02:45

Wow, thanks for the input, @U0522TWDA! Much appreciated. I will be able to tweak the workshop some more now. To comment on a few of your points: 1. I agree about Clojure CLI over Leiningen. Unfortunately, I haven’t fully understood it myself yet, and it seems to require more manual steps than Leiningen. Also, on Windows, it was quite tricky to install the correct version of PowerShell, .NET and Java. Installing Leiningen via Chocolaty (Windows package manager) took care of all that automatically. I don’t have a Windows machine for testing, and I have only helped one friend to get Clojure working on their machine. So I’m a bit worried about many Windows-users coming to the workshop. The installation experience for Clojure in general is quite horrible to be honest (or perhaps I don’t understand it well enough yet). I wish there was a “one-click installer” for all platforms. That would make the getting started experience a lot smoother. 2. You’re right. I was thinking more about avoiding unnecessary side-effects as much as possible, and pushing necessary side-effects towards the edge of the system. I will try to clarify that. 3. Yeah, I think you’re right about that. 4. Thanks! That is indeed out-of-sync. The notes belonged to a previous version of the slide. 5. The audience is potentially people who are brand new to programming in general. The workshop is to help people install and set up everything they need to start learning, playing around and experimenting. That’s why included some very basic explanations that are obvious to people who are familiar with programming. I’m not sure who will actually show up to the workshop. I might just skim those slides, or skip them all-together, depending on who shows up. 6. Thanks for the input! I have tried to cover all of those things, and will emphasize it a bit more. 7. Indeed, that slide is perhaps a bit too technical and advanced for the target audience. But I think the metaprogramming facilities are an important part of Clojure’s value proposition. The problem is that it is not easily understood for beginners, because it’s a more advanced and abstract topic, which requires a thorough understanding of more basic concepts. 8. Yeah. Same reasoning as for the point above, about metaprogramming. I feel like STM and Agents (or concurrency facilities more broadly) is one of the most important value propositions for Clojure, but I’m not sure how to communicate that to beginners, especially those who have no prior exposure to programming concepts. Maybe I should just remove it from the presentation, as you suggest. 9. Thanks! That’s a typo. 10. I was expecting to introduce people to programming more generally, and did not presume any prior knowledge. The workshop is intended to help people get started, by installing and setting up an environment, and seeing how to use it. I did consider asking people to do these things in advance. But I had to figure it out for myself, because the average Clojure developer is quite advanced developer, there is not much “getting started” material for beginners. That’s why I thought it might be a good idea to fill that gap, to make the newbie experience a bit more welcoming. 11. You’re right. On that slide, I had previously mentioned Fulcro as well. I’ll try to rewrite it so that it makes more sense. 12. Cool, thanks! I’ll add that too.

Jakub Holý (HolyJak)12:02:19

> Same reasoning as for the point above, about metaprogramming. I feel like STM and Agents (or concurrency facilities more broadly) is one of the most important value propositions for Clojure I agree about concurrency but not STM and Agents in particular. As I said, they look cool but are rarely needed. At most I would point them to some place where they can read about other concurrency tools (such as these two). But it is your slides! 🙂 If unsure about the audience then I would split the slides in two, first part an intro for non-programmers so that you could skip it if none. The Clojure Bridge folks can give you pointers about how to introduce programming and Clojure to such people. IMO https://www.maria.cloud/ is great way for non-programmers to start playing with Clojure.

👍 1
teodorlu18:02:41

> 3. Also, all Lisps are dynamically typed, I would imagine, not just clj? There's https://docs.racket-lang.org/ts-guide/index.html, things like https://lexi-lambda.github.io/hackett/, and extensions to common lisp that provide type systems (https://github.com/olewhalehunter/indigo-lisp). Perhaps soften a bit to "lisps are generally dynamic"?

👍 1
❤️ 1
leifericf13:02:23

@U0522TWDA I just read through https://clojure.org/guides/deps_and_cli now. It’s actually remarkably explicit and intuitive! It wasn’t as scary as it first seemed. Leiningen, in comparison, is a bit more “black box”-ish. I’m not sure how easy it is to set up on Windows, though. Maybe I’ll change the workshop if I can figure that out soon (waiting for my garbage Windows test laptop to return from IT service at work).

leifericf14:02:31

Just got my Lenovo T440s from 2015 up and running with Windows 10. I’m surprised it still works, and all diagnostics are green! Going to test the Windows set-up experience now…

leifericf15:02:09

I got CLJ installed and working on my Lenovo ThinkPad T440s from 2015 with Windows 10 Pro (OS build 19044.1466). Clean system, fresh Windows installation. The pre-installed version of PowerShell (`5.1.19041.1320`) and .NET Framework (`4.8.04084`) were sufficient for CLJ, so I didn’t need to mess with that. The only thing that was missing, was Java (no version of Java was pre-installed with Windows). So I had to download and install the recommended version from the official Java website, which was Java 1.8.0_321. After that, I installed CLJ using PowerShell in Administrator-mode, with the short version of the command shown in the official Getting Started guide (`iwr -useb http://download.clojure.org/install/win-install-1.10.3.1058.ps1 | iex`). That went well without any issues (I chose to install it to C:\Program Files\WindowsPowerShell\Modules for no special reason). The only problem I had was insufficient user privileges to run clj after having installed it. I solved this by granting my user more privileges, with the command Set-ExecutionPolicy RemoteSigned -Scope CurrentUser. This is also suggested in the official Getting Started guide. And now everything seems to be working.

❤️ 2
leifericf09:02:11

Here’s the second (and probably final) version of the slide deck for tomorrow’s workshop, where I have incorporated changes based on feedback. Thanks for giving me feedback and helping me improve the content!

2
Jakub Holý (HolyJak)10:02:31

Awesome! A few thoughts: 1. I would perhaps use clojure cli and deps instead of Leiningen - one less thing to install, more modern. The downside is you need to add a few cli tools such as https://github.com/seancorfield/deps-new to replicate Lein<s all-in-one. But it is just some stuff to add into a deps.edn you can share with the participants... Or did you pick Lein b/c of better Windows support? 2. p9 avoiding side effects - as @ericnormand points out, we do not avoid them b/c they are the core of the value the SW provides, we are just very disciplined about them and evict them from as much of the code as possible. Eric describes the basics as separating Data, Computations, and Actions. The 2nd level of PF according to him is creating data transformation pipelines - ref https://lispcast.com/the-3-levels-of-functional-thinking/ 3. Also, all Lisps are dynamically typed, I would imagine, not just clj? 4. p11 slide text and comment out of sync? comment describes higher order fns while slide is about data. I would perhaps not mention recursion. It is essential to FP but at the same time a low-level mechanism you rarely need. YMMV 🙂 5. Who is your audience? People new too programming? Then it is too technical. Programmers? then you perhaps do not need to explain what functions are at p12? 6. Side note: IMO Clojure is about 3 things: FP, interactive development (aka repl-driven), and a https://blog.jakubholy.net/2021/simplicity/ and composition. 7. p18 "write programs that modify themselves, our output new programs" is true but unclear, IMO. I'd rather say st. like "write code that produces code, so that you can avoid repetition and introduce new abstractions" 8. p20 I would not mention STM and agents. They are an advanced topic that you rarely need (never, in my case) 9. p22 the map is displayed weirdly, looking like {:a1 :b 2 :c37 10. Perhaps ask folks to pre-install some stuff so that they do not waste time during the workshop? Though no matter what you do, some ppl will not prepare. My https://github.com/holyjak/interactive-dev-wshop only needs Docker + VS Code (leveraging Code's support for dev containers), which simplifies the setup considerably. Though never tried it on windows. 11. p32 "Cljs or Luminus" does not make sense to me. The one is a language, the other is an app template. Also, Luminus is replaced by Kit https://yogthos.net/posts/2022-01-08-IntroducingKit.html 12. p38 could also mention interacting with a running minecraft world from the REPL via Witchcraft 🙂

❤️ 1
💯 1