शैडोइंग अभ्यास: Mind-bending new programming language for GPUs just dropped... - वीडियो के साथ अंग्रेजी बोलना सीखें

अभ्यास मोड चुनें

हर मोड पूरी स्क्रीन का अभ्यास कक्ष खोलता है।

60 वाक्य
यदि वाक्य बहुत छोटे या लंबे हों, तो समायोजित करने के लिए Edit पर क्लिक करें।
1
Yesterday, the clouds opened up, and a weird new programming language came down to Earth, with a promise of parallelism for all thou who writeth code.
2
This is big if true, because parallel computing is a superpower.
3
It allows a programmer to take a problem that could be solved in a week, and instead solve it in seven days using seven different computers.
4
Unfortunately, running code in parallel is like conducting a symphony.
5
One wrong note, and the entire thing becomes a total disaster.
6
But luckily, Bend offers hope by making a bold promise.
7
Everything that can run in parallel, will run in parallel.
8
You don't need to know anything about CUDA, blocks, locks, mutexes, or regexes to write algorithms that take advantage of all 24 of your CPU cores,
9
or even all 16 ,000 of your GPU cores.
10
You just write some high -level
11
Python -looking code, and the rest is magic.
12
It is May 17th, 2024, and you're watching the Code Report.
13
When you write code in a language like
14
Python, your code runs on a single thread.
15
That means only one thing can happen at a time.
16
It's like going to a KFC with only one employee who takes the order, cleans the toilets, and cooks the food in that order.
17
Now, on a modern CPU, you might have a clock cycle around 4 gigahertz, and if it's handling one instruction per cycle,
18
you're only able to perform 4 billion instructions per second.
19
Now, if 4 Gips is not enough, you can modify your Python code to take advantage of multiple threads,
20
but it adds a lot of complexity to your code.
21
And there's all kinds of gotchas, like race conditions, deadlocks, thread starvation, and may even lead to conflicts with demons.
22
Even if you do manage to get it working, you might find that your CPU just doesn't have enough juice at
23
which point you look into using the thousands of CUDA cores on your GPU.
24
But now you'll need to write some C++ code and likely blow your leg off in the process.
25
Well, what if there is a language that just knew how to run things in parallel by default?
26
That's the promise of Bend.
27
Imagine we have a computation that adds two completely random numbers together.
28
In Python, the interpreter is going to convert this into bytecode, and then eventually run it on the Python virtual machine.
29
Pretty simple, but in Bend, things are a little more complex.
30
The elements of the computation are structured into a graph, which are called interaction combinators.
31
You can think of it as a big network of all the computations that need to be done.
32
When two nodes run into each other, the computation progresses by following a simple set of rules
33
that rewrite the computation in a way that can be done in parallel.
34
It continues this pattern until all computations are done, then merges the result back into whatever expression was returned from the function.
35
This concept of interaction combinators goes all the way back to the 1990s, and is implemented in a runtime called the higher -order virtual machine.
36
HVM is not meant to be used directly, and that's why they built
37
Bend, a high -level language, to interface with it.
38
And the language itself is implemented in Rust.
39
Its syntax is very similar to Python, and we can write a hello world by defining a main function that returns a string.
40
Now to execute this code, we can pull up the terminal and use the ben run command.
41
By default, this is going to use the Rust interpreter, which will execute it sequentially, just like any other boring language.
42
But now here's where things get interesting.
43
Imagine we have an algorithm that needs to count a bunch of numbers and then add them together.
44
The first thing that might blow your mind is that bend does not have loops.
45
Like, we can't just do a for loop like we would in Python.
46
Instead, bend has something entirely different called a fold that works like a search and replace for data types.
47
And any algorithm that requires a loop can be replaced with a fold.
48
Basically, a fold allows you to consume recursive data types in parallel, like a list or a tree.
49
But first, we need to construct a recursive data type.
50
And for that, we have the bend keyword, which is like the opposite of fold.
51
Now, if that's a little too mind -bending, maybe check out my back catalog for recursion in 100 seconds.
52
But now let's see what this looks like from a performance standpoint.
53
When I try to run this algorithm on a single thread, it takes forever, like 10 minutes or more.
54
However, I can run the same code without any modification whatsoever with the bend run C command.
55
When I do that, it's now utilizing all 24 threads on my CPU.
56
And now it only takes about 30 seconds to run the computation.
57
That's a huge improvement, but I think we can still do better.
58
Because I'm a baller, I have an NVIDIA RTX 4090, and once again, I can run this code without any modification on CUDA with bendrun -cu.
59
And now this code only takes one and a half seconds to run, and I'll just go ahead and drop the mic right there.
60
This has been the Code Report, thanks for watching, and I will see you in the next one.

ऐप डाउनलोड करें

धाराप्रवाह बोलने के लिए ज़रूरी सब कुछ

AI उच्चारण स्कोरहर वाक्य का स्कोर
IPA अभ्यासहर ध्वनि में महारत
शब्दावलीअपना शब्द भंडार बनाएँ
शब्द गेमखेलते हुए सीखें
QR स्कैन करें
QR स्कैन करें

उसी चैनल से

FOR YOU

अनुशंसित वीडियो

इस पाठ की शब्दावली और बोलने के सुझाव

यह स्पीकिंग पाठ वीडियो “Mind-bending new programming language for GPUs just dropped..” पर आधारित है। सबसे ज़्यादा दोहराए गए शब्द ये हैं: code, bend, computation, Python, parallel। इस वीडियो में शैडोइंग के लिए 60 वाक्य और 904 शब्द हैं। बोला गया हिस्सा 4:00 लंबा है। वक्ता तेज़ बोलता है, लगभग 226 शब्द प्रति मिनट, इसलिए जुड़ी हुई और कमज़ोर ध्वनियाँ ज़्यादा मिलेंगी। केवल 77% शब्द अंग्रेज़ी के 3,000 सबसे आम शब्दों में से हैं, इसलिए शब्दावली कठिन है।

