Home
Categories
EXPLORE
True Crime
Comedy
Society & Culture
Business
Sports
TV & Film
Technology
About Us
Contact Us
Copyright
© 2024 PodJoint
00:00 / 00:00
Sign in

or

Don't have an account?
Sign up
Forgot password
https://is1-ssl.mzstatic.com/image/thumb/Podcasts115/v4/d2/01/2f/d2012f8d-2bba-b9b1-e0e7-14a686e6e019/mza_12162428384170880572.jpg/600x600bb.jpg
Jay's Commodore Podcast
Jay Versluis
16 episodes
9 months ago
Join Jay Versluis for tips and tricks on programming in BASIC and Assembly on vintage Commodore systems.
Show more...
Technology
RSS
All content for Jay's Commodore Podcast is the property of Jay Versluis and is served directly from their servers with no modification, redirects, or rehosting. The podcast is not affiliated with or endorsed by Podjoint in any way.
Join Jay Versluis for tips and tricks on programming in BASIC and Assembly on vintage Commodore systems.
Show more...
Technology
https://wpguru.co.uk/wp-content/uploads/2018/08/Commodore-Podcast-Icon.jpg
How to create random YouTube URLs in Commodore BASIC v2
Jay's Commodore Podcast
16 minutes 58 seconds
7 years ago
How to create random YouTube URLs in Commodore BASIC v2

In this episode I’ll demonstrate how to create those seemingly random YouTube Video IDs using a Commodore 64.
Here’s the code I’m writing – works in BASIC v2 and above:
10 print chr$(14)
20 gosub 100:x=rnd(-ti):cn=1
30 a$="https://youtu.be/"
40 for i=1 to 11
50 rn=int(rnd(0)*62)+1
60 a$=a$+yt$(rn)
70 next
80 print:print cn;" : ";a$
85 cn=cn+1
90 goto 30
85 cn=cn+1
90 goto 30

100 rem populate array
110 dim yt$(62)
120 i=1
130 for j=65 to 90
140 yt$(i)=chr$(j)
150 i=i+1
160 next j
170 for j=193 to 218
180 yt$(i)=chr$(j)
190 i=i+1
200 next j
210 for j=48 to 57
220 yt$(i)=chr$(j)
230 i=i+1
240 next j
299 return
The first line switches to lower case letters (I forgot to show that in the video).
NOTE: In addition to the upper case and lower case alphabet, and the numbers 0-9, YouTube also use two special characters that I forgot to mention in the video. One is the standard minus sign (-), and the other one is the underscore (_). The Commodore machines cannot produce the latter. For simplicity’s sake, I’ve left both of those out (just though I’d mention it here).
Inspired by Tom Scott’s video “Will YouTube ever run out of Video IDs” – watch it here: https://www.youtube.com/watch?v=gocwRvLhDf8
Jay's Commodore Podcast
Join Jay Versluis for tips and tricks on programming in BASIC and Assembly on vintage Commodore systems.