Keynote for pybay.com, 2nd annual Regional Python Conference in SF. Slides: pybay.com/site_media/slides/raymond2017-keynote/index.html
Пікірлер: 87
@senpos7 жыл бұрын
Oh, i see Raymond Hettinger - i press "Like" :-) Thanks for upload!
@baconsledge5 жыл бұрын
Raymond is a pleasure to watch and listen to, and makes Python awesome.
@PhilippeCarphin3 жыл бұрын
One of the things I liked from "The Pragmatic Programmer" about concurrency was that he also says that it can make it easier to reason about your problem when you free yourself from certain ordering problems.
@kennys18815 жыл бұрын
I'm a simple man.. I see Raymond Hettinger, I click the video
@simonmasters32955 жыл бұрын
40k views, 1k likes and only 29 comments, most of which are boring. This is probably one of the most important, relevant, compelling, authentic videos on the subject of "How to program intelligently" After 30 years of coding experience I am prepared to go back to square one because I know it makes sense. The stuff at 33.30 "ASYNC is the future...ASYN maxes CPU, Existing code and libraries, ASYNC means you will have to re-tool..." is pure gold.
@csmole12314 жыл бұрын
30 yrs of coding! your view of the world must be wonderful!
@willd0g2 жыл бұрын
when he said an easy problem even for high school students. I learnt my first for loop when I was 25 and fell in love with programming.
@nuraortap7881Ай бұрын
What a wonderful and insightful orator and educator.
@pablo_brianese3 жыл бұрын
This craziness is how I came to understand why functional programming has value.
@XzcutioneR25 жыл бұрын
What an excellent talk. I wish they had let him delve into the detail of that last piece of code.
@KurzedMetal5 жыл бұрын
Just brilliant!!! He just captured my attention the whole time.
@feddeschaeffer71164 жыл бұрын
From what I got out of the talk, the difference between threads and async/await for existing codebases comes down to these two alternatives: - changing all the bits of code that could leave shared scopes or output in an inconsistent state if other tasks interrupt them, or - changing the bits that would ‘block’ other tasks by doing I/O or holding the CPU for so long that it feels like ‘it hangs’. The message repeated in the talk, then, is that the former is easier, since the changes just involve wrapping the access to shared state/effects with locks on some convenient level. In the async/await version, they would usually require diving all the way down the call graph and replacing the I/O call, or the entire library call it's hard-coded in. But isn't it much easier to iteratively _find_ idly waiting I/O calls and other things that cause noticeable slowdowns, than it is to find all places that touch references to the same sets of mutable object attributes until you feel safe that it's correct?
@DivineZeal5 жыл бұрын
I looked at this a few months ago as a python newbie...few months later this all makes sense and am excited to make the complete transfer to async with my future projects. lots of web app / automation ideas
@nelsonmacy10103 жыл бұрын
Great talk. Great teacher. Distills the lesson for good summary.
@mateuszsmendowski26772 жыл бұрын
Best explanation about differences and use cases!
@NeoAF105 жыл бұрын
This blew away my mind!
@stoneshou7 жыл бұрын
there must be a harder way!
@pallenda7 жыл бұрын
"so we can get paid for it" that made me laugh. :)
@astroblurf25134 жыл бұрын
What other convention speaker do you know who has their own catch phrase?
@vcool6 жыл бұрын
I find *multiprocessing.Barrier* and *threading.Barrier* useful because unlike .join(), these don't expect the process or thread to be terminated. Also, of course use a Queue instead if that'll conveniently do the job.
@mujkocka4 жыл бұрын
Hope to see you in Montreal again!
@armynyus91233 жыл бұрын
I still find it supersad that gevent does not get the awareness it deserves, imho. No other language offers the convenience of converting a syncronously written program, threaded or not, cooperatively async - with a single line of code, which patches *all* blocking ops into non blocking, taking care of all the callback handling behind the scenes. This is beautiful. Example: His test question at 34:45 - we had that, had to stop blocking on a telnet/ssh using threaded framework, partially 3rd party, partially from us, since number of comm. sockets increased into the 100ks - one import gevent + patch and that was it. No other change. Paradise, imho.
@alexl25124 ай бұрын
Happened to see this. I learned so much out of it.😮
@Billabongesta4 жыл бұрын
I learned something new!
@Seebergster5 жыл бұрын
Python is extremely popular in the gaming community . . just not for run time code :D It's used a TON for production pipelines and tool writing
@kw73982 жыл бұрын
"How can we make this hard, co we can be paid for it?" quote worth remembering
@ChristophZwerschke6 жыл бұрын
Nice talk. Only at 57:40 it was a bit confusing when you scrolled to the code using locks while still talking about queues.
@morthim3 жыл бұрын
"an electonical computer" woah mr fancy pants with his electricity.
@rewtnode7 жыл бұрын
Very interesting and instructive! Now it would be really great if we could actually get the code examples. The Dropbox link doesn't work.
@SFPython6 жыл бұрын
Dropbox changed public links. Moved to pybay.com/site_media/slides/raymond2017-keynote/index.html
@aoeu2564 жыл бұрын
Haha async / co-routines were used lots in the 1970s and 1980s. Its just that people forgot about them because the goto was removed from Python and Java, and C's longjmp was weird...
@yvrelna2 жыл бұрын
You don't need goto to do async/coroutines; and in fact, it wouldn't really help in implementing async/coroutines anyway. And goto wasn't "removed from Python", it never has goto.
@vuhuyngonguyen86186 жыл бұрын
Seem the slides was removed in dropbox , If any guy have links to download it ??
@Phoen1x8836 жыл бұрын
Link works now.
@fuanka17246 жыл бұрын
Very interesting talk, too bad asyncio was so lightly covered, very good nonetheless.
@danielschmider50694 жыл бұрын
I don't think it was lightly covered, 30% of a 1.25 hour video is still a lot more coverage than a 15 minute video talking exclusively about it. Obviously there's still more to explore
@Geza_Molnar_5 жыл бұрын
46:30 ...and it happend : airplane, automatic control of flight (plus non-disciplined / non-experienced devs (=cheap), conflict of interest in auditing and authorizing the new feature, etc.)
@FreedomIsNeverEverFree5 жыл бұрын
it hangs.. means 卡了?
@kavorka88554 жыл бұрын
multiprocessing has nothing to do with "cores", it has something to do with "context switching". With one core, you can have unlimited multiprocessors, only the memory limits this number. What's wonderful about Python is, you don't need to understand the concept, you don't need to be an IT engineer, you can still make programmes, it's the language of the layperson
@MrGarg10may6 жыл бұрын
The code part with fuzz all over doesn't have a race condition, due to GIL there will be the lock on the counter whenever any thread is trying to upgrade. The final value of the counter would always be the same. Race condition means final value changes may be because two threads read the same value while incrementing. If one wants to print Counter value sequentially as Raymond is trying to do, they can simply synchronize the function.
@chawza84023 жыл бұрын
where is the guy that share the timestamps?
@jacklong21823 жыл бұрын
thanks , is this editor vim or emacs
@pessimistic_optimism3 жыл бұрын
that reminded me of my faulty multithreaded code
@theavo5 жыл бұрын
Does anyone know how to create html files with keynotes just like the ones used by Raymond?
@amhokies5 жыл бұрын
I think it's generated using Sphinx Read The Docs Theme
@theavo5 жыл бұрын
@@amhokies thanks! :)
@ruslansmirnov90065 жыл бұрын
The interesting part starts somewhere around 45:00.
@joemeissler48766 жыл бұрын
Slides url isn't working any longer, fyi
@Phoen1x8836 жыл бұрын
Fixed.
@tiagodagostini4 жыл бұрын
I alwasy listen that fallacy that locks are expensive to acquire. A lock is effectively 1 single assembly instruction, test and set, on a modern CPU. There are other issues that are serious, but to say locks are expensive to acquire is simply wrong.
@yvrelna2 жыл бұрын
Test set and a loop when the test fails. Also, that test and set instruction is one of the most expensive assembly instruction, because it causes the CPU core to need to interrupt all the other CPU cores and synchronize to make sure that the none of the other cores are doing anything to the value and the test and set completes atomically. Which means that every time you do this, it slows down all the other cores, and it causes all sorts of effects to the CPU caches. Not a big issue when you have just 1 lock and acquire only occasionally, but if you start having fine grained locks everywhere, test-and-set are no longer cheap.
@kitsonamane17337 жыл бұрын
Slides link returns "File not found". Help !!!
@CrafterLuke6 жыл бұрын
someone killed the thread right as it was uploading :(
@kitsonamane17336 жыл бұрын
hahaha they must have encapsulated that thread in a daemon threadkiller because every time I try i it fails
@SFPython6 жыл бұрын
Dropbox public links died. Moved to pybay.com/site_media/slides/raymond2017-keynote/index.html
@kitsonamane17336 жыл бұрын
Thanks the link works fine now
@workflowinmind6 жыл бұрын
44:35
@vasiapatov45445 жыл бұрын
CAHACAHACAA
@ankile3 жыл бұрын
Seeing him cough now in corona times was surprisingly painful..
@louisdegeest3571 Жыл бұрын
Is there a worse way though?
@sarahpurkrabek24376 жыл бұрын
slides are a dead link
@thehighevolutionary71616 жыл бұрын
It's working now. pybay.com/site_media/slides/raymond2017-keynote/index.html
@sucim5 жыл бұрын
He looks rather like a protoype Siemens CEO than like a nerd :D
@peternau13463 жыл бұрын
Aber sein amerikanischer Akzent verrät ihn. (But his American accent gives him away.)
@armynyus91233 жыл бұрын
Good talk as always but think about it: All that doubling of python internals and skills requirements to learn async for reducing 20% CPU compared to Threads - and around 0% compared to gevent? In the beginning he said correctly that loading all local cores is anyway just a niche use case, a step before real distributed computing. So think about it: You really want to do all that to you, for 20% gain instead of rather architecting in distributed computing, when threads don't cut it? Or stick with greenlets and keep simple beautiful python code, which does distribution already, w/o you even care when handling sockets or IPCs? I rather stick with the latter.
@akunnaemeka3952 жыл бұрын
this guy is hilarious
@alenpaulvarghese3 жыл бұрын
01:11:17 Ahh my eyes.
@junumoon70223 жыл бұрын
There are those who believe that if you mix threading and forking that you are living in a state of sin and deserve whatever happens to you.
@danielschmider50694 жыл бұрын
Oh god the joke at 46:38 did not age well
@narnbrez4 жыл бұрын
could have been something he heard on the grapevine honestly
@donha4754 жыл бұрын
OH WOW! I did not know that if you fail to acquire a lock then you can screw the program! scary!
@Mr1995Musicman4 жыл бұрын
To be somewhat pedantic: Failing to acquire the lock is only the symptom (called deadlock), it is the failure to *release* a lock that is the root cause that will screw everything up.
@yankeenobonagu64113 жыл бұрын
hahahha im an unreasonable person
@lucccar2 жыл бұрын
I don't know if I'm just not getting something or the video just didn't age well... but his arguments against threading don't seem correct. Threading has been done for a looooong time. It may causes bugs? Yes, but normal code may too. Testing will never cover all bugs indeed (as he says about the race conditions) but this is true to normal non-threading code too! So should we abandon code at all because of the possibility of messing up???? One of his points in 16:00 is that if threading doesn't have a race condition then you probably wouldn't need threads at all... This is so wrong! Any experienced back-end developer already came up with situations were he needed to implement a lock to avoid a race condition and situations were this simply isn't needed (eg, if I need to populate an object were each part of the object doesn't depend on the others and the order of insertion doesn't matter then multi-threading is absolutely safe! In a game, for example, the rendering of trees is independent of the rendering of animals or other characters, if you used to play MMOs more than 15 years ago with slow PC's and internet connection you know what i'm talking about). Furthermore many new languages have found ways to share state (with the programmer being in charge of the security of memory and data) between "threads". Golang has goroutines, Rust has its thread and scope system, Erlang has its processes inside the JVM, even modern C++ had found a way to make the code easier to detect race conditions although about this one I've only heard of. For what I know many languages have found ways to deal with the threads problem in safer and lighter ways, this panic is unnecessary.
@rednafi4 жыл бұрын
Excellent talk but there was a lot of time spent on fucking and unfucking up threading and a not a whole lot of asyncio.
@RagHelen6 жыл бұрын
If you marry nine wifes, you can have a baby every month.
@AbhishekThakur-wl1pl4 жыл бұрын
or have all babies at the same month asynchronously.
@HanZhang19943 жыл бұрын
Username checks out.
@HypercubeSoftwares3 жыл бұрын
Totally misleading in the way he puts things in perspective. Not a single word on I/O. Confuse Threading and being Statefull. I am outraged.
@junumoon70223 жыл бұрын
Unreasonable people invent their own programming languages. And all programmers depend on the unreasonable people.
@veruxfps55952 жыл бұрын
python == noob;
@peeedurr5 жыл бұрын
His "who learned something new" is annoying, as is quite a bit of his style imho.
@JeremyAndersonBoise5 жыл бұрын
Peet Morris but did you learn something? Not everyone’s style, but he is a wonderful teacher and software developer.
@aftalavera3 жыл бұрын
Let’s talk annoying! Your mask?
@SusanAmberBruce5 жыл бұрын
So boring
@nickolasnielson47273 жыл бұрын
He looks rather like a protoype Siemens CEO than like a nerd :D