Talk Python to Me is a weekly podcast hosted by developer and entrepreneur Michael Kennedy. We dive deep into the popular packages and software developers, data scientists, and incredible hobbyists doing amazing things with Python. If you're new to Python, you'll quickly learn the ins and outs of the community by hearing from the leaders. And if you've been Pythoning for years, you'll learn about your favorite packages and the hot new ones coming out of open source.
…
continue reading
محتوای ارائه شده توسط Christoph Neumann and Nate Jones, Christoph Neumann, and Nate Jones. تمام محتوای پادکست شامل قسمتها، گرافیکها و توضیحات پادکست مستقیماً توسط Christoph Neumann and Nate Jones, Christoph Neumann, and Nate Jones یا شریک پلتفرم پادکست آنها آپلود و ارائه میشوند. اگر فکر میکنید شخصی بدون اجازه شما از اثر دارای حق نسخهبرداری شما استفاده میکند، میتوانید روندی که در اینجا شرح داده شده است را دنبال کنید.https://fa.player.fm/legal
Player FM - برنامه پادکست
با برنامه Player FM !
با برنامه Player FM !
Episode 012: Embrace the REPL
Manage episode 225340258 series 2463849
محتوای ارائه شده توسط Christoph Neumann and Nate Jones, Christoph Neumann, and Nate Jones. تمام محتوای پادکست شامل قسمتها، گرافیکها و توضیحات پادکست مستقیماً توسط Christoph Neumann and Nate Jones, Christoph Neumann, and Nate Jones یا شریک پلتفرم پادکست آنها آپلود و ارائه میشوند. اگر فکر میکنید شخصی بدون اجازه شما از اثر دارای حق نسخهبرداری شما استفاده میکند، میتوانید روندی که در اینجا شرح داده شده است را دنبال کنید.https://fa.player.fm/legal
Christoph complicated development by misunderstanding the REPL.
- We go back to the roots of Christoph's experience with Clojure...
- How do I run Clojure code?
- The REPL is fun for evaluation, but how do you run a "real" program?
- Experience in other languages: edit the file, compile, rerun the program
- Mentality: get through the edit, compile, run loop as fast as possible!
- Autobuilder is the logical end.
- "Where's my autobuilder in Clojure?!"
- The REPL model is fundamentally different.
- "[The REPL] is like cutting the Gordian Knot. You change the problem and that's how you solve it."
- "The reason why the problem I wanted solved, wasn't 'solved', is because nobody has that problem because they do things differently here."
- Tactic 1: edit, save, restart the REPL
- "Restarting the REPL isn't super slow, but let's just say it's not instantaneous."
- Tactic 2: edit, save, run
(use 'the.namespace :reload)
in the REPL - "Now I have a REPL history of
use
statements!" - Problems:
- forgetting to reload dependent namespaces
- loading dependencies in the wrong order
- old definitions built up
- Big Problem: function renames left the old version around, so accidental calls using the old name produced no errors and ran old behavior!
- Back to quitting the REPL to clean out the cruft. Ugh!
- Discovered
clojure.tools.namespace
! Reloads everything and cleans out the cruft! - Tactic 3: edit, save,
(use '[clojure.tools.namespace.repl :only (refresh)])
,(refresh)
- Problem:
refresh
would purge itself! - "I don't know why it took me so long to discover the magical
user
namespace!" - The REPL will automatically
use
theuser
namespace. - "I can put code into a
user
namespace and it will be there for me." - Christoph would switch namespaces in the REPL without even stopping to wonder what namespace he started in.
- "It's like walking out of a door and not even thinking about the fact you're in a building. Oh wait! What room did I just leave?"
- Tactic 4: make sure
refresh
is in theuser
namespace, edit, save,(refresh)
- However, Christoph still didn't understand the REPL.
- Just thought the REPL was for:
- reloading the code and restarting
- evaluating snippets of code
- inspecting stuff
- Nate's big ah-ha moment: "Not only is my application inspectable, it's fungible. I can change it in place as it's flying along! I don't have to restart it!"
- Christoph's hint that there was still more came from seeing
comment
blocks in code and reading about vim-fireplace. - "There's a new room you can explore. That room is editor integration with the REPL."
Clojure in this episode:
use
clojure.tools.namespace.repl/refresh
clojure.pprint/pprint
Related projects:
118 قسمت
Manage episode 225340258 series 2463849
محتوای ارائه شده توسط Christoph Neumann and Nate Jones, Christoph Neumann, and Nate Jones. تمام محتوای پادکست شامل قسمتها، گرافیکها و توضیحات پادکست مستقیماً توسط Christoph Neumann and Nate Jones, Christoph Neumann, and Nate Jones یا شریک پلتفرم پادکست آنها آپلود و ارائه میشوند. اگر فکر میکنید شخصی بدون اجازه شما از اثر دارای حق نسخهبرداری شما استفاده میکند، میتوانید روندی که در اینجا شرح داده شده است را دنبال کنید.https://fa.player.fm/legal
Christoph complicated development by misunderstanding the REPL.
- We go back to the roots of Christoph's experience with Clojure...
- How do I run Clojure code?
- The REPL is fun for evaluation, but how do you run a "real" program?
- Experience in other languages: edit the file, compile, rerun the program
- Mentality: get through the edit, compile, run loop as fast as possible!
- Autobuilder is the logical end.
- "Where's my autobuilder in Clojure?!"
- The REPL model is fundamentally different.
- "[The REPL] is like cutting the Gordian Knot. You change the problem and that's how you solve it."
- "The reason why the problem I wanted solved, wasn't 'solved', is because nobody has that problem because they do things differently here."
- Tactic 1: edit, save, restart the REPL
- "Restarting the REPL isn't super slow, but let's just say it's not instantaneous."
- Tactic 2: edit, save, run
(use 'the.namespace :reload)
in the REPL - "Now I have a REPL history of
use
statements!" - Problems:
- forgetting to reload dependent namespaces
- loading dependencies in the wrong order
- old definitions built up
- Big Problem: function renames left the old version around, so accidental calls using the old name produced no errors and ran old behavior!
- Back to quitting the REPL to clean out the cruft. Ugh!
- Discovered
clojure.tools.namespace
! Reloads everything and cleans out the cruft! - Tactic 3: edit, save,
(use '[clojure.tools.namespace.repl :only (refresh)])
,(refresh)
- Problem:
refresh
would purge itself! - "I don't know why it took me so long to discover the magical
user
namespace!" - The REPL will automatically
use
theuser
namespace. - "I can put code into a
user
namespace and it will be there for me." - Christoph would switch namespaces in the REPL without even stopping to wonder what namespace he started in.
- "It's like walking out of a door and not even thinking about the fact you're in a building. Oh wait! What room did I just leave?"
- Tactic 4: make sure
refresh
is in theuser
namespace, edit, save,(refresh)
- However, Christoph still didn't understand the REPL.
- Just thought the REPL was for:
- reloading the code and restarting
- evaluating snippets of code
- inspecting stuff
- Nate's big ah-ha moment: "Not only is my application inspectable, it's fungible. I can change it in place as it's flying along! I don't have to restart it!"
- Christoph's hint that there was still more came from seeing
comment
blocks in code and reading about vim-fireplace. - "There's a new room you can explore. That room is editor integration with the REPL."
Clojure in this episode:
use
clojure.tools.namespace.repl/refresh
clojure.pprint/pprint
Related projects:
118 قسمت
Tutti gli episodi
×به Player FM خوش آمدید!
Player FM در سراسر وب را برای یافتن پادکست های با کیفیت اسکن می کند تا همین الان لذت ببرید. این بهترین برنامه ی پادکست است که در اندروید، آیفون و وب کار می کند. ثبت نام کنید تا اشتراک های شما در بین دستگاه های مختلف همگام سازی شود.