Hacker News Comments on
Fixing a bug in "Airwolf" code from 1984
Behind the Screens
·
Youtube
·
255
HN points
·
0
HN comments
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this video.⬐ ojosilvaIf anyone, like me, is wondering if the bug solution is correct, here's the original documentation for the RND() function in Applesoft BASIC language (page 102):https://mirrors.apple2.org.za/Apple%20II%20Documentation%20P...
Which says:
Which is pretty much the standard for a random function in many other computer languages through history, ie. Python's random.random(), JS Math.random(), ... There are other, more creative versions of the function, like Perl's and Ruby's rand(max), which differ slightly by allowing the user to set the max number.RND(aexpr) Returns a random real number greater than or equal to 0 and less than 1.
But this other reference link, which presumably takes its information from the back of another book could have led the Airwolf programmer to make the mistake:
http://www.landsnail.com/a2ref.htm
It says the generated number is between 0 and 1, without mention to 1 being exclusive. I believe this a common confusion when it comes to RND() usage.
⬐ smitherfield⬐ sideprojectAnother way to fix the bug would've beenwhich is equivalent to rounding to the nearest integer* instead of truncating.INT(RND(1) * 15 + .5)
*If positive, which RND's return value must be.
⬐ rzzzt⬐ Johnny555The labyrinth-printing example for the C64 also uses this: https://10print.org/Even if it were 0.0 to 1.0 inclusive there'd still be a bug in the code since there's a very slim chance of getting a 1.000000 from the RNG, so in that buggy code, 'F' would still almost never be selected.For that reason, a floating point random number from 0 to 1.0000000 inclusive would be hard to work with.
Airwolf + Nightrider filled my young mind in the 80s. Ahh, how I used to love watching them!⬐ rzzzt⬐ botverseStreet Hawk, anyone?⬐ richharms⬐ fapjacksAbsolutely! As a kid that rode dirt bikes all the time, and loved technology, I was totally into it. That and Knight Rider spurred a lot of ideas when I was young, and I was excited when I came across a set of Street Hawk DVDs a few years back. Brought back great memories.⬐ rzzztI liked both series, but the music of Street Hawk feels a lot better. Knight Rider has a very dark and heavy mood.I hope this message reaches you before you take the plunge...... I would recommend not watching Airwolf as an adult. Let it live in the "wondrous memory" part of your brain forever.This a delight. I've been stumbling upon them since 2014, more examples here:⬐ loupradoThis is a gratuitous digression, but the retreating blade stall is a key reason we don't have supersonic helicopters.The Helicopter Speed Limit - Helicopter Physics Series - #7 - Smarter Every Day 51 -- starts at 2m46s https://www.youtube.com/watch?v=_pbdwueqGp4
⬐ DoofusOfDeath⬐ DINKDINKThat's a neat video.I was surprised to learn that Chinooks are faster than sportier-looking helicopters because of that factor.
Slightly off topic but this may be the only time that it's semi relevant to get this onto HN:Edwin Van Santen - Airwolf (Mix) Commodore 64 https://www.youtube.com/watch?v=15oujjzU1lM
⬐ exlurker⬐ joeblauR.I.P. EVS https://8bitlegends.com/edwin-van-santenI just saw the name and started humming the theme song. This show and game made me want to become a helicopter pilot.⬐ cptskippy⬐ pieter1976Did you become a helicopter pilot?The whole channel seems interesting https://www.youtube.com/c/BehindtheScreens Based on This Tumblr: https://moviecode.tumblr.com/⬐ asciimoThere's got to be plenty of code to enjoy in Whiz Kids (https://www.youtube.com/watch?v=GDdVbOcUlTo). (Why "whiz" and not "wiz?")⬐ brightballHands down, greatest TV show ever made. You're free to disagree, but your opinion is wrong.⬐ XJOKOLAT⬐ duke360My heart agrees with you ... it is.But I watched a couple of episodes a few weeks ago (yikes!)
⬐ bartread⬐ gooseusI did a similar thing a while back and, although it was one of my favourite shows as a kid, I have to conclude that re-watching it was a mistake. Same with Knightrider.⬐ dvtv75⬐ brightballI've been re-watching Knight Rider on-and-off for a while now, and it's actually fairly good. I wouldn't compare it directly to anything modern, as long as I accept it for what it is - a 1980s show.⬐ bartread⬐ bdcravensNoooooo - you're tempting me. :)This is so true - Knightrider was my favorite as a child, and I need to leave my memories of it with 7 year old me.The trick is to skip season 1.Season 2 and 3 was where the real meat of the show was found.
Fun Fact: My wife wouldn't let me name our son Stringfellow
We need more Jan Michael Vincents!Though if you actually follow @AirWolf4Life for any length of time you may disagree with that previous statement.
⬐ kkylinOh my. I really loved Airwolf as a kid. I did not need to see this.⬐ JustSomeNobodyAnyone curious about this, don't use your work computer.they hit one of the two major problems in informatics... :D the number 3 in particular :D⬐ jgrahamcHuh. Cool to see this get some space on the HN front page. I created the Tumblr https://moviecode.tumblr.com/ a few years ago and I've started this channel to go a little deeper into some of the examples. Hope people like it.Next up: two episodes of Knight Rider, Westworld (1973) and Swordfish.
⬐ TeMPOraLDo Person of Interest please :). They actually used Shellshock on-screen as an exploit quite soon after it was in the news, and also AFAIR featured Stuxnet dumps.Revolution had some Lisp code in the first season[0].
[0] - https://dl.dropboxusercontent.com/u/216352/lisp-in-Revolutio...
⬐ jgrahamc⬐ aswansonPlease submit stuff you see to the Tumblr so I can keep track of it all.Did you take a look at the 6502 assembler in "The Terminator". Maybe you can find the bug that stopped AHnold from killing Sarah Connor.⬐ wang_li⬐ trentnelsonThat came from Nibble Magazine.⬐ jgrahamcYes. I'm going to do that at some point.⬐ markh1967They really should have used the code that controlled the ghosts in Pac-Man.Arrival has an R Jupyter Notebook featured about half way through when they're doing analysis.And 24 had Chloe walking over to a terminal and doing `svn unlock xyz` once.
⬐ mozumderI bet you'll find a trove of bugs in "Whiz Kids" and "Automan"⬐ jgrahamc⬐ lmmOh man, I loved Whiz Kids when it was on TV. I'm not specifically looking for bugs or 8 bit stuff just really spelunking into where the code came from. The Westworld one is very interesting because it's 1973 and Westworld was the first film with computer graphics in it... I finally figured out what's being shown.Not a movie but there's a wonderful source listing in Lost Universe (I think) where the C code starts with some macros that use setjmp/longjmp to implement gosub/return. Will try to find specific episode/timestamp when I get home.⬐ agumonkeyI had a bunch of screenshots from a movie, I'll get back to you as soon as I found them. The VBA code is quite funny.⬐ jgrahamc⬐ botverseNice. Please submit them to my Tumblr!Can't wait for the Knight Rider one⬐ noir_lordOne of the episodes of SG1 had the source code of the Replicators on screen, iirc it was the HTML output for the Bank of Canada.I just googled it and found http://thedailywtf.com/articles/Stargate-Code-of-the-Replica... so that might be a fun one to do a deep dive on.
⬐ jgrahamcYes, thanks. I have that one in the queue to do a video on. But thanks for that link as I'm trying in the text beneath the videos to credit people who discover these things and I'll add that.⬐ noir_lordCool!, I love the site btw, I could get lost in that stuff for hours :).⬐ LordKano⬐ dottrapI went out for beers with those guys one time. They were all pretty cool individuals.It's funny because when I arrived at the restaurant, they were easy to spot. It was the table full of pony tails and neckbeards. (Not joking)
⬐ jgrahamcWhich guys?⬐ LordKanoThe guys from thedailywtf.comThe only one I remember by name is Remy.
⬐ KiroYou were replying to a comment about moviecode.tumblr though. Just FYI.⬐ PhasmaFelisThe root comment was about moviecode, but its immediate child was about dailywtf.⬐ KiroThe "I love the site btw" referred to moviecode though since it was a reply to jgrahamc, hence his question.Here's another one if you don't already have it. Numb3rs shows Objective-C/UIKit code (UITableViewCell and NSArray *crayon)https://mtgap.wordpress.com/2009/08/14/objective-c-reference...