इस वीडियो की मुख्य शब्दावली

वीडियो के 15 सीखने लायक शब्द, उच्चारण और अर्थ के साथ:

शब्दउच्चारणअर्थ
bend क्रिया/bɛnd/झुकाव, प्रवृत्ति
parallel विशेषण/ˈpæ.ɹəˌlɛl/समानान्तर
thread संज्ञा/ˈθɹɛd/धागा, सूत
fold क्रिया/ˈfəʊld/परत
algorithm संज्ञा/ˈælɡəɹɪðm̩/अल्गोरिद्म
loop संज्ञा/luːp/कुंडली
solve क्रिया/sɒlv/सुलझाना, हल करना
default संज्ञा/dɪˈfɔlt/व्यतिक्रम
instruction संज्ञा/ɪnˈstɹʌkʃən/उपदेश, शिक्षण
cloud संज्ञा/ˈklaʊ̯d/मेघ, बादल
element संज्ञा/ˈɛləmənt/तत्त्व
string संज्ञा/stɹɪŋ/तार, रस्सी
disaster संज्ञा/dɪˈzɑːs.təː/आपदा, तबाही
juice संज्ञा/d͡ʒuːs/रस, जूस
bold विशेषण/ˈbəʊld/साहसी, निडर

वीडियो में आने वाली फ़्रेज़ल वर्ब

शब्दउच्चारणअर्थ
go ahead क्रिया/ˌɡoʊ əˈhɛd/आगे बढ़ना

इस वीडियो का व्याकरण

वक्ता जिन संरचनाओं का सबसे अधिक प्रयोग करता है, वीडियो के असली शब्दों के साथ:

संरचनावीडियो में
Passive voice be + past participle — ज़ोर इस पर कि क्या होता है, न कि कौन करता हैcould be solved · are structured · be done
Relative clauses who / which + उपवाक्य — व्यक्ति या वस्तु के बारे में अतिरिक्त जानकारीgraph, which are · interpreter, which will · keyword, which is

ध्यान देने योग्य उच्चारण

वक्ता 8 बार संक्षिप्त रूपों का प्रयोग करता है, जैसे you're, can't, doesn't। इन्हें वैसे ही छोटा बोलें जैसा आप सुनते हैं।

  • “th” की ध्वनियाँ: thread /ˈθɹɛd/, algorithm /ˈælɡəɹɪðm̩/
  • “sh” और “zh” की ध्वनियाँ: interaction /ˌɪn.təˈɹæk.ʃən/, instruction /ɪnˈstɹʌkʃən/, modification /ˌmɑdɪfɪˈkeɪʃən/, starvation /stɑɹˈveɪʃən/, computation /ˌkɑmpjʊˈteɪʃn̩/
  • लंबे शब्द — बलाघात सही रखें: interaction /ˌɪn.təˈɹæk.ʃən/, modification /ˌmɑdɪfɪˈkeɪʃən/, interpreter /ɪnˈtɝ.pɹɪ.tɚ/, complexity /kəmˈplɛk.sɪ.ti/, whatsoever /ˌ(h)wʌtsoʊˈɛvɚ/

हिंदी भाषियों के लिए मुश्किल ध्वनियाँ:

  • /v/ और /w/ का फ़र्क़ — /v/ में ऊपर के दाँत निचले होंठ को छूते हैं, /w/ में होंठ गोल होते हैं: solve /sɒlv/, virtual /ˈvɜɹt͡ʃuəl/, convert /kənˈvɝt/, whatsoever /ˌ(h)wʌtsoʊˈɛvɚ/, starvation /stɑɹˈveɪʃən/
  • /z/ — इसे “ज” (/dʒ/) न बनाएँ: disaster /dɪˈzɑːs.təː/, utilize /ˈjuː.tɪ.laɪz/, parallelism /ˈpaɹəlɛlɪz(ə)m/
  • शब्द की शुरुआत में s + व्यंजन — पहले “इ” न जोड़ें: string /stɹɪŋ/, standpoint /ˈstændpɔɪnt/, starvation /stɑɹˈveɪʃən/

इस वीडियो से अभ्यास कैसे करें

  1. पहले बिना बोले पूरा वीडियो एक बार सुनें और जो शब्द नहीं आते उन्हें लिख लें।
  2. 0.75× गति से शुरू करें, एक-एक वाक्य की शैडोइंग करें, और सहज लगने पर सामान्य गति पर लौटें।
  3. अपनी आवाज़ रिकॉर्ड करें और मूल से तुलना करें, ख़ासकर bend, parallel, thread जैसे शब्दों पर ध्यान दें।

शैडोइंग तकनीक क्या है?

शैडोइंग (Shadowing) एक विज्ञान-समर्थित भाषा सीखने की तकनीक है जो मूल रूप से पेशेवर दुभाषिया प्रशिक्षण के लिए विकसित की गई थी। विधि सरल लेकिन शक्तिशाली है: आप मूल अंग्रेज़ी ऑडियो सुनते हैं और तुरंत इसे ज़ोर से दोहराते हैं — जैसे वक्ता की छाया 1-2 सेकंड की देरी से। शोध से पता चलता है कि यह उच्चारण सटीकता, स्वर, लय, जुड़ी हुई ध्वनियाँ, सुनने की समझ और बोलने की प्रवाहशीलता में काफ़ी सुधार करता है।

शैडोइंग तकनीक: पूरी चरण-दर-चरण गाइड पढ़ें →