SLUG - 20110930-183345
5:12
10 жыл бұрын
SLUG - 20111125-184714
1:48:59
10 жыл бұрын
SLUG - 20110930-183916
1:03:22
10 жыл бұрын
SLUG - 20110930-201153
15:22
10 жыл бұрын
SLUG - May 2013 - Lightning Talks
39:20
GBST and GWT
25:11
13 жыл бұрын
Chrome/Chromium extension development
26:00
Census Data in CouchDB by Joseph
11:21
Lexical Scanning in Go - Rob Pike
51:18
Lightning Talks @ SLUG, August 2011
1:14:56
Couchdb - Jared Wyles
40:51
13 жыл бұрын
Lightning Talks @ SLUG, July 2011
51:48
Lightning Talks @ SLUG, June 2011
1:07:50
Dominic Verity on Category Theory (Part 2)
1:32:22
Пікірлер
@800pieds
@800pieds 2 ай бұрын
Beautifully written. However I looked at the code today and channels have disappeared. I'd be curious for a tour of the principles today for comparison, and also their philosophy about the parser.
@ScottHess
@ScottHess Ай бұрын
Probably the answer around 45m. The channel makes sense with coroutines, but once you’re completely synchronous it just adds overhead.
@РодионЧаускин
@РодионЧаускин 2 ай бұрын
Moore Brenda Garcia Jessica White Michelle
@VickyGYT
@VickyGYT 3 ай бұрын
These talks are so much better than any Cpp++ con talks...
@Cleanser23
@Cleanser23 4 ай бұрын
Am I the only one who doesnt love how stateful this solution is? State can lead to tons of bugs, it might be a little nicer if each state function also returned the next state of the lexer instead
@王旭东-l2h
@王旭东-l2h 5 ай бұрын
Rob you lost your hairs...
@olaifaoluwadarasimiibikunl7820
@olaifaoluwadarasimiibikunl7820 8 ай бұрын
Wow! Awesome talk. Can't wait to try this out. Thanks Rob.
@aperson4051
@aperson4051 Жыл бұрын
I'm only 20 mins in, but I'm failing to see the "beauty" in this approach. The logic is spread out over codebase. Code should be optimized for (human) reads. A single switch statement where state is kept track of reads way easier.
@aperson4051
@aperson4051 Жыл бұрын
I have a feeling this is another case of, when a new paradigm starts to take off (the actor model) everyone wants to write everything in it, and it all seems beautiful until we actually work with it and begin to learn why this new idea is not always appropriate for every task.
@joshring8563
@joshring8563 Жыл бұрын
Really appreciate how this talk made state machines more accessible to normal humans :)
@amiraelsayedhassan8538
@amiraelsayedhassan8538 2 жыл бұрын
Anyone else think he'll start singing Smooth Criminal by Michael Jackson instead?
@布雷-z7h
@布雷-z7h 2 жыл бұрын
very clear talk and the lexical scanning in golang at 2022 is very different
@ishwargowda
@ishwargowda 2 жыл бұрын
That was beautiful!!
@dn5426
@dn5426 2 жыл бұрын
wait, is that dave cheney...?
@atanasdenkov2433
@atanasdenkov2433 3 жыл бұрын
Beautiful lecture, beautiful language, beautiful programming style.
@johnnm3207
@johnnm3207 3 жыл бұрын
Why did he say the work of Michael Jackson and I immediately thought of Billie Jean
@saptarsihalder7850
@saptarsihalder7850 3 жыл бұрын
what is wrong with rob pike. this guy's idea is so simple yet its like a next level powerful idea...I am just amazed by how he did the lexing...
@seltsamerzeitgenosse9797
@seltsamerzeitgenosse9797 3 жыл бұрын
09:26 "We could use a tool. Lex is a pretty famous one. Initially written by Mike Lesk and then redone when he was an intern by someone called Eric Schmidt." ... who at the time of this talk was his Boss (and the CEO of Google)
@mishasawangwan6652
@mishasawangwan6652 4 жыл бұрын
10k loc in bash!! lol!!
@bokwoon
@bokwoon 4 жыл бұрын
So instead of the state machine being implemented as a state variable + a switch statement, it is implemented as functions returning other functions. If state A transitions to state B, it is encoded as function A returning function B.
@shakerlakes
@shakerlakes 4 жыл бұрын
I love the slam against Perl at 4:32. 😉
@blizzy78
@blizzy78 5 жыл бұрын
Very insightful, thanks Rob!
@robertkielty5094
@robertkielty5094 5 жыл бұрын
The slides are now at talks.golang.org/2011/lex.slide#1
@dlwatib
@dlwatib 5 жыл бұрын
Too much audience participation without a traveling mic and without the speaker repeating what was said.
@이준범-n7f
@이준범-n7f 6 жыл бұрын
This is so amazing talk. thx
@shakerlakes
@shakerlakes 4 жыл бұрын
He's a very good speaker. I do enjoy his talks. Even if you're not interested in the topic, you'll become interested in the topic. You come away with insights that you didn't even know you were missing before watching the talk.
@kalekold
@kalekold 6 жыл бұрын
This is now my ideal way of writing a lexer in Go. It's such an elegant solution.
@naikrovek
@naikrovek 6 жыл бұрын
I like how Dave Chaney (now something of a Golang celebrity) is in the audience asking questions. Looks like him, anyway.
@zgmg9263
@zgmg9263 6 жыл бұрын
This is amazing
@hiddenbayes
@hiddenbayes 6 жыл бұрын
I was looking at the current version of the lexer and was surprised to find that the workaround shown at 34:23 was no longer there. Turns out that limitation (no goroutines during init) was lifted some time after this talk was presented. Here's the CL that removed the workaround: golang.org/cl/6282043
@Mike-iz9kh
@Mike-iz9kh 4 жыл бұрын
Underrated comment. Great to know, thank you!
@bokwoon
@bokwoon 4 жыл бұрын
The CL chose to revert back to the initial design because it is simpler, but the workaround is pretty simple too. In fact the workaround seems simpler than using a goroutine, because you no longer have to juggle the execution of two concurrent functions in your head: Original goroutine method: run() function keeps running in the background, occasionally pushing an item into the channel. nextItem() function will block until it receives something from that channel. Number of running functions: 2. New workaround method: Calling nextItem() will repeatedly call the state transition function until one of the state transitions pushes an item into the channel, at which point that item is simply returned. Number of running functions: 1. I think the goroutine method is just using goroutines for the sake of using goroutines.
@jnevercast
@jnevercast 7 жыл бұрын
Master of Goroutines, still can't schedule :p
@RayPereda68
@RayPereda68 7 жыл бұрын
This is an exquisite example of clean code. Lexical analysis code is often hairy but as Rob shows doesn't have to be. Go first class functions and slices really shine here.
@peterarnt
@peterarnt 8 жыл бұрын
Anyone know where the slides moved to? Link above does not work (i.e. linky-no-worky)
@peterarnt
@peterarnt 8 жыл бұрын
This appears to work: talks.golang.org/2011/lex.slide#1
@ilcorion
@ilcorion 8 жыл бұрын
Is there any "Parsing in GO", describing the next step -- using the channel of items in order to build syntax tree?
@Adisaboss
@Adisaboss 7 жыл бұрын
The parser code is there: golang.org/src/text/template/parse/parse.go I did not find any course on the topic either, though
@MORETHANOVERGROWN
@MORETHANOVERGROWN 8 жыл бұрын
Good talk. Thanks
@roylee3196
@roylee3196 9 жыл бұрын
github.com/golang/go/blob/master/src/text/template/parse/lex.go, credits go to Сергей Линник, who had posted the link to repo somewhere in the comments below.
@stovechan7873
@stovechan7873 9 жыл бұрын
51:06 They wanted him to stay, be he had to Go. Should he stay or should he go? He decided to Go.
@salvezza2710
@salvezza2710 9 жыл бұрын
guys, where can I find go parser for parsing sql files ? because, I found only a single statement parser and one located in influxdb, but it's not what I need.
@rettberg5688
@rettberg5688 9 жыл бұрын
Is anybody familiar with the work of Michael Jackson? (sees a lot of hands) Good (goes right into talking about some obscure CS researcher.) This man is the pinnacle of nerd. I'm pretty sure the audience thought you were about to make a joke about thriller.
@AndyHerbert
@AndyHerbert 7 жыл бұрын
Jackson structured programming is hardly obscure.
@needlessoptions
@needlessoptions 7 жыл бұрын
Andy Herbet Nerd
@skepticmoderate5790
@skepticmoderate5790 5 жыл бұрын
Fairly certain it was a joke.
@ideaparkcc
@ideaparkcc 4 жыл бұрын
Go 的成功证明你就是个傻逼,事实证明了你真是个傻逼。
@bokwoon
@bokwoon 4 жыл бұрын
It was a joke and I'm so sad no one laughed! I sure did when I heard him offhandedly quip "as you know, Michael Jackson developed Jackson Structured Programming".
@someman7
@someman7 9 жыл бұрын
A playlist with topics (preferably timestamped) would transform this video dump into an archive.
@AbhinandanNM
@AbhinandanNM 9 жыл бұрын
Went over my head
@PriyankJainpj
@PriyankJainpj 7 жыл бұрын
I am interested if you are still interested in helping me out?
@ochgottnochma
@ochgottnochma 9 жыл бұрын
A standalone GitHub repo would be nice to test..
@MrPartugal
@MrPartugal 9 жыл бұрын
ochgottnochma github.com/golang/go/blob/master/src/text/template/parse/lex.go
@ochgottnochma
@ochgottnochma 9 жыл бұрын
Сергей Линник Nice, thanks!
@salkdjfasldkfjsdlk
@salkdjfasldkfjsdlk 10 жыл бұрын
Great Golang talk as always. I really wish people would stop using the word trivial.
@Adisaboss
@Adisaboss 7 жыл бұрын
Reminds me the horrible days of Math courses: "We'll skip this demonstration, it's trivial." "IT IS? Gosh I'm lost..." I couldn't agree with you more
@catsass19
@catsass19 10 жыл бұрын
great! this is exactly what I need
@MarcChristensen
@MarcChristensen 11 жыл бұрын
What happened with this module? Did non-blocking logging ever get added to the logging facility?
@julianorbach5800
@julianorbach5800 10 жыл бұрын
No, but it is available on PyPi: pypi.python.org/pypi/nonblockingloghandler/
@lukes5461
@lukes5461 11 жыл бұрын
My favourite line: “So we should write our own [lexer], because it's easy, right? Anybody can write code-especially programmers.” (11:45)
@russellchido
@russellchido 6 жыл бұрын
@@skepticmoderate5790 lmao bf doesn't even require lexing. Each character is a token. This is the worse qualification to talk about parsing.
@kamilziemian995
@kamilziemian995 9 ай бұрын
@@russellchidoCan you explain this in more details?
@goncaloazevedo9822
@goncaloazevedo9822 Ай бұрын
@@kamilziemian995 I think he's just saying that brainfuck doesn't need lexing, you just emit each character as a lexeme, don't know why that would make this talk bad but ok
@sirinath
@sirinath 11 жыл бұрын
Please add part 1 to you tube also
@ServalLi
@ServalLi 11 жыл бұрын
I'd rather wanna watch this course, but I can't hear his voice clearly. The record equipment is so terrible.
@Ch051
@Ch051 11 жыл бұрын
Why does lex() return a reference to the lexer, and not just the item channel? Is this because the lexer would get garbage collected otherwise?
@Mike-iz9kh
@Mike-iz9kh 4 жыл бұрын
You have to call the "run()" method on the lexer you get back before you would get anything from the channel. I suppose that could be kicked off inside the same lex() function, but that's not how it was shown in the talk.
@DavidFarrellEastBay
@DavidFarrellEastBay 12 жыл бұрын
@chuanchuanLeo, did you finish your C implementation? Is it available for viewing online? Please let me know if you'd like any assistance.
@DamienPollet
@DamienPollet 12 жыл бұрын
I think we did something like that as an exercise, except each state function would directly call its successors using tail-recursion. That would have been in OCaml, IIRC…
@lisssally1445
@lisssally1445 12 жыл бұрын
where can i find source of this plugin?
@mrzac115
@mrzac115 12 жыл бұрын
but (and i am not saying that i dont agree with you) it is freedom of the net what do you think anonymous is fighting for (even if the gov has branded as a terrorist organization)