Porting Compilers - Computerphile

  Рет қаралды 35,559

Computerphile

Computerphile

4 жыл бұрын

Concluding his series on compilers and porting, Professor Brailsford takes the plunge and "T-Diagrams" his way over to a new machine.
Previous Video: • Improving Intermediate...
/ computerphile
/ computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: bit.ly/nottscomputer
Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com

Пікірлер: 61
@xJackkHD
@xJackkHD 4 жыл бұрын
I love Brailsford, he’s like the Attenborough of computers. More! More! More Computerphile!
@danielbakergill
@danielbakergill 4 жыл бұрын
"The pope hasn't even written a compiler." -Terry A. Davis
@longlostwraith5106
@longlostwraith5106 4 жыл бұрын
Wiser words were never spoken. All praise God's chosen programmer!
@Gooberpatrol66
@Gooberpatrol66 4 жыл бұрын
St. IGNUcius has written a compiler.
@marsgal42
@marsgal42 4 жыл бұрын
I maintain several legacy applications that run on embedded 68k systems. The code is written in C and we use an antiquated (1994) compiler that runs on Solaris. I've built a gcc 68k cross-compiler on Linux with interesting results, but haven't convinced my boss to pursue it further. The boxes in question have ADSP-2181s in them as well, programmed in assembler.
@davids5a2
@davids5a2 4 жыл бұрын
What is the field of these legacy applications?
@longlostwraith5106
@longlostwraith5106 4 жыл бұрын
Oh, wow. Old factory equipment perhaps?
@marsgal42
@marsgal42 4 жыл бұрын
Paging systems. Yes, they still exist. :-)
@javabeanz8549
@javabeanz8549 4 жыл бұрын
@@marsgal42 still much cheaper and more reliable for places like hospitals, from what I understand.
@marsgal42
@marsgal42 4 жыл бұрын
Our target market is first responders, including hospitals. A niche product in 2019, but a good niche product has always been a license to print money. :-)
@odpJatoUnitRecs
@odpJatoUnitRecs 4 жыл бұрын
Brailsford seriously need to record some audiobooks. C for dummies, or Harry Potter would be a start ♥️
@hydrochloricacid2146
@hydrochloricacid2146 4 жыл бұрын
definitely
@casperes0912
@casperes0912 4 жыл бұрын
Very different genres, but both could work very well. I'd like the Harry Potter one the most as I don't need the C one, plus I don't think technical books work so well in audio form compared to written
@odpJatoUnitRecs
@odpJatoUnitRecs 4 жыл бұрын
This guy would make it work. Trust
@Gooberpatrol66
@Gooberpatrol66 4 жыл бұрын
He should launch a tv show for kids teaching them computer science
@esbenablack
@esbenablack 4 жыл бұрын
This is a wonderful series! It really takes me back to my compiler course, but in a good way.
@Kirillissimus
@Kirillissimus 4 жыл бұрын
The thing to remember is that the trick relies on the assumption that high level code designed for one machine can be directly compiled on another one. Generally it is not the case because of different incompatiable environments and hardware features available on different platforms. So in practice porting tends to get a bit more complex and messy than described here.
@TonyAlloa
@TonyAlloa 4 жыл бұрын
Absolutely fascinating. Thank you very much.
@coffeedude
@coffeedude 4 жыл бұрын
It'd be nice to have the previous video linked!
@Computerphile
@Computerphile 4 жыл бұрын
Done - and for good measure: kzbin.info/www/bejne/ipqtn2x6a9GNY7s >Sean
@KryptKicker5
@KryptKicker5 4 жыл бұрын
So we’re porting the assembler one step at a time right? Write the assembler for new computer as B’ outputting B’’ then feed it the assembler code, which gives us a B’’ which is then fed everything else?
@rikwisselink-bijker
@rikwisselink-bijker 4 жыл бұрын
Every video I become more convinced that C has taken on the role of uncol or intermediary code.
@allenjunge4127
@allenjunge4127 4 жыл бұрын
Not quite. C is kind of like the standard language to create other languages and stuff. The real universal intermediate language is C's intermediary, LLVM.
@v4lgrind
@v4lgrind 4 жыл бұрын
@@allenjunge4127 LLVM is a compiler, it has an IR, as does gcc, and most other compilers. The IRs are not the same.
@kuhluhOG
@kuhluhOG 4 жыл бұрын
@@allenjunge4127 LLVM isn't the intermediate for every C compiler; the GNU Compiler Collection for example uses RTL
@mavhunter8753
@mavhunter8753 4 жыл бұрын
@@v4lgrind LLVM itself isn't a compiler, Clang is. LLVM is more so a framework for compilers.
@KuraIthys
@KuraIthys 4 жыл бұрын
It's not surprising given what C was intended for, and what it commonly gets used for. C is the language of Unix, originally. But you can see that the majority of operating systems (aside from those written wholly or partly in assembly for various reasons) were written in C (maybe C++) Most of the Api's related to those operating systems were also written in C, and most high performance applications (again, aside from ones written in Assembly) tended to be written in C or C++ as well. Linux, like most unix-likes is mostly built on C, and even has C-like shell scripting languages. Windows has diversified over time due to Microsoft's .net system... But you'll still find the standard Api's are written with the assumption that C/C++ is in use, and access to these api's through other methods typically results from a wrapper that was written in C/C++ The DDK (driver development kit) tends to discourage the use of C++, but it does mostly use C... Whether this is due to something specific about the language (perhaps it's relatively low level, high performance features, that closely approximate assembly while being slightly easier to work with and vastly more portable), or just a quirk of history... Who can say. But yes, C is a pretty central language to many things, and quite a few other languages have been implemented in C, rely on C for supporting functionality, or similar. (python is written in C/C++ and can interface with modules written in C. Java similarly largely depends on modules written in C/C++ for access to hardware features it doesn't natively support, such as advanced graphics handling...)
@bluppfisk
@bluppfisk 4 жыл бұрын
Could you do a video on finding the Horadric Staff?
@RhinoBlindado
@RhinoBlindado 4 жыл бұрын
I would love if you guys could make a video on Hoares Triples! If any viewer knows if they already have touched the topic, please let me know.
@C4rb0neum
@C4rb0neum 4 жыл бұрын
Agreed. The more formal the more better!
@ad_sh8240
@ad_sh8240 4 жыл бұрын
Great Video
@SpoopyGamer
@SpoopyGamer 4 жыл бұрын
9:30 , Chillin in the corridor?
@Diligent3294
@Diligent3294 4 жыл бұрын
YAY! We finally did it!!
@Roomsaver
@Roomsaver 4 жыл бұрын
@MichaelKingsfordGray Ok, boomer
@FrankHarwald
@FrankHarwald 4 жыл бұрын
The Rubik's Cube in the background is finally solved - OCD-plagued can finally get some reilef. :)
@vtbn53
@vtbn53 4 жыл бұрын
...and here I was thinking all you needed was a new back end, I'll have to recall all of my ports now.
@ImmortalDuke
@ImmortalDuke 4 жыл бұрын
Compiling...
@AgentM124
@AgentM124 4 жыл бұрын
I tried writing a compiler. I regret it. I started over and made a simple desugarer to desugar to a known language so it can be compiled.
@eclipse-xl4ze
@eclipse-xl4ze 4 жыл бұрын
do more videos about AI please!
@geinko
@geinko 4 жыл бұрын
More on compilers u mean?
@M-Wulff
@M-Wulff 4 жыл бұрын
Can we please get a comment from some of the old boys on what is going on with webassembly with system integration (WASI) and how it let us run any code on any machine. Like: what would technology like this have meant for their profissional life if this was available when they started programming.
3 жыл бұрын
Why? Webassembly tries to do exactly the same thing as Java, and they already mentioned Java and Java bytecode (as a type of intermediate code). Of course, WA has an advantage over Java in that unlike Java, there's not some big company trying to control how people use it and suing people that do things they don't like, which has limited Java's usefulness as a universal platform, but that's not a technical issue.
@krasimirrangelov1767
@krasimirrangelov1767 4 жыл бұрын
Brailsford looks older than before.
@Halolaloo
@Halolaloo 4 жыл бұрын
i think it is the lighting, in his other videos he was filme with the liight shining through the window behind
@quiet5811
@quiet5811 4 жыл бұрын
Teddy😺
@bopDS
@bopDS 4 жыл бұрын
this tude has the same chair as me lloool :D
@w3sp
@w3sp 4 жыл бұрын
First Kappa
@donmelaraya2218
@donmelaraya2218 4 жыл бұрын
Second!
@lilcatfriend4575
@lilcatfriend4575 4 жыл бұрын
Pie!
@longlostwraith5106
@longlostwraith5106 4 жыл бұрын
First Delta
@Hofer2304
@Hofer2304 4 жыл бұрын
Couldn't the compiler be simpler if the editor checked and signed the code? If the editor is trustworthy, the compiler wouldn't need to check the syntax. The editor could even be much more restrictive than a standard compiler for this language. If the editor could do the type checking, it should do it.
@nosuchthing8
@nosuchthing8 4 жыл бұрын
Somethings only compile at run time though.
@Hofer2304
@Hofer2304 4 жыл бұрын
@@nosuchthing8 Every piece of code should be checked, and signed if it passes the test, and only signed pieces of code should be compiled. If the programm should read keyboard inputs, they should be checked before the program sees the correct inputs. Every input should be checked before the programm sees it and accepts the signed inputs.
@nosuchthing8
@nosuchthing8 4 жыл бұрын
@@Hofer2304 I admit to being a user of compilers. I don't know enough to comment on your proposal.
3 жыл бұрын
Prechecking would hardly help at all. Syntax or type checking isn't something a compiler does separately just to verify correctness. The compiler needs to make sense of the syntax and types in a program in order to create a correct program, it can't just choose not do it. Errors appear if the compiler can't make sense of it, thus, the error checking is pretty much free. Or at least the easiest part of it. Besides, such checks are done in the frontend (the H to I part), not in the backend part (the I to B part) this video focuses on. That's one of the advantages of the two-stage process he discussed: if don't need to rewrite the frontend, you don't need to reimplement the error checking.
The UNCOL Problem - Computerphile
11:42
Computerphile
Рет қаралды 78 М.
Bootstrapping with T-Diagrams - Computerphile
15:49
Computerphile
Рет қаралды 164 М.
СҰЛТАН СҮЛЕЙМАНДАР | bayGUYS
24:46
bayGUYS
Рет қаралды 717 М.
Glow Stick Secret 😱 #shorts
00:37
Mr DegrEE
Рет қаралды 144 МЛН
Why? 😭 #shorts by Leisi Crazy
00:16
Leisi Crazy
Рет қаралды 46 МЛН
Self Compiling Compilers - Computerphile
12:56
Computerphile
Рет қаралды 157 М.
RegEx Roman Numerals - Computerphile
17:14
Computerphile
Рет қаралды 85 М.
'Accidental' CrossCompiler - Computerphile
15:13
Computerphile
Рет қаралды 109 М.
Light sucking flames look like magic
18:05
Steve Mould
Рет қаралды 1,4 МЛН
Why don't they teach Newton's calculus of 'What comes next?'
47:10
Corn: Last Week Tonight with John Oliver (HBO)
24:54
LastWeekTonight
Рет қаралды 2,8 МЛН
Parsing Explained - Computerphile
14:58
Computerphile
Рет қаралды 237 М.
Functional Parsing - Computerphile
22:46
Computerphile
Рет қаралды 133 М.
СҰЛТАН СҮЛЕЙМАНДАР | bayGUYS
24:46
bayGUYS
Рет қаралды 717 М.