The powerpoint presentation file is now located at: www.crockford.com/pp/fun.pptx
@fennecbesixdouze1794 Жыл бұрын
@3:10:00 "There was no modeling of the DOM, but the DOM must have still existed" Oh my god. Dude. Does he know what "DOM" stands for?
@caduceus21652 жыл бұрын
Thanks for posting this
@bogdancirap78413 жыл бұрын
46:00 -- The recursive concat function that takes any number of generators is buggy. You need to make sure gen is a function before invoking it (typeof gen === 'function'). Otherwise it causes an error if you call the concatenated generator after the first time it returns undefined.
@skepticmoderate57904 жыл бұрын
This would be much nicer with fat arrow notation. Don't know if they had that then.
@johanneszilg69014 жыл бұрын
kzbin.info/www/bejne/epazdmOcm86AnJY
@anthonytonev13573 жыл бұрын
For some reason Crockford hates the arrow function. He thinks it's a tool of the hipsters and prefers using the word function. Old guy - can't keep up with the trends ;)
@derekfrost89912 жыл бұрын
@@anthonytonev1357 he says it's bad to overload symbols that have other meanings and I agree. Function isn't that hard to type.
@YonoZekenZoid8 ай бұрын
whether or not the functions are written with fat arrows is irrelevant. the important part is to understand the diferent functions presented in the workshop, so you can apply them in your own code ;)
@rentsy34444 жыл бұрын
3:31:50 "You proposed that?" "Yes, I proposed that." "Cool." - stoner in the audience. Seriously what is this audience.
@MarcosSandrini2 жыл бұрын
Seriously, yeah. This was supposed to be an advanced JS presentation, for experienced programmers of other languages and/or people that know JS already. One guy there didn't know what was heap and stack, and (maybe the same) didn't even seem to know what was an element id.
@ivanc.60644 жыл бұрын
unknown truths about JavaScript 1. The reason JavaScript was created in 10 days was because it was released as a product when it was still in prototype stage. 2. JavaScripts is called JavaScript because when it's founders wanted support from the founder of Java they had to agree to pretend it was a subet of Java.
@danh56374 жыл бұрын
Completely missed out Microsoft’s ActiveX which was an attempt to create a proprietary browser language
@gloubiboulgazeblob4 жыл бұрын
There's something weird : I use VS Code and made a similar module BUT, the last line doesn't end the same way : instead of having " } ( ) ) " I have " } ) ( ) " and it also works, "private " variables stays private.... If I write like in the video (1:54:05), VS Code transforms it into " } ) ( ) " when I save... Is this normal ? Is this another syntax for a module ???
@handlebest4 жыл бұрын
Un BelExité :-D thought the same...
@smiley_10003 жыл бұрын
Yes, it's indeed the same and it's not too difficult to see such. The case he presented is basically var f = (function(){}()), which is the function being created and invoked inside of the paranthesis. Yours is basically var f = (function(){})(), which is the function being created inside the paranthesis and invoked outside of the paranthesis. In the end, there's really no difference. You could even leave out the paranthesis entirely and simply write var f = function(){}()
@MarcosSandrini2 жыл бұрын
You shouldn't use this type of structure anymore. We have let and const now, which have block scope and don't require IIFEs like this.
@AndrewTSq Жыл бұрын
@@MarcosSandrini I think those "private" variables, aswell as closures does not work with the garbage collector in JS.
@samhart64204 жыл бұрын
If anybody is running through these in 2019 function concat(...gens) at timestamp 46:455 (kzbin.info/www/bejne/d5LCgIqkZZigetE) doesn't work and tail recursion isn't exactly supported because (?), furthermore his example of doesn't use element() in the way that he defined it earlier at 37:04 because he doesn't include a generator. I got it working for any number of generators (see below) function concat(...gens){ var next = element(gens, fromTo(0, gens.length)); var gen = next(); return function () { if(gen === undefined) return undefined; let val = gen(); if (val === undefined){ gen = next(); if(gen !== undefined) val = gen(); } return val; } }
@pauleduard47725 жыл бұрын
The language "Loglan is a constructed language .. developed beginning in 1955 by Dr James Cooke Brown" 12:46 designer of game Careers ,( but might have had other military code names ?)
@alexnezhynsky97075 жыл бұрын
My gosh, I wonder why this doesn't have more views. Very, very good stuff
@yank39706 жыл бұрын
thanks for sharing deliciouspops
@92havok6 жыл бұрын
"open up: the assfucking of tha franklin brothas"
@92havok6 жыл бұрын
this shit is bout 6 years 2 late. game is dying no one gives a fuck bout it
@kostadinnm6 жыл бұрын
When is this talk recorded and what's in the archive link?!
@sandeshpoudel75066 жыл бұрын
2:09:16 i am watching this on lynda.com and this student's voice really irritating to me :D
@alecule5 ай бұрын
to me too :)
@josefjelinek6 жыл бұрын
Where is the rest of the video? Please do not tell me the last problem is not recorded!
@antonlee05 жыл бұрын
crockford.com/pp/problems.pptx i.imgur.com/0eucXcM.png - [Student] Type check the subscriber before you push? - No, the subscribers have to be functions. In fact, that's what the try-catch was for, to guarantee that there are functions. - [Student] Okay. - [Student] Can you... nevermind. - [Student] Could you just temporarily change the value of publish to something else, but it's frozen? - Right, we have. We fixed that one. - [Student] I was just trying to think of a way to disable publish inside this loop. So if you just set ... Yeah, you put a var at the top that says publish off. - Yeah, we could put a Boolean up at the top which says, "We're in the publication mode so publish is turned off while we're looping." That would certainly work. The way I would approach it is, I would do an asynchronous solution, because I like asynchrony. So, there's something that's in browsers and in Node called setTimeout. And setTimeout receives a function and causes that function to get executed in the future. And you can give it a time which says no sooner than zero milliseconds from now, call this function. But this function happens in a different turn, so it will get scheduled after all the current work and the current term is finished. So this would cause everything to get lined up in the timer queue, and then if someone wants to subscribe during the publication, their stuff will get added later in the timer queue. So, everything stays in order. We're using a timer queue to sort the messages. - [Student] So you move the publication off into a separate queue that will all gets processed independently of whatever goes on here. - Right It also means that I don't need to try-catch here now, because, if it fails, it will in that turn, but then the system says, "Well, that turn's finished," and it will go on to the next one. So, everything keeps going. Now, it turns out there's one hazard to this because of a design error in the way setTimeout works. When you call setTimeout, it returns a number, and you can pass that number to clearTimeout, and that'll prevent things from happening. Unfortunately, it is an easily guessable number, and that means that, if the attacker can guess what the next clearTimeout number is going to be, he can prevent messages from being delivered by canceling those messages that are in the queue. So, we would have to fix that, but we'll fix that one another day.
@alecule5 ай бұрын
@@antonlee0 how would setTimeout solve the problem?
@amirsamad41036 жыл бұрын
Can I get the ppt of this talk ??
@adamduncan92695 жыл бұрын
No.
@ErikCervinEdin6 жыл бұрын
Suit and tie!
@kris12276 жыл бұрын
Fantastic education. Thanks for the upload.
@eduardoantunez6 жыл бұрын
hey, can you upload the other chapters, like the ones with Fun with functions?