Тёмный
No video :(

How Clojure (and ClojureScript) REPL connections work - feat the creator of Calva! 

Daniel Amber
Подписаться 3,9 тыс.
Просмотров 4,2 тыс.
50% 1

Hi everyone!
Please excuse the the audio glitches in this episode. The Audio does get better after the intro!
We discuss a lot in this video but the main points we discuss are
How Calva starts and connects to a REPL.
What a REPL is,.
What an nREPL is.
What shadow-cljs does.
What dep.edn does and how you can use them together.
---------------------------------------------------
Download Calva: calva.io/
Support Calva: calva.io/merch/
Blog: blog.agical.se...
Shadow-w-backend repo: github.com/PEZ...
Shadow-cljs: github.com/thh...
-------------------------------------------------
01:08 Create and explain shadow-cljs.edn
06:33 Discuss different repl options (nbb, babashka, joyride)
09:56 Calva connect to build
13:23 what is cider nrepl?
14:27 What is the difference between nREPL and REPL
22:47 Create dev server using shadow-cljs
25:05 why you can evaluate clojure with shadow-cljs
30:39 How Clojure REPL communication works
30:56 How ClojureScript REPL communication works
31:47 Figwheel and Shadow-cljs difference
33:26 Shadow-cljs with NPM
36:37 Shadow-cljs development console
38:05 Inspect stream shadow-cljs development console
40:12 Integrating deps.edn
41:38 REPL Sessions with Calva
49:41 deps.edn + shadow-cljs in Calva (What is that?)
52:18 Difference in starting with deps.edn and starting with shadow-cljs
53:29 How Calva connects a repl
57:26 How to manually convert Clojure REPL to ClojureScript REPL

Опубликовано:

 

28 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@notjustsilicon
@notjustsilicon Год назад
This is a super useful walkthrough of the underlying system. Thank you very much! Based on the video, here is a summary of the steps that happen under the hood when cljs is evaluated with the help of nREPL: 1. The user evaluates code in the editor. 2. The code is delivered to nREPL. 3. A middleware (shadow.cljs.devtools.server.nrepl/middleware or cider.piggieback/wrap-cljs-repl if using Figwheel) grabs the code and rather than sending it to Clojure for compilation and evaluation it is sent to the... 4. ClojureScript compiler, which instead emits JavaScript. 5. The ShadowCLJS server (or Figwheel server), which has a web socket open to the browser runtime, receives this js and sends it to the browser. 6. The evaluation is carried out by a runtime evaluator, which when appropriate modifies the state of the browser (application) and also sends the evaluation result back to the... 7. server (ShadowCLJS or Figwheel), which forwards it to... 8. nREPL through which finally the... 9. editor REPL receives the evaluation result for the user to inspect.
@onthecodeagain
@onthecodeagain Год назад
Thank you :)
@CalvaTV
@CalvaTV Год назад
At 0:20:40 I accuse VS Code of having a bug. Shame on me. It was actually Calva that had this bug. It is now fixed! Calva is back at zero bugs. Haha.
@designernasser
@designernasser Год назад
It's really great to see what goes on behind the scenes! Thank you both for this awesome video! 👍
@9to5Magic
@9to5Magic Год назад
Thanks so much for doing this. I've been trying to connect to the browser repl from Neovim using Conjure and just getting confused. The explanation of how nrepl connects to the various repls will hopefully help me to get it going.
@andresgomez4267
@andresgomez4267 Год назад
Great video, I have been struggling with running the repls of a deps.edn and shadow-cljs.edn project at the same time and this video not only gives several ways of fixing that problem, but it also gives a clear view into what happens behind the scenes. Thanks so much to the both of you for everything you do to make the clojure world accesible to new programmers.
@andora5539
@andora5539 Год назад
Awesome video guys! Thanks for uncovering Calva repl magic Peter, this helped me a ton in figuring out what goes behind the scenes. 🤘
@eopjohnson7466
@eopjohnson7466 Год назад
I liked all the questions on the internal plumbing and the brief real-world activities, like Tap, or the having to reloading the browser to allow shadow-cljs to connect. I also appreciated the clipping of the white space, to crank up the speed of the conversation. I have virtually no hands-on experience with Clojure but have read a book, and have a background in JavaScript and felt I was able to 900% follow along with what you were doing, with PEZ explanations and your intentional questions that were very much the same things I was wondering. 👍🏼
@daryoushmehrtash7601
@daryoushmehrtash7601 Год назад
Very helpful. Thanks.
@onthecodeagain
@onthecodeagain 11 месяцев назад
Glad it was helpful!
@joshuaeichler-summers2173
@joshuaeichler-summers2173 Год назад
Great video by the way! Thanks for making it
@onthecodeagain
@onthecodeagain 11 месяцев назад
Thank you :)
@unowpl
@unowpl Год назад
Great content
@MohammodnazmuSakiB
@MohammodnazmuSakiB Год назад
Why prefer shadow-cljs over deps.edn?
@johnharriott7878
@johnharriott7878 Год назад
I found it difficult to follow along. Perhaps I need more lead in knowledge?
@onthecodeagain
@onthecodeagain Год назад
What parts were confusing? Maybe we can exapnd on them in later videos :)
@CalvaTV
@CalvaTV Год назад
I'm also curious about if there are another video we should make that gives more of the lead in knowledge. Please elaborate a bit on where you lost track on what we were doing/talking about.
Далее
Секрет фокусника! #shorts
00:15
Просмотров 45 млн
Кого из блогеров узнали?
00:10
Просмотров 596 тыс.
Clojure Syntax - The odd bits
14:01
Просмотров 6 тыс.
Get Started with CLJS + Figwheel-Main
21:08
Просмотров 2,4 тыс.
A History of Clojure by Rich Hickey with Q&A
1:07:02
Просмотров 30 тыс.
An introduction to Clojure!
26:31
Просмотров 12 тыс.