У нас вы можете посмотреть бесплатно Clojure REPL driven development - a simple introduction with Rebel Readline или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
A simple introduction to Clojure development using the REPL, referred to as REPL driven development. Run a Clojure REPL with Rebel readline, using the practicalli/clojure-deps-edn configuration. Demonstrates the Read Evaluate Print loop that gives the REPL its name. https://github.com/practicalli/clojur... Use a Clojure aware editor connected to the REPL process for the full development experience http://practicalli.github.io/clojure/... Transcript: REPL driven development is the foundation to working successfully with Clojure. The REPL is an instant feedback workflow that continually runs your code The REPL contains a live application to interact with. When developing Clojure, the first step is to start a REPL process. Then write a Clojure expression and send it to the REPL, the repl then reads the expression and evaluates it returning the result and giving instant feedback. To start a repl, Open a terminal application and run the clojure command, specifying the main program to run clojure -M:repl/rebel This starts a REPL process and shows a prompt, waiting for your code This REPL configuration is using the rebel readline project, give a highly interactive development experience. Clojure expressions are typed (or pasted) at the prompt Lets add some numbers together (+ 1 2 3 5 (* 2 4) 13) This code calls the plus function with several arguments Pressing RETURN show the result underneath The repl saves the history of the code entered at the prompt. Use the up and down arrows to navigate that history to run the same code again or edit a previous code expression saving time typing it all out again. Lets change the code to multiple its arguments Process a collection of values (map inc [1 3 5 7 9]) Rebel Readline shows signatures of functions once typed at the REPL prompt. as a reminder of the arguments to pass to the function. Generate all the combinations of a 3 tumbler lock. (for [tumbler-1 (range 10) tumbler-2 (range 10) tumbler-3 (range 10)] [tumbler-1 tumbler-2 tumbler-3]) Code can be typed on multiple lines, keeping it easy to read. Once the code is a correct form, the code is evaluated. This prints out a large result that is a little challenging to read. Using the clojure pretty print library, the result will be printed in a human friendly form (clojure.pprint/pprint (for [tumbler-1 (range 10) tumbler-2 (range 10) tumbler-3 (range 10)] [tumbler-1 tumbler-2 tumbler-3])) Rather than show all the combinations, show how many combinations their are Use the up arrow to save typing in all the code again And wrap the code with the count function (clojure.pprint/pprint (for [tumbler-1 (range 10) tumbler-2 (range 10) tumbler-3 (range 10)] [tumbler-1 tumbler-2 tumbler-3])) Add a condition in the code to avoid repeating a number in the combination (count (for [tumbler-1 (range 10) tumbler-2 (range 10) tumbler-3 (range 10) :when (and (not= tumbler-1 tumbler-2) (not= tumbler-2 tumbler-3) (not= tumbler-3 tumbler-1))] [tumbler-1 tumbler-2 tumbler-3])) Replacing count with pretty print to see all the combinations (clojure.pprint/pprint (for [tumbler-1 (range 10) tumbler-2 (range 10) tumbler-3 (range 10) :when (and (not= tumbler-1 tumbler-2) (not= tumbler-2 tumbler-3) (not= tumbler-3 tumbler-1))] [tumbler-1 tumbler-2 tumbler-3])) See the video on Data browsers for more ways to visualize data with the Clojure REPL. Ctrl-X Ctrl-D shows a description of a function, from that functions document string. (inc ) Not sure what a function is called, Ctrl-X Ctrl-A on a name runs a fuzzy search and shows functions with a similar name (map TAB will allow selection of function names starting with the current name. Ctrl-l will clear the REPL screen :repl/help show other commands and configure options for rebel readline. Use a Clojure aware editor connected to the REPL process for the full development experience http://practicalli.github.io/clojure/... Thank you.