Angle Brackets - Computerphile

  Рет қаралды 172,188

Computerphile

Computerphile

Күн бұрын

Пікірлер: 152
@stensoft
@stensoft 8 жыл бұрын
is valid HTML, not just accepted. HTML is not XML, it's SGML and that allows tags that don't need terminating slash. But because of that you need to know what each tag means (whether it requires termination or not) to process them, and that's why XML with mandatory terminating slashes (and strict tree-like structure;) was introduced so you can easily process documents without actually knowing what's inside them, however XHTML that uses it never really caught on web pages. For anyone who deals with web pages processing, it's a pity.
@viora_
@viora_ 8 жыл бұрын
XHTML would have caught on if it was an official recommendation for HTML5. Really a shame it didn't.
@ihnwtpu
@ihnwtpu 8 жыл бұрын
+Jan Sten Adámek In my experience with HTML sometimes it actually doesn't like when you put a slash at the end. For example, doesn't work but does.
@SolarShado
@SolarShado 8 жыл бұрын
+Samuel Lakatoš I'm pretty sure tags aren't allowed to be 'self-closing' like that, even though (as I'm sure you know) they often don't wrap any content. It's definitely an odd quirk, though I suspect there's a reason for it.
@rich1051414
@rich1051414 8 жыл бұрын
+Jan Sten Adámek I thought technically is the same as . When is it right to do one, and not the other?
@TheFerdi265
@TheFerdi265 8 жыл бұрын
+Richard Smith AFAIK, in XML, and are equivalent. In HTML, does not even exist IIRC
@liquidminds
@liquidminds 8 жыл бұрын
So weird. So many forgotten memories from first semesters at university... Just heard the name backus and immediately backus-naur form sprung into my mind. Thx for pulling all those memories back out of my head. I appreciate it. It's like time-travel :-)
@paulsaulpaul
@paulsaulpaul Жыл бұрын
This guy needs his own video series. He's like the Professor on the Periodic Videos channel.
@manamimnm
@manamimnm 8 жыл бұрын
It is nice to see how we got to what we have today through the time!
@Jacob011
@Jacob011 8 жыл бұрын
This prof. can make anything interesting. Man in his place.
@IceMetalPunk
@IceMetalPunk 8 жыл бұрын
Recently, a KZbinr named SethBling created a working lexer, parser, and interpreter for the BASIC programming language, all within Minecraft. That kind of programming-language-inside-a-program could be an extremely interesting topic for a future Computerphile video! (Plus, it gets us Minecraft fans hyped :P )
@slendy9600
@slendy9600 8 жыл бұрын
i was watching one of Sethblings streams when he teased a video that would soon release which he called his "magnum opus", and that was it :D... its amazing what that guy can do
@yash1152
@yash1152 2 жыл бұрын
> _"That kind of programming-language-inside-a-program could be an extremely interesting topic"_ * yeah, lol. more like "hidden logical structures in programs" * includes those inside powerpoint, or ms word, Conway's game of life, as well - there have been videos on those already. * and if u move beyond programs, then logic can be implemented in all sorts things - with dominoes, with water siphons, with chemicals (dna), with electric circuits, and so on, and so forth....
@StasPakhomov-wj1nn
@StasPakhomov-wj1nn Жыл бұрын
having the last line of the video be "where things finish" was a nice touch ;)
@dark_nation_7
@dark_nation_7 8 жыл бұрын
I actually started writing a lexer for a language using utilizing YACC and BNF. Would love to see an episode discussing that!
@commentsforonce7088
@commentsforonce7088 8 жыл бұрын
04:07 for some reason I can only think of "SGML" screaming; "This is not even my final form! "
@trailkeeper
@trailkeeper 8 жыл бұрын
Maybe a good way to think of all this is as: and
@MedEighty
@MedEighty 8 жыл бұрын
I love the Backus-Naur form.
@shanewakeling6698
@shanewakeling6698 8 жыл бұрын
Gotta love Professor Brailsford, hes vids are excellent
@JL-dz8sj
@JL-dz8sj 8 жыл бұрын
John backers was one of the big investors of 4chan?
@Computerphile
@Computerphile 8 жыл бұрын
John Backus, FORTRAN
@androumac1169
@androumac1169 8 жыл бұрын
Kahn Worfers, 4TrekTNG. GG myself, I think I've created a possible meme. i am dah mem loord nao. c: gg no re m80s
@androumac1169
@androumac1169 8 жыл бұрын
I was actually trying to type Jahn for John, but iOS' autocorrect made it Kahn, so I went: "Screw it, I'll stick with this now since this actually gave me an idea.", and I basically made that reply.
@Xclann
@Xclann 8 жыл бұрын
Will be interesting if this series were to evolve into a talk on designing and implementing compilers.
@hellterminator
@hellterminator 8 жыл бұрын
That is *far* beyond the scope of this channel.
@billg4747
@billg4747 2 жыл бұрын
I love that Prof. Brailsford is using line printer paper as a scratchpad.
@brianmiller1077
@brianmiller1077 Жыл бұрын
It's an adaptation of Numberphile's brown paper that gets written on.
@tomlee7073
@tomlee7073 8 жыл бұрын
I love the way he sings "...and you see things like, pointer bracket, 'P', pointer bracket!" at 4:41 :)
@Cyndaquazy
@Cyndaquazy 8 жыл бұрын
I had a class on compilers a couple semesters back. I was eating, sleeping, drinking BNF!
@josephgaviota
@josephgaviota 3 жыл бұрын
BNF, sounds like a railroad to me.
@realraven2000
@realraven2000 8 жыл бұрын
Can you do one about the history of the => arrow operator, and how it can now be used in ECMAscript? That would be awesome.
@wobblycogsyt
@wobblycogsyt 8 жыл бұрын
They both use angle brackets but to claim BNF was the forerunner is going a bit far as they are fundamentally different tools. I'm sure the SGML / XML designers saw the notation in BNF , liked it, and decided to produce something that looked similar but that doesn't mean BNF is a direct ancestor of XML. BNF is much more like a DTD (or XML Schema) in that it defines what can be written not what is written.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 6 жыл бұрын
I think so, too. The resemblance is more superficial than deep. And BNF is a more powerful notation than DTDs. DTDs are not very useful with XML anyway.
@rich1051414
@rich1051414 8 жыл бұрын
Although the computer languages which are easiest to read are great when working on code with others, i do love the faster styles when doing something on your own and time is of the essense. Java is a language which is quite easy to read, but it does have shortcut styles available as well if you want them like: boolean flag = (i < 10 ? false : (i < 20 ? true : false)); Which is the same as: boolean flag; if(i < 10 || i >= 20){ flag = false; }else { flag = true; } The first is much quicker, but the second is easier to read. Dunno why I got off on this tangent, it just reminds me of the ever present debate of ease of coding vs ease of reading.
@harrisonharris6988
@harrisonharris6988 8 жыл бұрын
simple solution: make a smarter compiler to make it efficient as it compiles.
@realraven2000
@realraven2000 8 жыл бұрын
+Richard Smith These trinaries are slightly dangerous as they have a low priority and you should use parentheses if you ever plan to nest them. You can have lots of unexpected side effects when you use them in conjunction with string concatenation. Consider this Javascript let msg = isEncrypted ? getStringBundle('warning.encrypted') : 'using Account: ' + account ? account.key : '0' + ' ' + ' identityName = ' + id ? id.identityName : 'empty'; always put parentheses around the three operands to make sure it works correctly. let msg = isEncrypted ? getStringBundle('warning.encrypted') : ( 'using Account: ' + account ? account.key : '0') + ' ' + (' identityName = ' + id ? id.identityName : 'empty'); otherwise you can get very weird unexpected results
@HaroldSalaila
@HaroldSalaila 8 жыл бұрын
+Richard Smith Just note that it is also possible to write that expression as: boolean flag = !(i < 10 || i >= 20); which in my opinion is far more readable than the options you provided.
@rich1051414
@rich1051414 8 жыл бұрын
Harold Salaila yes i know that. I was giving an example of inline coding style. Perhaps in hindsight using a boolean for the example was going to lead to such corrections.
@rich1051414
@rich1051414 8 жыл бұрын
+Realraven2000 You are right, i corrected it.
@bernardobuffa2391
@bernardobuffa2391 8 жыл бұрын
hi. could you do a bit of history of object orientation in programming? Thanks for the videos, I don't miss one, they are all so interesting
@Obtaineudaimonia
@Obtaineudaimonia 8 жыл бұрын
I didn't think it was possible for Chomsky to go up in my estimation any further... but he has.
@jamesgrimwood1285
@jamesgrimwood1285 8 жыл бұрын
Oh god, I'm having flashbacks to the formal language part of my degree, and the terror of trying to make Lexx & Yacc behave.
@AdamCradamParkes
@AdamCradamParkes 8 жыл бұрын
also, ::= is translatable into various human languages, i.e. ::= whereas S -> LT is gibberish in any language
@yash1152
@yash1152 2 жыл бұрын
Coming from "Parsing Explained - Computerphile" @ 1:29 Please optimise the description of this video for SEO - put some more search terms in it like BNF, grammer, backus naur, formal language, etc.
@JaccovanSchaik
@JaccovanSchaik 8 жыл бұрын
Will there be an episode about lex and yacc sometime in the future? This seems like a natural extension to this one, and also to the earlier episode about state machines.
@DuncanEllis
@DuncanEllis 8 жыл бұрын
+Jacco van Schaik that was exactly my thought - input to parser generators is usually based on BNF.
@fobusas
@fobusas 8 жыл бұрын
+Duncan Ellis (Dunx) I'm reading a book about compiler design, so this is really topical :)
@DuncanEllis
@DuncanEllis 8 жыл бұрын
Vaidas Šukauskas wait until you have to implement a domain-specific language in JavaCC!
@lawrencedoliveiro9104
@lawrencedoliveiro9104 6 жыл бұрын
After many years’ experience, most of us have come to the conclusion that lex/flex and yacc/bison are not really worth using. Yes, you can generate automatic parsers for full LR(k) grammars, but we usually find we can get by just fine with LL(1) grammars, which can be handled quite easily with recursive-descent parsers. And hand-coding parsers and lexers makes them faster anyway.
@brotherandy
@brotherandy 5 жыл бұрын
There is now!
@nekture
@nekture 8 жыл бұрын
Oh wow. I never knew Chomsky had a history in computer science.
@Tupster
@Tupster 8 жыл бұрын
it was weird for me to find out later that Chomsky was more than a contributor to CS
@TheVladBlog
@TheVladBlog 8 жыл бұрын
+Jason Wilkins Chomsky is life in the majority of applied artificial intelligence.
@nekture
@nekture 8 жыл бұрын
I only knew him for his political activity.
@sergioavila2720
@sergioavila2720 8 жыл бұрын
are you in the field of computer science?
@nekture
@nekture 8 жыл бұрын
No, I am not.
@b2gills
@b2gills 8 жыл бұрын
The part where he said that it doesn't appear in the language, doesn't apply to Perl 6. That is almost literally valid code in Perl 6, both in the grammar sub-language (similar in appearance to BNF, but more powerful), and in the language as a whole.
@CarterColeisInfamous
@CarterColeisInfamous 8 жыл бұрын
5:20 the doctype of the html can dictate the way its parsed by the browser and if the tag may be omitted
@lawrencedoliveiro9104
@lawrencedoliveiro9104 6 жыл бұрын
2:23 I think an early draft of ALGOL-68 very nearly violated that tradition by introducing “::=” as a syntactic symbol. Thankfully this was changed later.
@skit555
@skit555 8 жыл бұрын
So... There is a link between BNF and XML? Luv it :3
@Nevhision2
@Nevhision2 8 жыл бұрын
RIP Peter Naur
@berndeckenfels
@berndeckenfels Жыл бұрын
Next up, roff notation for manpages (which in turn use metastatic variables in ankle brackets and cursive ,)
@originalmianos
@originalmianos 8 жыл бұрын
He thinks "someone saw BNF and used it for SGML" is just hearsay without referring to the original authors of SGML. Interestingly people have tended to move to double braces for templating these days because they occur much less regularly in normal text, making them, although ever so slightly more verbose, more practical as you almost never need to escape them.
@Hunnter2k3
@Hunnter2k3 8 жыл бұрын
+Rob Fowler One character I have a love of using since it pretty much never shows up in text, never mind combined with anything else: ¬ Look at it. Wonderful character. I forgot the name. Oh, negation. Bonus character: ¦ Broken bar is nice, but can be confusing if reading it. Easy to confuse with ; or | at a glance. (pipe is worse for that since you can easily confuse it with l or I) It combined with other characters makes for simplicity when it comes to templates, encoding textual data and the like. I use things like ¬:, ¬-, etc. Or words. ¬backspace Encoding non-text characters, control characters and so on.
@HashimAziz1
@HashimAziz1 8 жыл бұрын
Well, I can safely say this is the first Computerphile video I've watched and failed to understand >= 80% of what was said.
@BodyKnight
@BodyKnight 8 жыл бұрын
Professor Brailsford, you put a mark on your shirt.
@CarterColeisInfamous
@CarterColeisInfamous 8 жыл бұрын
4:50 technically thats html which is a subset of xml
@sblop
@sblop 8 жыл бұрын
Please make a video explaining how this is converted to machine code, and how that is executed.
@GegoXaren
@GegoXaren 8 жыл бұрын
I love the ooc syntax... Just sayin'....: import structs/ArrayList main: func (args: ArrayList) -> Int { if (args) { for (s in args) { " " append (s) print () } } " " print () 0 }
@ruawhitepaw
@ruawhitepaw 8 жыл бұрын
The form of BNF I've seen has no angle brackets, but puts literal text inside quotation marks instead.
@_simmac_
@_simmac_ 8 жыл бұрын
Yes, that's extended BNF (EBNF)
@AS-rl5vr
@AS-rl5vr 8 жыл бұрын
I'm not sure if this is a matter of preference or not, but I always found XML/HTML very verbose and tiresome to read and write. Since both XML and LISP's S-expressions were both great for displaying tree structure, how come SXML never gained traction?
@typograf62
@typograf62 8 жыл бұрын
Peter Naur died recently, on january 3.
@RustyTube
@RustyTube 8 жыл бұрын
Wait... Aren’t the identifiers in XML supposed to be in lower case, or at least case sensitive, so ... is different from ...?
@FelkCraft
@FelkCraft 8 жыл бұрын
+RustyTube No, xml identifiers are case insensitive
@RustyTube
@RustyTube 8 жыл бұрын
FelkCraft I'm surprised. HXTML (HTML+XML) requires all identifiers (tags) to be in the lower case. I always assumed it was because of the XML portion, since the original HTML had no such restriction.
@tamasdemjen4242
@tamasdemjen4242 8 жыл бұрын
+RustyTube XML is case sensitive. HTML isn't.
@RustyTube
@RustyTube 8 жыл бұрын
***** I was talking about XHTML (sorry, I mistyped it HXTML), which requires all tags to be in the lower case.
@salerio61
@salerio61 8 жыл бұрын
I was hoping for a lot more than that :(
@liamtennant8394
@liamtennant8394 2 жыл бұрын
Why is it that those brackets are definable as well as can be understood as less than greater than in mathematical terms
@kevincozens6837
@kevincozens6837 4 жыл бұрын
Hmm... BNF started with elements being encased in pointy brackets? The cases of BNF grammar I've seen over the years never included them.
@Hunnter2k3
@Hunnter2k3 8 жыл бұрын
Then you have some languages that don't care so much about command identifiers, and just use anything you throw at it. Or a subset of the language. Whitespace, for example, just uses any visible space-separating characters, space, tab, newline character. You could embed a Whitespace program in an HTML page by using &nbsp; for webpage spacing, and now you can throw your various commands here and there in amongst the HTML markup. At least, when given a simple page. It is harder to embed Whitespace in a document using ID/class/name references since that adds a necessary space in the tags. . There are ways you can use unique tag structures to eliminate the need for IDs, but it basically means abusing the semantic meaning of HTML, which makes some people Really Mad. I think polyglots were covered before. Oh no, it wasn't. Polyglot video when? Basically 2 or more languages combined in the same document that do multiple things, be it markup, scripting, etc. You can do crazy complex polyglots with the proper use of comment tags in languages, more so if you can redefine the comment identifier. Some great examples on the Wiki page for it at the bottom. en.wikipedia.org/wiki/Polyglot_(computing)
@Professional_Youtube_Commenter
@Professional_Youtube_Commenter 8 жыл бұрын
damn chomsky, he's everywhere.
@ramonkokoramon8741
@ramonkokoramon8741 7 жыл бұрын
good
@marlhex6280
@marlhex6280 Жыл бұрын
wow
@THB192
@THB192 8 жыл бұрын
...and SGML was in many ways far nicer, and far worse, than XML ever was. But at least it had DSSL.
@FreeBobox592
@FreeBobox592 Жыл бұрын
Hello
@Pinkskull69420
@Pinkskull69420 8 жыл бұрын
>Meme Brackets
@eobrandon
@eobrandon 8 жыл бұрын
Pointy brackets? I think you mean meme arrows.
@𠀔
@𠀔 2 жыл бұрын
@TheHandOfFear
@TheHandOfFear 8 жыл бұрын
The examples he refers to are HTML not XML. They have similar roots, but they are not the same thing. I'm surprised this slipped past.
@nagualdesign
@nagualdesign 8 жыл бұрын
3:41 - Cheeky finger sniff. ^_^
@YumekuiNeru
@YumekuiNeru 8 жыл бұрын
they are called inequality signs REEEEEEE
@ThatNateGuy
@ThatNateGuy 8 жыл бұрын
This has nothing to do with CS, but can any Brits identify Prof. Brailsford's accent? I'm a Yank who's still learning and never been to the UK.
@szymongorczynski7621
@szymongorczynski7621 8 жыл бұрын
From an NI person's point of view, it's an English accent lol
@thefrosty1925
@thefrosty1925 8 жыл бұрын
I'm a Brit but I'm not sure. I can rule out a few places where his accent is from though: Liverpool, Yorkshire, Newcastle and Brimingham. But, there's that many different accents with different variations in strength over here that it's difficult for me to give an answer. To be honest, he could easily be from one of the places I ruled out; but his accent isn't any especially strong and I would probably say it's from down South, probably from Oxfordshire since it is more towards the posh end of the spectrum
@hpesoj00
@hpesoj00 8 жыл бұрын
Nottingham?
@wobblycogsyt
@wobblycogsyt 8 жыл бұрын
+Nate Wynd (ThatNateGuy) I would say his accent isn't clearly from any one area. It's quite soft which is generally attributed to a more well off family. Someone else guessed Oxfordshire and I would agree that's a good guess although I'd perhaps go a bit further north. It's certainly not one of the well known accents like Liverpool or London.
@EgoShredder
@EgoShredder 8 жыл бұрын
+Graham Smith Hmmm....just a wild guess and probably wrong, but.....Lincolnshire? Most likely a Southern accent as you say.
@Ykulvaarlck
@Ykulvaarlck 8 жыл бұрын
hello
@mensrightsedinburgh4764
@mensrightsedinburgh4764 8 жыл бұрын
is it me you're looking for?
@U014B
@U014B 8 жыл бұрын
+GamerGate Edin Actually, I was looking for Lionel Richie. Have you seen him around recently?
@grahamfinlayson-fife73
@grahamfinlayson-fife73 8 жыл бұрын
&lt;&gt;
@y2ksw1
@y2ksw1 8 жыл бұрын
I don't agree, but just anybody can :p
@blackasthesky
@blackasthesky 4 жыл бұрын
So they basically tried to explain to humans how to explain the computer what it needs to do like they would actually explain it to a human. Actually there was no real need to define a programming language like this.
@Mr30friends
@Mr30friends 8 жыл бұрын
.
@U014B
@U014B 8 жыл бұрын
+Olegach21 💩
@MrStrutxD
@MrStrutxD 8 жыл бұрын
I don't really find this interesting, could this be indicative that programming isnt my thing? or is it just something that doesnt even interest avid programmers?
@hellterminator
@hellterminator 8 жыл бұрын
It's a bit of history. Some people find it interesting, others don't. That has nothing to do with being a programmer.
@MrStrutxD
@MrStrutxD 8 жыл бұрын
***** Ok thank you for your input. I appricate it.
@MrNateSPF
@MrNateSPF 8 жыл бұрын
+Anon Ops Another thing to note is that markup is not programing.
@MrStrutxD
@MrStrutxD 8 жыл бұрын
MrNateSPF I understand that, but i was just talking about most of these videos.
@MrNateSPF
@MrNateSPF 8 жыл бұрын
Anon Ops Why didn't you post this on a video about programing? Or more peculiarly why do you watch multiples of videos that have no interest to you?
@NathanTAK
@NathanTAK 8 жыл бұрын
Clearly, no one here has heard of Grammar-Oriented Programming.
The Most Difficult Program to Compute? - Computerphile
14:55
Computerphile
Рет қаралды 1,4 МЛН
The Lightning Algorithm - Numberphile
12:24
Numberphile
Рет қаралды 544 М.
FOREVER BUNNY
00:14
Natan por Aí
Рет қаралды 29 МЛН
Real Man relocate to Remote Controlled Car 👨🏻➡️🚙🕹️ #builderc
00:24
AI That Doesn't Try Too Hard - Maximizers and Satisficers
10:22
Robert Miles AI Safety
Рет қаралды 205 М.
Turing's Enigma Problem (Part 1) - Computerphile
19:00
Computerphile
Рет қаралды 1,3 МЛН
Does -1/12 Protect Us From Infinity? - Numberphile
21:20
Numberphile
Рет қаралды 510 М.
How principled coders outperform the competition
11:11
Coderized
Рет қаралды 1,8 МЛН
The Man Who Revolutionized Computer Science With Math
7:50
Quanta Magazine
Рет қаралды 2,9 МЛН
Parsing Explained - Computerphile
14:58
Computerphile
Рет қаралды 246 М.
Multiplicative Persistence (extra footage) - Numberphile
7:12
Numberphile2
Рет қаралды 116 М.
Zig Zag Decryption - Computerphile
17:08
Computerphile
Рет қаралды 216 М.
Navier-Stokes Equations - Numberphile
21:03
Numberphile
Рет қаралды 1,2 МЛН