You Are WRONG About 0 Based Indexing

  Рет қаралды 244,920

ThePrimeTime

ThePrimeTime

Ай бұрын

Recorded live on twitch, GET IN
Reviewed Video
• Why you're wrong about...
By: TJ DeVries | / @teej_dv
My Stream
/ theprimeagen
Best Way To Support Me
Become a backend engineer. Its my favorite site
boot.dev/?promo=PRIMEYT
This is also the best way to support me is to support yourself becoming a better backend engineer.
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact
Kinesis Advantage 360: bit.ly/Prime-Kinesis
Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
turso.tech/deeznuts

Пікірлер: 1 900
@catastrophicblues13
@catastrophicblues13 Ай бұрын
This is why you should use -1 based indexing like DreamBerd.
@NewSchattenRayquaza
@NewSchattenRayquaza Ай бұрын
Ma man here is cooking some world peace right here
@CEOofCulturalMarxism
@CEOofCulturalMarxism Ай бұрын
Or BS
@Dekharen
@Dekharen Ай бұрын
Whenever I feel bad I go and read the dreamberd specifications 😆
@NithinJune
@NithinJune Ай бұрын
literally
@Sameer.Trivedi
@Sameer.Trivedi Ай бұрын
Number line starts at -infinity that's the only correct way of indexing.
@MrRobix13
@MrRobix13 Ай бұрын
Man doing live reactions, he won.
@fus3n
@fus3n Ай бұрын
Actually kind of weird... i feel like he is trying not to put effort into this place, everyone came to see him give advice and stuff after all, i am sure he got permission for these videos or the youtuber doesn't mind anyways, but... yea... you could have at least make one presentation for this.. doesn't matter ig, everyone will gobble whatever's showed to them
@rodrigohmoraes
@rodrigohmoraes Ай бұрын
​@@fus3n most (all?) of his content is reaction, what did you expect him to do? A circus show?
@ciziadevos
@ciziadevos Ай бұрын
@@fus3n nobody forces you to stay in the damn room, or on this damn video, if you don't like it
@fus3n
@fus3n Ай бұрын
​@@rodrigohmoraes No, i expected him to do what usually happens in these kinds of conference/meetups or talk videos how many times have you see this kind of videos where the guy literally reacts to a youtube video? We could say they didn't expect to go there just to see someone react... it feels effortless as if they wanted to do that they could just watch his videos, as you said which is fine too.
@fus3n
@fus3n Ай бұрын
@@ciziadevos Yes... and i said nothing about him forcing anyone to watch this or be in that room...
@heyrim72
@heyrim72 Ай бұрын
Fun fact already on minute two. In Germany we are actually counting floors starting with a a zero floor. "Erdgeschoss": ground floor, "1. Etage" is up one level from ground floor (and now I am already confused what it is in English). So 0 based index systems have been working well for a couple hundred years.
@porky1118
@porky1118 Ай бұрын
But nobody actually calls it 0. It's usually E.
@PixelProfessor
@PixelProfessor 24 күн бұрын
We use the same notation in the UK.. Ground Floor / Floor 0. Then it could be 1st Floor. Or at my local hospital, -1 (A+E, Radiology) / 0 (Ground Floor, Main Entrance / 1st Floor / 2nd Flor / 3rd Floor / 4th Floor Hospital is built on a slight incline, so A+E is still on the ground, but the rest of the main hospital extends above it, level with the upper ground.
@markus.schiefer
@markus.schiefer 22 күн бұрын
True, and works well for elevator buttons, but if you tell me that it never caused confusion during conversations, you must be living in a bubble. ;-)
@AntsanParcher
@AntsanParcher 22 күн бұрын
@@porky1118 That's merely a matter of notation.
@cybernetic-ransomware1485
@cybernetic-ransomware1485 21 күн бұрын
@@porky1118 exept elevators
@chi_said_hi
@chi_said_hi Ай бұрын
The problem with 1-based is that when you do modulo and integer divide operations, there's a missmatch in indexing. Like if you have an array of 20 items and you want to associate them evenly for like 1000 elements, you'd do items[i % items.length()], this way, it'll always be contained within items. But with 1-indexing, item[40 % 20] = item[0], which would error out.
@DominikPlaylists
@DominikPlaylists Ай бұрын
yes, there are very many good arguments for 0-based in math, but there are way more for 1-based. I vote we look at the top 1000 most useful formulas in computer science, math, physics and chemistry that have an index and then decide which one is easier.
@nikitatimaev5297
@nikitatimaev5297 Ай бұрын
​@thetukars this will make unreadable code.
@hobe4576
@hobe4576 Ай бұрын
​@@nikitatimaev5297true therefore a must-have feature for ... VBA!
@thomasmaughan4798
@thomasmaughan4798 Ай бұрын
@@DominikPlaylists "and then decide which one is easier." Done! Zero based is easier.
@dimitralex1892
@dimitralex1892 Ай бұрын
dude... you cannot tell people to analyse if its better for them to use 1 or 0 and then when someone says "ok, zero it is" tell them "no my friend you are wrong, both can be useful"...
@ZingsVideos
@ZingsVideos Ай бұрын
0 makes sense because it's an offset. If you want someone to stand still, you don't tell them to walk 1 mile.
@spacecadet2926
@spacecadet2926 Ай бұрын
Never thought of it like that. Makes sense
@jhny0
@jhny0 Ай бұрын
very good analogy
@mAcCoLo666
@mAcCoLo666 Ай бұрын
I guess that started with c, c++ and pointers. When you think of items 1 would make more sense.
@samuelswatson
@samuelswatson Ай бұрын
The whole point is that 0 makes sense when your index is functioning as an offset, and 1 makes more sense when it isn’t.
@SkyyySi
@SkyyySi Ай бұрын
That makes sense for as long as you think about arrays as memory addresses, rather than lists (as in, like, an actual list). So basically just a rephrasing of the "0-based indexing is right because pointer arithmetic" argument
@mgdotdev
@mgdotdev Ай бұрын
Imagine going to a conference in person, to see a speaker lecture in person and still watching a recording
@jsonkody
@jsonkody Ай бұрын
.. still watching IRL react video :D
@ChristofferLund
@ChristofferLund Ай бұрын
This format is insane, yet for me on KZfaq it's exactly the same as it was
@jarylsim1973
@jarylsim1973 Ай бұрын
Conferences? Is that what they call real life Twitch?
@blackspitit
@blackspitit Ай бұрын
conference? it seems more like a comedian to me. A conference is not with a video.
@asdfghyter
@asdfghyter Ай бұрын
my favorite example of 1-based indexing is used where it makes zero sense is intervals in music. if you add together two third intervals you get a fifth interval. 3+3=5. 5+4=8. the first interval, the unison, is a zero offset
@drdca8263
@drdca8263 29 күн бұрын
Yes! This makes music theory way more confusing. I pretty much have to convert what people say in whatever tutorial into 0 based before listening in order to understand it
@GlueC
@GlueC 23 күн бұрын
I can't believe how long I went without ever considering 0-based scales. I feel like there are other things that can be done with that. Whoah.
@Rikaisan
@Rikaisan Ай бұрын
I don't know how I feel about live reactions, it's just... If I ever go to a Primeagen event, I would like him to talk about something himself, just like the course he made for Frontend Masters
@NoVIcE_Source
@NoVIcE_Source Ай бұрын
at the end he was fully himself
@scythazz
@scythazz Ай бұрын
It is alittle bit weird isn’t it. Like people are saying that is what theu expected him to do but still… it feels just somewhat awkward.
@Forty8-Forty5-Fifty8
@Forty8-Forty5-Fifty8 Ай бұрын
Honestly, these live audience streams go much better than my actual college lectures from the very few I have seen so far.
@JeremyAndersonBoise
@JeremyAndersonBoise Ай бұрын
He does that too, later in the video, this is just a piece of the event.
@Lolimov
@Lolimov Ай бұрын
Prime at its Prime. I felt the emotions in the end. This is a man truly talking about what is important to him and he does not hide his feelings about this. I admire this fucking guy.
@powercore2000
@powercore2000 Ай бұрын
I felt that ending in my soul man. It was a beautiful message to end on.
@ChristofferLund
@ChristofferLund Ай бұрын
I think him having gone through what he’s done is a big reason why he is successful and why I enjoy watching him. Keeping it real.
@Kane0123
@Kane0123 Ай бұрын
Could hear it as soon as he started choking up - I would have bailed asap. Bro did some real man shit right here.
@raq1024
@raq1024 Ай бұрын
Damn that ending hit hard and made a great point. Salute to Prime.
@joelperpetua3929
@joelperpetua3929 Ай бұрын
man almost quoting the bible at the end "What will it benefit a man if he gains the whole world yet loses his life?"
@tinnguyen5055
@tinnguyen5055 Ай бұрын
0 base array works great with modulo arithmetic.
@spacelem
@spacelem Ай бұрын
In Julia, you have mod and mod1 functions. If you need n and not 0, just use mod1 instead.
@Daniel_WR_Hart
@Daniel_WR_Hart Ай бұрын
I never appreciated 0-indexing until I tried making a circular array
@MarcCastellsBallesta
@MarcCastellsBallesta 17 күн бұрын
I love your VLC-like profile picture!
@angeldude101
@angeldude101 15 күн бұрын
Minor problem, the vast majority of languages are broken by default for this, at least for negative indexes. Using unsigned values already takes an unrelated modulus unless the list itself has a length that's a power of two, and if the index is signed, then the remainder operator is broken by design and you need to manually add the length of the array anyways in order to simulate a working modulo operator. If you're instead referring to counting past the end of the array and then looping back to the front, then there's no problem and the positive indexes actually have work modulo operators. Python is one of the few languages whose signed remainder isn't broken by design and it just so happens to also be one of the few languages that allows negative indexes to index from the end, where said modulo is performed automatically. (I don't know if it works when idx/length is outside of [-1, 1).)
@user-dn6kj8xc7r
@user-dn6kj8xc7r 15 күн бұрын
I invited 1 people and they both showed up. I asked them to divide into 1 groups and there was 0 people in each group.
@rikschaaf
@rikschaaf Ай бұрын
Can we just agree on this: - in languages that start arrays with 0, let's call it an offset (or subscript if you're fancy) - in languages that start arrays with 1, let's call it an index That way, both can coexist. It even allows for languages with both.
@Valerius123
@Valerius123 Ай бұрын
Hmm.. I like this idea. Worth thinking about.
@xpusostomos
@xpusostomos Ай бұрын
A proper language lets the programmer choose his indexes
@stefanalecu9532
@stefanalecu9532 Ай бұрын
​@@xpusostomosso... Pascal? Which has been doing this for 54 years and counting?
@xpusostomos
@xpusostomos Ай бұрын
@@stefanalecu9532 I guess, I forget... Of course the right libraries in Java and C++ could pull it off too
@Asto508
@Asto508 Ай бұрын
@@xpusostomos You can always create your own array object and define/override the [] operator, so virtually every modern language allows this by default
@MasterHigure
@MasterHigure Ай бұрын
As a mathematician, some times it's more sensible to start a sequence at 0 (such as a geometric sequence, where the index tells you the power of the common quotient), some times it's more sensible to start a sequence at 1 (such as the harmonic sequence where the index tells you the denominator). It's the fact that programming languages can't be flexible about it that's the real issue here.
@username7763
@username7763 Ай бұрын
C++ can be flexible about that. It is perfectly possible to create an array class that uses 1-based indexing. This isn't commonly used because it is unexpected in the language.
@MasterHigure
@MasterHigure Ай бұрын
@@username7763 I didn't mean it was physically impossible to do. I meant not a lot of languages do it, and it seems like a terrible idea.
@jongeduard
@jongeduard Ай бұрын
0 is the origin. Very simple. This is true in Math with the x, y, z axis, and used as a system in many areas of science like physics And this is true in computers with indexing in memory, in arrays. 1 based counting is for humans, practical when numbering things in real life. That's all. I prefer the 0.
@Forty8-Forty5-Fifty8
@Forty8-Forty5-Fifty8 Ай бұрын
I prefer languages with strict rules that make it annoying to do things the non-standard way. There are so many different plausible ways that this could theoretically be implemented and I don't want to have to think of all of them when all someone had to do was write i+1 when that is what they need.
@user-wr2cd1wy3b
@user-wr2cd1wy3b Ай бұрын
@@jongeduard 0 is not the origin, zero actually represents nothing. "1 based counting is for humans" it's for computers too, it's actually multiplication that uses the zero, because you're multiplying addresses, and the first address has to equal the first address plus the number of bits until the next address * 0. 365 + 64*0 = 365 (first address) 365 + 64*1 = 429 (second address) and so on In representation, there is no reason to start it with zero, it confuses how math is done in the rest of programming, which is done the normal way where 1 = 1. 0 + 0 =/= 1 in computer math, it equals zero, computer math uses 0 as its normally used everywhere else, and this creates situations where you had to minus one from a calculation that equates to an index position. I see a lot of different reasons why people claim 0-start indexing is the way to go, and it all really is just justifying something people are used to, but if you wanted a more correct representation it'd start with 1. If we switched the norm now it'd cause a lot of chaos for something that a minus 1 or a plus 1 is all it takes to even out.
@primbin_
@primbin_ Ай бұрын
1-based indexing is significantly worse for higher dimensional arrays. If I have a cubic 3-dimensional grid of width 16, its way more intuitive to index it like this (0-based): grid[x + y*16 + z*256] As opposed to this (1-based): grid[x + (y-1)*16 + (z-1)*256]
@Akronsus
@Akronsus Ай бұрын
oh nice. that is even better than the "it makes sense as an offset" argument, since yours shows that 0-indexing makes sense for every enumerated data
@georg9899
@georg9899 Ай бұрын
I think for higher dimensions [x][y][z] would be a better way to index the array. In this case both 1-based and 0-based indexing would be more intuitive than doing the calculations for the offset manually.
@maidenlesstarnished8816
@maidenlesstarnished8816 Ай бұрын
​@georg9899 I believe you misunderstood the comment. They're not referring to the indexing syntax. They're referring to the logic for computing the index.
@z278z
@z278z Ай бұрын
(grid - 16 - 256)[x + y * 16 + z * 256] Arrays should start at index -1, so 3d arrays should start at index (-1, -1, -1)
@xpusostomos
@xpusostomos Ай бұрын
All you're telling me is that your language is brain dead and doesn't support multiple dimensional arrays natively
@Oler-yx7xj
@Oler-yx7xj Ай бұрын
Tom Scott in his "bodge" video was using lua, it went exactly the way one would expect
@kezzyhko
@kezzyhko Ай бұрын
it went exactly the way zero would expect
@SkyyySi
@SkyyySi Ай бұрын
You would indeed expect that considering he also said he likes JavaScript
@Alfred-Neuman
@Alfred-Neuman Ай бұрын
@@SkyyySi What's wrong with Javascript? Don't you agree that everything should be re-written in Javascript? Just imagine for a second, computers could be sold with Chrome a the main operating system and you could open Windows in the first tab, and then maybe Ubuntu in your second tab and why not have Fortnite in the third tab? Etc... Of course we might lose like 1 or 2 percent in performance but at the same time it would solve every single problems we currently have with all the other programming languages! Easy programming for everyone, no more security bugs, no more viruses!
@xybersurfer
@xybersurfer Ай бұрын
@@Alfred-Neuman it sounds like you've only programmed in JavaScript, because you are asking what's wrong with JavaScript. while it's probably true that there would be less security vulnerabilities related to memory safety with everything written JavaScript, it won't eliminate all security vulnerabilities. do you remember that JavaScript was also vulnerable to Spectre and Meltdown? and it happens all the time that vulnerabilities are discovered and fixed in JavaScript engines. also i don't think JavaScript would be the best choice to write everything in, because of it's aggressive type coercion, which sometimes has resemblance to accidentally accessing the wrong memory in languages like C. not to mention all the other design mistakes in JavaScript that even TypeScript can't fix. vulnerabilities are not even always technical (like social engineering). so "no more security bugs" etc. is something you should be more careful with saying
@colefrankenhoff1428
@colefrankenhoff1428 Ай бұрын
@@xybersurfer Way to mix the joke lmao
@aes0p895
@aes0p895 Ай бұрын
The concept of 'nothing' or 'zero' definitely existed. They just didn't have agreement on how it worked in math (or a system to use it effectively).
@pokefreak2112
@pokefreak2112 Ай бұрын
1-based gets nasty the moment you need to do any index arithmetic. Like let's say you have a pixel array of WxH pixels and you need to generate an index given x and y. With 0-based thats just "x + W * y", while with 1-based it becomes "x + W * (y-1)" I can't think of any code where 1-based is better beyond it being slightly more intuitive for beginners.
@spacelem
@spacelem Ай бұрын
True, but you do rarely need to do that with 1-based languages. X[x,y] is right there.
@porky1118
@porky1118 Ай бұрын
And the intuitivity issue can be fixed by fixing natural language and teaching children to count from zero from birth :)
@spacelem
@spacelem Ай бұрын
@@porky1118 we do count from zero. If there are no things, there are 0 of them. When the first thing comes along, there's 1 of them. In a race, once 1 person has finished, they are 1st. Nobody wears the "I came 0th" badge, unless it meant "there were zero people in between me and the finishing ribbon" which... is a pretty weird way to say you won.
@porky1118
@porky1118 Ай бұрын
@@spacelem Yeah, indexing would be the proper term. But since the maximum index represents the count, it's just the same. But still, you'd still count the same way since you usually don't care about the indices. But calling myself the "zeroth" (I don't like the term) would make sense. If the rank is just the same as the number of people who are better than me, that's just more intuitive.
@spacelem
@spacelem Ай бұрын
@@porky1118 I think "intuitive" is very much subjective, as describing where you came in a race by how many people came before you does not sound at all intuitive to me. If you're doing a test, and you answer no questions correctly and score "0", that's not an ordering, then it really is counting and 0 is intuitive. Saying "I got 37/50" is intuitive. Describing where you came on the test relative to everyone else is not counting, it's ordering.
@beest_
@beest_ Ай бұрын
Tldr: instead of INDEX say OFFSET, because as human readable point of view we are mistaking index and our numeric counting. By this definition arrays must at ZERO based offset
@Deschutron
@Deschutron Ай бұрын
Offset is a great word for a zero-based index. Index is a great word for the number you say while counting and pointing at each item as you count it. "Subscript" is not a great word to distinguish from "index", or to specify that you're starting from zero, because the tradition of using subscripts comes from mathematics, where subscripts are used to write indices, and the indices usually start at 1.
@jnharton
@jnharton Ай бұрын
Or just accept that your array has a Zeroth position. Try looking up the definition of index some time. Index and indicator have the same latin root. Also, the array is indexed by numbers which refer to a position/element in the array.
@Gregorius421
@Gregorius421 Ай бұрын
This is the way.
@thomassynths
@thomassynths Ай бұрын
Edgar Dijkstra wrote a great short paper explaining why 0-based is intrinsically better. Source: EWD831 "Why numbering should start at zero"
@FighterHayabusa
@FighterHayabusa Ай бұрын
I have to bring this one out from time to time to convince people. It's really well-written and reasoned.
@isodoubIet
@isodoubIet Ай бұрын
Insane that people are still debating a point that was conclusively settled in the 80s
@victotronics
@victotronics Ай бұрын
I drop that article in the class resources of almost everything I teach. He was so eloquent, thorough, and *right*.
@GabrielFury-mg8du
@GabrielFury-mg8du Ай бұрын
LOL, a 'short paper'? By today's standards it was a blog post on Medium: a long-winded trash take with petty stabs at contemporaries. The whole of the text embodies a thoroughly subjective opinion; If only 1982 had also held a medium with a 280 character limit he might yet have expressed his poorly formulated opinion that much quicker.
@jsonkody
@jsonkody Ай бұрын
I know it for years .. he's right when we talk about C He is wrong everywhere else.
@DarkerStarSword
@DarkerStarSword Ай бұрын
Easy solution, just declare a map like this and use it to convert English to indices: {"first": 0, "second": 1, "third": 2, "fourth": 3, ...}
@therainman7777
@therainman7777 14 күн бұрын
And ~double the syntax needed every time you need to index into a collection for any purpose?
@DarkerStarSword
@DarkerStarSword 13 күн бұрын
@@therainman7777 Did the sarcasm really escape you?
@GoddamnAxl
@GoddamnAxl Ай бұрын
The man is turning reaction videos into live performance art… what an innovation 🤯
@lifeisfakenews
@lifeisfakenews Ай бұрын
"Lua is actually right" alr fine, ill hear you out but i doubt you will convince me
@jsonkody
@jsonkody Ай бұрын
I've spent a very VERY long time studying the historical reasoning about this topic, and TJ did not present the most significant points of why 0-based is not real indexing :/ He had some nice points, but he did not delve too deeply. Zero-based indexing can be understood as 'offset indexing', which is akin to measuring distances on a ruler starting from zero. It doesn't point directly to an element, but rather to the starting point of where the element is stored in memory. This method is efficient for data stored sequentially, as it doesn't require additional information about the size or location of each element. In contrast, one-based indexing, which I refer to as 'real indexing', naturally aligns with human understanding of order, where '1' points directly to the first element, making it more intuitive for directly referencing items, especially in mathematical and scientific contexts. So 0-based indexing is really necessary in low-level programming, but I consider it unnecessary in higher-level programming because there's absolutely no need for it-it's not real indexing, but rather offsetting in memory. Higher-level languages don't go so low in memory access; the language handles these things for you, so you could use normal indexing that points directly to elements (1-based). It’s too bad that almost everyone copied 0-based indexing from the C language, so now it's considered the 'normal' thing for programmers.
@isodoubIet
@isodoubIet Ай бұрын
@@jsonkody You didn't present any arguments either, calling your wrong preference "real indexing" doesn't really count. "But it's intuitive" that's the same wrong argument TJ made.
@JohnSmith-qy1wm
@JohnSmith-qy1wm Ай бұрын
The colloquial, lay understanding of the word "index" is (and always has been) a list of things. You don't normally number a list starting at 0. That is what they meant by "intuitive," and what "indexing" means in any other context. I agree with them on that. Their argument is that lua's 1-based indexing is correct for high-level languages, while 0-based indexing is necessary for low-level indexing. That's their argument. It's not particularly difficult to discern.
@isodoubIet
@isodoubIet Ай бұрын
@@JohnSmith-qy1wm "The colloquial, lay understanding of the word "index" is" Irrelevant, since we're talking about a technical term with a precise definition. This has zero to do with high level versus low-level. It's about the fundamental logic of programming and 0-indexing is just inherently superior regardless of what "level" one is programming at. As long as you're indexing into a list, you have to think about how many elements are in a (sub)list and in how to combine two lists. 0-indexing with half-open intervals is the _only_ convention where end-begin is the number of elements and where, if you split a list into two, the "begin" for the second sublist coincides with the "end" for the first sublist. It's why multidimensional arrays are so much better when zero-indexing, for example. We're talking an objective advantage in writing actual code, not whatever a bronze age peasant counting sheep would've considered intuitive.
@parityviolation968
@parityviolation968 Ай бұрын
@@isodoubIet I wouldn't exactly describe the math and science based POV as bronze age peasantry, which was brought up by jsonkody and ignored by you when dismissing his comment. But I wouldn't agree with his point completely, either. In theoretical physics zero-based indexing is convention for tensors involving spacetime ... to this day, I still cant figure out the rationale behind that convention. I doubt it's as based as it's been for programming, though. Probably just some banal reason like spatial dimensions already had 1,2,3, so in order to treat time differently physicists opted for 0 instead of 4. I hope I'm wrong^^
@user-ib3gr9ov5j
@user-ib3gr9ov5j Ай бұрын
In Persian, weekdays are zero-based. "shanbe", "yek shanbe" "do shanbe", .... yek means one. do means two, ...
@Ekitchi0
@Ekitchi0 Ай бұрын
As a French where the ground floor is floor 0 and the first floor up floor 1 and the first floor down is -1 it makes me smirk to hear Americans defend indexing starting at 0 ;p
@orthoplex64
@orthoplex64 Ай бұрын
Subscript vs index is a distinction without a difference. EVERY realistic time that you need to do some amount of arithmetic to compute an index, 0-based requires no additional math, and 1-based requires subtracting 1 at the beginning and/or adding 1 at the end of the formula. The preference is not baseless dogma. Lay intuition and ease of accessing last element are the only benefits of 1-based indexing, and they're not much. In real world code, the times you need to specifically access the last element are few and far between, and programmers usually quickly develop a separate 0-based intuition.
@Oler-yx7xj
@Oler-yx7xj Ай бұрын
But have you seen a language in which it's possible to have an array indexed -69..69? How can you not love Pascal
@rupen42
@rupen42 Ай бұрын
Fortran too!
@EngineerErik
@EngineerErik Ай бұрын
done that in Ada
@adissentingopinion848
@adissentingopinion848 Ай бұрын
Damn, VHDL and Systemverilog inherited the Pascal goodness. It's strucutred as type var(7 downto 0). Yeah, you can choose your endinaness in these godforsaken HDLs.
@josefjelinek
@josefjelinek Ай бұрын
Ada handled that much better than Pascal IIRC, since in Ada you could for example define a stack allocated array with dynamic length, while Pascal had the range part of its type and very static... almost impossible to do anything more complex with those arrays alone. Even Go needs dynamic "slice" construct and its stack allocated arrays still cannot be dynamic length...
@__christopher__
@__christopher__ Ай бұрын
@@josefjelinek Extended Pascal had that too. It's just that this standard got rarely implemented (the only implementation I'm aware of is GNU Pascal).
@biggerdoofus
@biggerdoofus Ай бұрын
As soon as he mentioned the c specification I paused to look it up. C99, c-11, and c-17 all refer to square brackets as subscripting operators, but also refer to the elements of an initializer list as being "indexed". Further, c-2x (since at least August 2022) has all that plus the explicit mention of 0-indexing in relation to bits in the stdbit.h section. Also _Lua_ stores the array portion of tables in an actual c array. ..Counter-ackshually-d.
@isodoubIet
@isodoubIet Ай бұрын
This fake distinction between indices and subscripts was the most mind-meltingly stupid part of the video.
@ionarevamp
@ionarevamp Ай бұрын
This is because array subscripting is a *form* of indexing. It doesn't mean that it is the only logical form of indexing, that's the whole point.
@delta3244
@delta3244 Ай бұрын
​​@@ionarevampSubscripting doesn't have the inherent meaning of x[y] ⇔ (*(x + y)) anywhere except in C (edit: and any other languages which _choose to_ ascribe that meaning), so it's a pointless distinction either way. It's also an incorrect distinction, so focusing on it does naught but obscure whatever point was being made.
@ionarevamp
@ionarevamp Ай бұрын
@@delta3244 Precedent and tradition ascribe a meaning regardless. I think if you failed to see a point, you either have no opinion on it or you weren't paying attention. In fact, I think you just stated the point but don't seem to believe that's actually what it was: 0-based indexing because of the specified array subscripting pointer math due to the specification in C is the only real reason 0-based indexing exists. If 1-based indexing occurred first, *that* would probably be seen as normal, but the sheer influential power and age of the C (and C-based) language(s)--to quote the video--"tricks us" into thinking that 0-based indexing is the correct way. It is implied that we really should just think about what is the most intuitive and elegant solution that empowers us to do more with fewer mistakes.
@delta3244
@delta3244 Ай бұрын
@@ionarevamp It could be that the point of the example was to restate the point of the video without adding anything, as you assume it is. That point is easy to figure out: simply watch the rest of the video and ignore the example. If the example was meant to illustrate any finer/more specific point, it was lost in the glaring flaws of the example. I cannot say which is true, because the example was clearly meant to be insightful, but it merely _sounds_ insightful. If it _were_ insightful, it could communicate something more specific than the point of the video. It isn't insightful, and it cannot do so. It is clearly meant to be insightful, so for all I know, the speaker could be trying and failing to communicate something specific. Hence "whatever point was being made." (edit - grammer)
@epiphaeny
@epiphaeny Ай бұрын
I was coding many years in Matlab (1-based index) and now programming in C++ (0-based, you know...). 1-based index feels indeed more natural for counting, but 0-based index is MUCH more convenient when you do modulo operations. With 1-based indices, you basically always convert your index to a 0-based index, do the modulo operation and than convert it back to a 1-based index. So annoying.... The counting "issue" with 0-based can be fixed relatively easy with ranged-base loops (or STL algorithms).
@TomMcGuire
@TomMcGuire Ай бұрын
I started my programming with Lua, starting at 1 made so much sense to me starting out UNTIL I dealt with time. Hours are 0 - 23 so I constantly had an off by 1 error which flew under the radar for about 3 weeks until I started running everything together. Threw me through a loop and I really see both sides of the argument from this.
@sk-sm9sh
@sk-sm9sh Ай бұрын
Many countries start counting building floors from "ground floor" (0th floor) and nobody finds it confusing. Pizza delivery guy who finished just 9 grades at school is able to deliver pizza to correct floor and doesn't get confused when he hears 1st floor he knows he needs to climb 1 floor to deliver pizza and he never gets it wrong. And here we have people who finished computer science degrees and struggle to get over the fact that array indexes start at 0.
@SecretMoose
@SecretMoose Ай бұрын
I still find it difficult after I moved to an index 1 floor system. “Meet me on the 1st floor”, I always go up, they don’t.
@fullfungo
@fullfungo Ай бұрын
Pizza delivery guys also don’t get confused in countries that count floor starting from the “1st floor”. A pizza delivery guys knows he has to count the floors he’s visiting. So he visits the 1st, the 2nd, the 3rd floor… until he is at the n-th floor. It makes just as much sense.
@sk-sm9sh
@sk-sm9sh Ай бұрын
@@fullfungo thing is it makes sense either way. One just needs to acknowledge the way it is done and to stop trying to shape the world to fit their brain and instead one needs to adapt their brain to the world around. Now which way is intrinsically better is a tricky case - of course both ways will have their own advantages and disadvantages - but if Dijkstra thought counting indexes from 0 is better then I'll take his word for it instead of some random guy in the right bottom corner who some 70 years later still struggle with it.
@sebastienpautot
@sebastienpautot Ай бұрын
Counts vs indexes is such a non issue, indexes start at 0, counts start at 1
@StefanvanAalst
@StefanvanAalst Ай бұрын
Nah, pizzas should be delivered to pianos.
@abauchu
@abauchu Ай бұрын
Those feels at the end... Thank you Prime for thinking with us about technical stuff, having fun while doing so, AND being a great human being. At least that's what I can see from your videos. Thanks for sharing your life's journey from time to time with us, and thanks for your sincerity, we need more of that on the internets
@johnathanrhoades7751
@johnathanrhoades7751 Ай бұрын
I do a lot with SQL. It’s 1 indexed. I think it makes sense for the stuff you do with SQL. For anything that needs math, actual locations, modulus operator, etc., I am all for 0 index. Also, thanks for the closing thoughts! No one looking at you now would guess what you had to go through to get to where you are.
@tedlava
@tedlava Ай бұрын
When a baby is newly born, we don't start counting their age as being 1 year old immediately when they come out of the womb. All the age counters for every unit of time start at ZERO intuitively!! A recently born baby would be something like 0 years, 0 months, 0 weeks, and maybe 3 days old... However, it's common in human languages to omit saying the units that are currently zero, but they are still there and we all know mathematically that they are there.
@lucassatie
@lucassatie Ай бұрын
Except some cultures do start counting age at 1 from the moment of birth. Which I think is the problem: it's all about subjective perception. When I reference an element in an array, I prefer to reference it by its cardinal position so I prefer indexing at 1(e.g. "the first element"). But if you prefer thinking about it as an offset, then it makes more sense to start at 0 (e.g. "count of elements beyond the starting point").
@sillymesilly
@sillymesilly 21 күн бұрын
@@lucassatiedont care. Most countries start from 0. Because before you move the distance you start with is 0. It is not subjective, the baby did live for one year outside of the womb. A man standing did not travel 1 of any distance by standing.
@TPF00T
@TPF00T 20 күн бұрын
@@lucassatie The countries that start counting at 1 do so because they are counting the baby's age from conception. Presumably, they didn't know that it was exactly 9 months or they decided to simplify it. Keep in mind these countries also have their entire population get 1 year older every New Year, so they aren't exactly counting it mathematically anyway. It's just formality.
@lucassatie
@lucassatie 20 күн бұрын
@@sillymesilly dont care. You're explaining what an offset is which I already said makes sense to start at zero. A man standing did not travel 1 of any distance, but a man at the head of a queue is not 0th in line. Offset != position.
@Hobbitstomper
@Hobbitstomper Ай бұрын
In the late 90s, my teacher explained like this: "Don't think of indexing as regular counting. Think of the numbers used in indexing as symbols. Instead of numbers we could have used letters starting with A to Z and then AA to ZZ etc. just like in columns in spreadsheets. However since offset calculations need to be done under the hood to access specific parts of the array, the symbols A-Z would eventually need to be turned into numbers anyway. That is why it's more efficient to just use numbers in the first place. The reason we start with zero as a starting point is, because we want to use as many different symbols as possible using non-negative numbers, so we don't want to waste the symbol zero. Hence we start with the symbol zero. Historically this has its roots in memory addresses, where the lowest memory address also starts with zero, for the same reason, to use the lowest possible non-negative symbol. Because memory addresses already use zero-based indexing, it makes calculation of memory addresses and offsets more efficient if the array also starts with zero indexing. Additionally it aligns with mathematical concepts and simplifies certain algorithms and calculations." I always liked this way of thinking about it. It helps get over the confusion of thinking of indexes as regular counting.
@psyience3213
@psyience3213 Ай бұрын
i dk i mean it's not a symbol anymore than 1 represents the abstract idea of a singular thing. It seems like a way of thinking about it that is wrong, but i guess could still help you use it correctly? The symbol is the variable for the array you're using which represents to beginning of the block of memory, and the subscript/index represents how many of, the type that array holds, you're adding to the beginning of the block. Like if you have a ruler with 10 inches on it, if you wanted to access the first inch of the ruler you would start at 0 and go up to 1, you wouldn't start at 1, 1 is the start of the second inch.
@RandomGeometryDashStuff
@RandomGeometryDashStuff Ай бұрын
I just think index as how many elements to skip
@gezenews
@gezenews Ай бұрын
Yeah the problem with this discussion is you could make them different fruit loop flavors and I wouldn't give a shit. These things are iterated over and if you screw up I can't think of a more obvious place than in an array index.
@javierRC82857
@javierRC82857 Ай бұрын
It was a Performance convention, ok. Any other reason it's wrong
@user-wr2cd1wy3b
@user-wr2cd1wy3b Ай бұрын
It seems really dumb to me, whether I'm used to it or not. The fact that I always have to minus everything by one when I want it to equal the number of list items there are is unintuitive. I understand that the address in memory iterates over bytes or whatever (address 123 + 8 * 0 = 123, address 123 + 8 * 1 = 131, and so on...) and so the first address has to equal the actual number where the list starts if it's not a linked list (123 in this case), you don't need the interface to show that. Nothing else in the representation of the machine code is that close to the actual machine code, why should positions in an index? It should work like everything else does, first item, second item, third item, fourth item... And then in memory 123 + 32*0, 123 + 32*1, 123+32*2, 123+32*3
@cleptos972
@cleptos972 Ай бұрын
You are such an inspirational person! Especially the end. Thank you!
@meowrbius
@meowrbius Ай бұрын
Those who didn't watch the whole video, please don't skip the last 5 mins. It's the greatest life lesson from Prime ever. Clip that part and save it on your device. Everyone needs to remember that advice forever.
@Saiphes
@Saiphes Ай бұрын
If you start counting seconds, and you go "1, 2, 3" and stop, you'll have counted 2 seconds. My son counts from 0 (where it is) for knight chess moves too.
@brandongregori995
@brandongregori995 Ай бұрын
That's why people count Mississippis. It makes no sense to stop at just 3 without the Mississippi part
@brandongregori995
@brandongregori995 Ай бұрын
Also cadence as well. But it's a benefit when using a cadence to counting the current number of seconds
@Thurrak
@Thurrak Ай бұрын
That's only assuming that 0 has to be said to be considered. You could easily assume that you were counting from 0 but didn't say it because it's irrelevant to the purpose of what you are trying to do. When you say 5 you don't say 5.00 or 005 because the 0's are irrelevant.
@brentlio5578
@brentlio5578 Ай бұрын
Depends on where people think every number system starts. The starting of a timing system is 0. The starting of a counting system is also 0. The start of referencing system is going to be 1. Because if the size of a referencing system is zero, then there is nothing to reference to, whereas timing and counting can have a size of 0 if it hasn't started or progressed enough for their first cycle.
@ValentineOficial
@ValentineOficial Ай бұрын
If you're counting seconds, it's easier to count downwards (3, 2, 1, 0) because you'll intuitively include zero as the stopping point
@daschewie
@daschewie Ай бұрын
C introduced the 0-based indexing. Most languages prior to C, and in the Algol lineage used 1 based indexing: Ada, Pascal, ALGOL 68, APL, AWK, CFML, COBOL, Fortran, FoxPro, Julia, Lingo, Lua, Mathematica, MATLAB, PL/I, RPG, R, Ring, Sass, Smalltalk, Wolfram Language, and XPath/XQuery
@isodoubIet
@isodoubIet Ай бұрын
Yeah and then most languages after C copied the C convention instead of the earlier "intuitive" one. Almost like it was _actually better_ or something.
@roadgeek123
@roadgeek123 Ай бұрын
Also RPG
@MartialBoniou
@MartialBoniou Ай бұрын
Exactly!
@AM-yk5yd
@AM-yk5yd Ай бұрын
@@isodoubIet What's funny it's even makes sense in purely functional languages(think something like agda): just consider how you would implement getting a value from a list using Peano numbers. Most natural is "get-nth for 0 is the head of the list. For a successor of X, it's get-nth(X, tail)". In Peano numbers "one" doesn't even exists on its own (successor of 0 exist). When such system and C agree on something... Well, human intuition probably has serious skill issues.
@jongeduard
@jongeduard Ай бұрын
Fact. I have learned myself a bit of Fortran recently, just for fun, out of fascination. And I have also written Delphi Pascal and VB in my life. It's all either 1 based indexing or you can choose your own array bounds when declaring the array. But I think the C family languages made a good choice here. I really prefer the technical and mathematical correctness of the 0. 1 based counting is just nice for humans in daily life. Lua is a much younger language by the way, a lot newer than C for example, but it clearly choose to follow the old programming languages.
@yeran7017
@yeran7017 Ай бұрын
Man this is such a great video. TBH I got so emotional on the last minutes. Such a great advice I heard in a long time. Thanks!
@josefjelinek
@josefjelinek Ай бұрын
In "How JavaScript works" book Douglas Crockford introduced "zeroth", "wunth", "twoth", "threeth" as a clear indication and disambiguation of the indexing (does not help with fourth and on, but at that time it should be clear what is going on). He also did a survey and analysis of all known arguments for 0 vs 1 start index and it came out inconclusive in the end...
@upsidedownChad
@upsidedownChad Ай бұрын
Yooooooooo that Brazilian shirt is fire 🔥🇧🇷
@nyahhbinghi
@nyahhbinghi Ай бұрын
it is :)
@AlwaysSunny-qu5zp
@AlwaysSunny-qu5zp Ай бұрын
First element is at the address you have, the index is just used as offset, so you get the first element with offset 0. This is the root of why the first element exists at index 0. If we'd have called it 'offset', and you would dereference your array providing an offset, would you accept that providing offset 0 yields the start of the array, which is the first element?
@hoppy6437
@hoppy6437 Ай бұрын
Offset isn't the same thing except at 0. Offset 1 isn't the second element of the array, that's at offset 1 * sizeof(element). Offsets are more natural to a computer, and indexes are more natural to a human. Offsets are going to be awkward anyway, why not make indexes more intuitive for programmers?
@jsonkody
@jsonkody Ай бұрын
yep, finaly someone. Offsets are better for computer but indexes for people. Higher level langs should have 1-based indexes. Lower level langs like C make perfect sense for offsets because they work with memory. Also there may be the case of using offsets AND indexes in same language - Rust has also higher level concepts next to low level stuff. It's still compiled so indexing could be transformed to offsetting when elements have same size.
@AlwaysSunny-qu5zp
@AlwaysSunny-qu5zp Ай бұрын
@@hoppy6437 Where did I say that the offset must be one byte to get to the next element? And if I have a typed pointer, and increase it by 1, the pointer moves to the next element, because the size of the element is taken into consideration. Are you imagining a byte pointer to region of contiguous memory of otherwise typed elements that you increase by one, and then tell me that's wrong?
@AlwaysSunny-qu5zp
@AlwaysSunny-qu5zp Ай бұрын
@@jsonkody If the language truly creates an array (contiguous memory), it is very likely that the index involves yielding some offset internally (or otherwise it just pretends to provide an array - but an array is usually chosen because of their advantageous contiguous layout). I can agree a 1-based index could be a viable choice, though we've also had issues with the difference between 0-based and 1-based systems and so I also feel some advantage if it's just always the same.
@bjbboy71697
@bjbboy71697 Ай бұрын
Prime: "For those that don't use neovim..." Also Prime: "That's odd, because the people who said they use neovim didn't raise their hand".
@Exilum
@Exilum Ай бұрын
That end speech should've been an entire video. Got me real emotional. Those people that skipped the end really missed something.
@ebmpinyuri
@ebmpinyuri Ай бұрын
It's actually the best part arguably
@Exilum
@Exilum Ай бұрын
@@ebmpinyuri I think it's definitely worth having its own video. The thing is a lot of people skipped without knowing that, because when it reached the end of the react and he started talking about something else they just clicked on the next video, unaware of what was to come.
@abenezerteshome520
@abenezerteshome520 Ай бұрын
@@Exilum ​ @Exilum I even recorded that portion from the live stream , it's very impotant life lesson for a programmer
@dami-i
@dami-i Ай бұрын
function myArray(i) { return myArray[i-1]; } BOOM!
@robmorgan1214
@robmorgan1214 Ай бұрын
Count and index are different integer types... however, I'm a physicist. we invented the concept of potential... when you are forced to do calculus for a semester on your pointers before you even get to take the math classes that cover the prerequisite concepts I'll sympathize with this perspective. I wake up every day of my life off by one and bump into everything until the coffee and training kicks in.😂 Oh...and BTW iterators are the devil. Historical note: for several algorithms in memory limited numerical computations, it is sometimes significantly more efficient and faster to do computations in the address space rather than on the data itself hence we retain the choice of zero based indexing for these purposes. Symmetry about a zero index becomes an important mathematical property here.
@dasdos002
@dasdos002 Ай бұрын
In physics, the “initial value” is indexed with 0 not 1. We say, “x naught” (x_0 or x[0]) because that’s where we START. It’s an indexing convention NOT a counting convention. TJ’s points about indexing and counting are moot point.
@Yupppi
@Yupppi Ай бұрын
You know what's crazy? When talking about physics, we have so many things starting at x=0 when we make graphs out of data or phenomenon. So our first point is always at 0.
@xennial7408
@xennial7408 14 күн бұрын
Yes. 0 is where we are, so it's actually wrong to call an array index an index. The first block in memory is 0 steps away from the array start. Yes, that's programmer thinking and yes, you should have that thinking when programming. However, high level programming languages, that do not require memory / pointer operations, it's more non-tech human readable.
@josegabrielgruber
@josegabrielgruber Ай бұрын
You know Prime, I'm extremely glad that you came to Brazil, it meant a lot to us, your story, your determination and your good humor it's something that we really appreciate. But still, I would prefer to start at 1
@FinalEyes777
@FinalEyes777 Ай бұрын
Programmer with a heart and a soul and able to share that? You're somethin special primetime. Glad to have found your channel which has indeed been inspiring me to keep trying.
@TheSoulCrisis
@TheSoulCrisis 20 күн бұрын
Agreed was so touching man.
@filipenicoli_
@filipenicoli_ Ай бұрын
As comp.sci people would say: "There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors." Coming from a hardware background, it's always worth remembering that 0x0 is a valid address. Also, when doing ASM, some architectures access data by referencing a base pointer with an offset (again, 0 is a valid offset). As C was conceived as some sort of portable assembly, it makes sense for C arrays to be 0-indexed. I believe there's no objectively good or bad approach as long as it has a consistent behaviour and doesn't suffer from performance penalties.
@henry_tsai
@henry_tsai Ай бұрын
Except 1indexing suffers inconsistency as soon as you go out of bound. Like if you want to assess the last n item, or if you want to address things prior to first entry.
@Asto508
@Asto508 Ай бұрын
@@henry_tsaiWith 1 indexing, the last item on an n array, is literally array[n] and accessing elements outside the array is something that's pointless to begin with. If you're relying on hacks using this, you're doing it wrong.
@henry_tsai
@henry_tsai Ай бұрын
@@Asto508 See, the last (1) item is array[n] in 1 indexing, instead of array[n-(1)] in 0 indexing. Or if you want to access the last third item, it would be array[n-(3-1)] instead of array[n-3], 0 indexing is more straigh forward. (python outright allow you to access the last nth item with array[-n].) Also, if you're describing something in real life with an array, like date, and later on you need to expand the span of interest, you would find the ability to address out of bound elements really valuable.
@mek101whatif7
@mek101whatif7 Ай бұрын
How does one end up working in hardware?
@filipenicoli_
@filipenicoli_ Ай бұрын
​@@mek101whatif7 You can try getting into FPGA or Electronics Engineering. What I meant was, based on my knowledge about hardware, 0-indexing makes sense, and it's not even because of memory availability.
@stevenpike7857
@stevenpike7857 7 күн бұрын
Zero index is because of the binary nature of the computer. If it's 8 bits, for example, you start the position with all switches off: 0000 0000, and then increment by one: 0000 0001, 0000 0010, 0000 0011.... and so on. Moresoe, if you are accessing an array in memory, and it's starts at memory address 1001 0110, you simply add the index number to get your location of the data. First position is at 0000 0000. Want the second one? -- add the index 0000 0001 to the address to get it.
@RogerValor
@RogerValor Ай бұрын
My first language after basic was pascal, and it had 1-based string indexes, so most of the time you would define arrays as 1-based as well array[1..100] of integer it took me a long time to learn 0-based indexes, or the fact range() returns length-1 as maximum. for the for loop the only difference is, whether you use < or
@pweddy1
@pweddy1 Ай бұрын
The notion that he is advocating for data not being stored contiguously means he wants to get cache misses as he reads enumerated data.
@aoeu256
@aoeu256 Ай бұрын
Will computers in the future have the same kind of caches and centralized memory like von-neumann's 1945 model? I think we are going to go for a more "networked" model where cpus and memory are joined together in a network like in a cellular automata...
@Forty8-Forty5-Fifty8
@Forty8-Forty5-Fifty8 Ай бұрын
​@@aoeu256 I was under the impression that von Neumann architecture has been the status quo since forever? What problem would this hypothetical networked model solve that cloud computing doesn't already do? It sounds like it would be an expensive to develop model that would not financially benefit the companies who are supposed to design it.
@user-wr2cd1wy3b
@user-wr2cd1wy3b Ай бұрын
No he is arguing for the representation of it, how much of what you program input into the machine level is what you entered? Unless your IDE is full of "001001110010100011101000110100" I'm going to guess very little. It's a matter of translating human-sense to machine-sense, and it is not really at all helpful for the human, in a high-level programming language, to remember the bytes are incrementing via multiplication with the index number.
@RenderingUser
@RenderingUser Ай бұрын
TJ the type of guy to say he's 6ft when hes actually 5 cause he like to start from 1
@jongeduard
@jongeduard Ай бұрын
Or just take the elevator, which is like an iterator. It brings you to the right floor without having to walk every step yourself.
@billeterk
@billeterk Ай бұрын
But you need to know which number to press
@jongeduard
@jongeduard Ай бұрын
@@billeterk Yeah, iterator analogy kind of stops there indeed. :P
@JimmyBin3D
@JimmyBin3D Ай бұрын
Man, that took a hard left turn from a purely technical talk to passionate advocacy for self-care and spending quality time with your loved ones... And I am 100% here for it. Zero notes.
@mrosskne
@mrosskne Ай бұрын
"Is this zero based indexing?" "It's just based indexing"
@spectrecular9721
@spectrecular9721 Ай бұрын
RAM traditionally works in 0's and 1's to indicate whether or not voltage exists. I always just figured the concept of 0-based indexing originally stemmed from this, because 0 would indicate the first of two existing options and is the default when there is no power
@-Kal-
@-Kal- Ай бұрын
Exactly! I got into programming with electronics and microcontrollers. 0 is the obvious number to count from in hardware. I do mostly high level stuff now. Maybe if I got started with high level I would think differently, but when I try to 'think like a computer' I start counting from 0 and 1 based indexing is annoying af. Thinking of the 0 as an offset is probably the best way to go about it.
@Ninakoru
@Ninakoru Ай бұрын
If you think of it in a continued way (a simple ruler), makes sense, you start at 0, and at 1 you start with the next. The zero-based index always made sense for me, the only time I feel lightly challenged mentally is accessing a position of a string.
@Pyrosublime
@Pyrosublime Ай бұрын
true but when using a rule to mark lines for saw cuts for example 0 is at the edge of the time not the first marking point, in your case you would need a rule that starts at -1 so you can mark 0 as the first measure. Essentially its about how each person sees it and wants to use the scale and what makes sense to them. Looking at a 48 port network switch that starts at port 0 is trippy and having to explain to a trainee or management the documentation of why its port 0 and not port 1 is very challenging.
@mskiptr
@mskiptr Ай бұрын
@@Pyrosublime I have the exact opposite experience. It's so confusing whenever stuff is numbered from 1 and swaps to the next column | row | page at 11, 21, 31 and so on
@DF-wl8nj
@DF-wl8nj Ай бұрын
@@Pyrosublime It shouldn't be challenging at all. "Why does it start at 0?" "Because that's how the company made it". Conversation over.
@thomasslone1964
@thomasslone1964 Ай бұрын
i think the concept is that the first item of the array should be the most often access item and with 0 in many script languages you can just not pass a value so it becomes nil which is treated as zero, also 0 is a number why not use it and have one more value for the maximum possible array size
@xpusostomos
@xpusostomos Ай бұрын
0 index is easy to think about the first position, but hard to think about the last character (n-1)
@MrLaTeki
@MrLaTeki Ай бұрын
Ending speech was awesome. I felt. Prime keep going!
@atomicman007
@atomicman007 Ай бұрын
I had a class on this in college 2 semesters ago. This addition-asterisk-address magic actually makes sense (it's not magic, I get it) and it blew my mind that a[i] is same as a + i. One more thing was blown away recently, my eardrums while watching this video. Cheers
@PasiFourmyle
@PasiFourmyle Ай бұрын
Thank you for sharing your wisdom and motivating words! 👏👏👏
@dabbopabblo
@dabbopabblo Ай бұрын
The moment I realized he was doing a live reaction to a video during a talk I died laughing, this is way too meta😂😂☠
@HyproTube
@HyproTube Ай бұрын
The feels of emotion at the end. Damn. I hear you, Prime.
@Kolbiathan
@Kolbiathan Ай бұрын
Wow that ending hit me man, keep it up Prime!
@asaad1022
@asaad1022 Ай бұрын
When you enter a building and go up, do you start from the ground floor or the first floor?
@SandraWantsCoke
@SandraWantsCoke Ай бұрын
I live in a basement
@kirkanos771
@kirkanos771 Ай бұрын
the ground floor, because in Europe we dont count floors, but stages. It's a NA perception i guess. But like imperial units, everything from NA is dubious.
@iraniansuperhacker4382
@iraniansuperhacker4382 Ай бұрын
@@kirkanos771 its Europes fault really. All the retards you guys kicked out had no where else to go so they came to America. Compound that over 300 years or so and you got stuff like the imperial system
@kirkanos771
@kirkanos771 Ай бұрын
@thetukars The second one. 0 is the engine. xD
@shaggygoat
@shaggygoat Ай бұрын
Americans count floors starting at 1 at ground-level but British count floors starting at 1 one storey above ground, which used to be just dirt and indoor farm animals. (The British system would fit nicely with −1 being the first floor underground.)
@ytdlgandalf
@ytdlgandalf Ай бұрын
My daughter knew very well at age 2 that when were doing a count down, shit happens at 0, not 1, so debunked.
@lezzbmm
@lezzbmm Ай бұрын
21:00 it’s not JUST that 0 made sense as offset it’s also that in math we like to think abt the 0th, “initial” state (zeroth iteration (bc u haven’t iterated yet)), and then the first iteration, second iteration (third item), etc
@nolanfaught6974
@nolanfaught6974 Ай бұрын
In mathematics, it's possible use any partially ordered set as an index. With this in mind, it's clear that the superior option is to index arrays using the space of Lesbesgue-measurable functions. Anyone espousing the value of integer-based indexing is clearly unable to appreciate the beauty of being able to index uncountably many things and is categorically wrong in every conceivable way
@drdca8263
@drdca8263 29 күн бұрын
What’s the poset you are defining on measurable functions?
@nolanfaught6974
@nolanfaught6974 29 күн бұрын
@@drdca8263 ordered using the L2 norm over a subset of R^n
@TheSoulCrisis
@TheSoulCrisis 20 күн бұрын
Damn Prime damn near brought me to tears with the ending segment.....powerful and touching to every human on the planet real talk! Great job Prime......THANK YOU for being so genuine, cool, funny, and authentic in keeping in touch with the important things!! ❣
@FlyingOctopus0
@FlyingOctopus0 Ай бұрын
By writing "-1" when you index, you can use 0 based indexing lika a 1 based indexing. Like this arr[3-1].
@therainman7777
@therainman7777 14 күн бұрын
lol did you really just share this as an insight? 😂 Sorry, not trying to be a jerk but it’s just kind of funny
@kjdavid
@kjdavid Ай бұрын
How old were you when you were just born? 1 year old? No. 1 month old? No. 1 day old? No. But you are in your first year, first month, first day. That is how I interpret this 0 indexing vs the first element.
@milanstevic8424
@milanstevic8424 Ай бұрын
This is the correct analysis. Yes you can say that you're in your first day, decade, heck even your first life, this is because your index is below the limit. Counting actually works like this: 9 belongs to a first grouping of ten, while 10 belongs to a second grouping of ten, which by extension means that 0 belongs to a first grouping of ten. This indicates that 0 should be the natural start for counting, it's just skipped because we humans are sloppy. Here's another argument for our sloppiness, let's say we count all the numbers that belong to a second grouping of hundred. There are a hundred of them going from 100 .. 199, so there are exactly one hundred natural numbers in this set. However in the first grouping of hundred, there are only 99 natural numbers, because 0 is excluded. Makes very little sense. We also do this for the millennium counting which is sad, because years stubbornly begin at 1 AD, year 2000 is included in the 2nd millennium. But check this out: the "80's decade" is officially set to be the interval between January 1, 1980, and December 31, 1989. That means that the 90's began at Jan 1, 1990 and ended in Dec 31, 1999, HOWEVER the 21st century began on Jan 1 2001. This makes VERY little sense. We are sloppy to the bone.
@spacelem
@spacelem Ай бұрын
@@milanstevic8424 "This indicates that 0 should be the natural start for counting." It is though. If there are 0 things, we say there are 0. If there's 1, we say there's 1. When we have 1 thing, that is the 1st thing. If all the things line up in a row, the first thing in in position 1. There is no position 0, because says there are 0 things (e.g. a race is yet to be completed). There's nothing sloppy about it. In other words, you can absolutely count 0 things, but you can't give the position of a 0th thing, because there isn't a thing to assign a position to. As for dates... the interesting thing about 2000 was all the digits changing. 2000->2001 was a regular single digit change, which was boring. 80s are any date matching xx8x, this millennium is any date starting with a 2. We didn't call year 1 year 1 until years later anyway. Plus if you switch to the Holocene calendar, we account for an additional 10 millennia of human history, and this is the year 12,024, and before the year 10,001 (1 CE) was 10,000 (1 BCE). It's all approximate and arbitrary, so just enjoy the digits.
@porky1118
@porky1118 Ай бұрын
​@@milanstevic8424 I think it comes down to the distinction of ordinal and cardinal numbers. Ordinal numbers (first, second, basically indices) should start with zero. The offset from the start. Cardinal numbers (1, 2, 3, basically counts/quantities) should also start with zero. But zero in this case means no elements. An array of length 0 doesn't have an element 0. And ranges should be inclusive at the start and exclusive at the end. And these should probably be different types, too.
@milanstevic8424
@milanstevic8424 Ай бұрын
@@porky1118 Here's a trick question: if we know that the year 2000 belongs to the 20th century, to which decade of which century it belongs? It can't belong to the first decade of the 21st century (2000-2009), because it doesn't belong to the 21st century by definition. It can't belong to the last decade of the 20th century, because the 90s run from Jan 1st 1990 to Dec 31st 1999. Such a conundrum.
@porky1118
@porky1118 Ай бұрын
​@@milanstevic8424 What's tricky about that? It obviously belongs to the 21st century (1-based). If there is a definition which doesn't put the year 2000 into the 21th century, it's just not such a good definition.
@thepackbot
@thepackbot Ай бұрын
Very insightful for a n00b. Love the message at the end man. You're an inspiration.
@Bolpat
@Bolpat Ай бұрын
I deliberately avoid using “n-th element” when talking elements in lists. I use “the index-n element”. Only exceptions are “first” and “last”, and maybe “second”. Everyone knows that “first” is index-0 and “second” is index-1.
@user-nr4ju3qd9o
@user-nr4ju3qd9o Ай бұрын
live reactions is wicked work
@vikiai4241
@vikiai4241 Ай бұрын
The 'zero didn't exist as a concept historically' pop-meme is the kind of massively overblown nonsense that makes actual historians cringe in the same way that programmers cringe watching Hollywood representations of computer programming. It falls into the same category of 'modernism' that leads to ideas like 'those people 4000 years ago couldn't have possibly built those structures that I, personally, can't work out how they did it, so aliens [or (white) foreigners, before aliens became the contemporary go-to] must have done it for them." Of course people knew what it meant to have 'none of something' - it was a pretty common situation for most. And they certainly had no problem with the idea that if they had 5 of something and sold or lost 5 of them they had none left. Or if they had none and acquired five they then had five. What they lacked was a discrete written symbol for "0" . They could state or write the word "none" (in their local language) just fine. And there are plenty of written records from the times - including arithmetic - where this was exactly what they did. Even finger-counting starts at zero, even if you don't say the 'zero' out loud. If you don't believe me, ask a math-historian and I'm sure they will happily show you their clenched fist. Real-close-up! 😛 The moment anyone drags out the "They didn't know about zero" trope, I just switch off and bin them with the anti-vaxers, con-trailers, Bill Gates 5G Microchippers and the lady living in the apartment below me who watches Ancient Aliens unironically (nice enough lady, but I just let what she says on anything more intellectually advanced than long-weekend changes to bin-night wash right over me). ... Also, we do have a pretty good idea how they built those things - they left written instructions on how to do it - in so much detail we even know the pay-grades for the work forces involved. We just took a few hundred years of telling ourselves we knew better before we decided to just RTFM!
@thomassynths
@thomassynths Ай бұрын
Even if it were true (it aint as you point out), modern schooling teaches people the concept of zero. There was a time when addition and multiplication wasn't figure out, yet that doesn't stop us from using it today. It's such a shoddy argument.
@fredgoodrum771
@fredgoodrum771 Ай бұрын
Perhaps, more as a novelty, numbers were used cardinally or ordinally, when there is something to count. Latin's closest approximation to a zero might be translated as null ("zero" as nullus, -a, -um). I suppose there might have been a philosophical or theoretical use for zero but not in practical terms aside from "I am all out of apples to sell."
@SimonBuchanNz
@SimonBuchanNz Ай бұрын
The reason this "pop-meme" exists is not because the general public didn't know about the concept of none, but because a bunch of mathematicians had savage arguments about whether "none" was a *number* specifically (similar to the negative numbers vs numbers being used for reducing/subtracting another). So no, you're not wrong, it is a dumb idea to think that people didn't know what not having something was, but it's not out of nothing, and I think Prime here gets something of the meaning with (approx.) "I don't know how you think in a world without 0" - not saying they *didn't*, just that we don't understand what it's like to do it without 0.
@alonsoACR
@alonsoACR 14 күн бұрын
​@@SimonBuchanNz This. Back then every Mathematician in Europe would argue philosophically a million ways on why zero shouldn't be considered a number at all.
@sercan9791
@sercan9791 Ай бұрын
As someone who has fucked up in life and now is trying his hardest, I really appreciate you man. Knowing that you also made a bunch of mistakes before getting where you are gives me hope for my own future.
@himalczyk258
@himalczyk258 Ай бұрын
The ending just hits. Wise words, emotional.
@mayanksinha6136
@mayanksinha6136 Ай бұрын
Dunno... Starting with zero makes sense.... Because if you are at 1 it means you have already gone to 1. We don't start walking from 1km, we start from 0km.
@marlonlom
@marlonlom Ай бұрын
so, first versión must be 0.0.1 instead of 1.0.0 in production ?
@innocentsmith6091
@innocentsmith6091 Ай бұрын
This logic works for iterating, but doesn't really make sense when just looking at objects in a list.
@mayanksinha6136
@mayanksinha6136 Ай бұрын
@@marlonlom it usually starts at 0.0.1. That's the alpha, unless you write perfect code. If thats the case then you can do whatever you want.
@gooble1
@gooble1 Ай бұрын
Does a sequence begin with the first or the zeroth number?
@mayanksinha6136
@mayanksinha6136 Ай бұрын
@@innocentsmith6091 true but then again you iterate over arrays and list as well
@xpusostomos
@xpusostomos Ай бұрын
A good programming language will never make you think about indexes, but when you insist on it, you choose the indexing, bottom and top value.
@beetledjuice3062
@beetledjuice3062 12 күн бұрын
Damn it, I wasn't expecting so many emotions. That was great.
@IdeaToGame
@IdeaToGame Ай бұрын
yo Brazil mentioned!!! suddenly caralho
@skaruts
@skaruts Ай бұрын
Two crucial mistakes in his reasoning: first, he confused indexing with counting, and second, he completely neglected to consider that indexing math only works with 0-indexing. People often make these two mistakes. Let me explain: An array of 10 elements will still have a *count* of 10 elements (10 loop iterations) regardless of whether it's indexed from 0 or 1. Indexing and counting are very different things. The "first element" is a count, not an index. Index 0 points at the first element. The only thing that guy got right was the statement _"that's what "indexes" do: they point at things"._ But then he failed to realize that "counts" don't point at things, and are not the same thing as "indices" (the plural is "indices", not "indexes"). This mistake nullifies almost every argument he makes, because they're based on this premise that he got wrong. And what programmer doesn't think about indexing math? Indexing math (converting an index to X and Y coordinates and vice-versa) is what you use to access an element in a 1D array that represents for example a tile in a 2D grid of tiles for an RPG, or a voxel in a 3D chunk, or a cell in a 2D text buffer, or a quad slot in a data structure for sprite batching, etc, etc. Indexing math dictates that, even if your language is 1-indexed, many of your arrays *have to* be indexed from 0, or else the math won't work. In practice, you can have every array indexed from 0, but you can't possibly have every array indexed from 1 (which causes some problems in 1-indexed languages). And man... that "index finger" argument is just absolute nonsense. It sounds like a desperate attempt at having one more flimsy argument. Speaking from experience, though: I love Lua like no other language. But it's because I've been using it for some 5 years that I can say that 1-indexing is a perpetual rock in the shoe. It's not a deal breaker because Lua is otherwise an excellent language, but it only brings problems, error proneness and traps: - it expects loops to go from 1 to limit (inclusive), and so whenever you need 0 to limit-1, you have to not forget the explicit -1. This requires some extra attention to what you're doing, lest you forget it. - you need to be extra careful about using certain language tools, like *_ipairs, #_* or *_table.insert()_*, because they won't work with 0-indexing. - the language creates 1-indexed arrays by default, and you can't run away from it. This makes your code inconsistent, such that you have to pay extra attention to not get your index variables off by 1, or if you're using them across multiple arrays with different indexing, etc. - utility functions that deal with arrays are harder to make/debug, because you never know what users will throw in them, so you have to account for 0 and 1 base. Or if you don't account for that, then your functions won't work for every use case where they'd be needed. - you'll perpetually have to be considering when to let the language have it's way with arrays and when not to. And sometimes you'll get it wrong and have to waste time re-writing some code. - it's harder to port code to and from 1-indexed languages because you'll have to be extra careful to not break the algorithm you're porting by allowing 1-indexed arrays in it. And then if the algorithm doesn't work, you'll have extra stuff to double-check with extra attention. There's just no world where 1-indexing is the sane option.
@neshrammc
@neshrammc Ай бұрын
The difference between ordinals, indexes, and offsets. (Words are tricky; e.g. is an offset essentially an index, or is it the product of an index and some stride, or something else; your mileage may vary.) As for a real-world example of starting at 0: I have on many occasions, in many different places, seen elevators where the ground floor is labeled as "0".
@wtrflsh
@wtrflsh Ай бұрын
We start at 1 in our uni's pseudocode. Had multiple calculation issues because the range was always offset the first time. The advantage of 0 is it has no effect in algebra. You can do checks that - if the pointer is not moved(i.e. pointer value has no effect), it should still be at the start.
@awesomedavid2012
@awesomedavid2012 Ай бұрын
The problem is, he criticizes us for not liking 1-based indexing because it isn't familiar to us. Then he argues that 0 based indexing is bad because it isn't familiar to how we talk about ordinal numbers.
@Becoming-Human
@Becoming-Human Ай бұрын
In my opinion, one of the strongest arguments for 1 based indexing, at least in Python, would be the following logic, "In Python, if negative indexing starts at -1, then why _wouldn't_ positive indexing start at 1?"
@shaggygoat
@shaggygoat Ай бұрын
But Python negative indices aren’t able to address the end of the array so the last three single-element slices of array A would ideally by A[-3:-1], A[-2:-1], A[-1:0] but as zero is interpreted to mean the beginning of the array (so that the first single-element slice is A[0:1]), A[-1:0] has to be replaced with A[-1, len(A)] or A[len(A)-1, len(A)]. (Just as graphics coordinates typically address pixel edges instead of pixel centres, Python and C address element and slice boundaries.)
@Starwort
@Starwort Ай бұрын
Negative indexing actually starts at ~0 Also, adding one to a negative index gives you the next number in the sequence (wrapping around the end if necessary) - why should there be a hole in the valid indices at 0
@porky1118
@porky1118 Ай бұрын
I could answer the question: The simplest way to implement negative indexing would be this: value = array[mod(index, array.length)] If you implement it like this, the first element wold still be 0, and the last element (using negative indices) would be -1, just like it usually is now. So that's why negative indexing starting with -1 is rather an argument for positive indexing starting with 0.
@titfortat4405
@titfortat4405 Ай бұрын
This is actually a reason to start non-negative indexing at 0 if you think about how modular arithmetic works and how arr[-1] gives you the value arr[length-1]. But that's not just my opinion, that's the reasoning behind the python syntax/semantics.
@edinguitar
@edinguitar Ай бұрын
Ending caught me by surprise.
@JackDespero
@JackDespero Ай бұрын
As a Python user, I got very excited about Julia. And then I learnt that Julia is a 1-based language by default. I hate to admit that that ruined it completely for me.
@simulatrix
@simulatrix Ай бұрын
One of the best arguments for 0-based indexing is time. The 1st second starts ticking at 00:00:00. Can you imagine if we started at 01:01:01?
@ThePlayerOfGames
@ThePlayerOfGames Ай бұрын
🤯
@r6scrubs126
@r6scrubs126 Ай бұрын
but how is that a good argument when you're not dealing with time... you're dealing with a number of THINGS in a list. If there's 1 thing in the list, you'd call that item 1. Look I understand why it starts at 0 in lower level languages for the reason mentioned at the start of this video, but there's loaaaads of other things we've abstracted and simplified in higher level languages so why not this as well
@SilentFire08
@SilentFire08 Ай бұрын
Seconds are continuous while index is discrete so I don't like that argument
@pxolqopt3597
@pxolqopt3597 Ай бұрын
​@r6scrubs126 indexing starting at 0 is not something complex enough to be abstracted
@jackdanielson1997
@jackdanielson1997 Ай бұрын
Right! A child isn't 1 when they are born, they turn 1 after 1 year. My bank account doesn't start at 1, clocks don't start at 1
@wojciechbojewski9442
@wojciechbojewski9442 Ай бұрын
0-indexing is right for C, and optional for other languages (base of the legend of C - php, python and others). You don't teach kids counting from 0, as well as you don't teach a kid's poinmter's arithmetic in C.
@thomasmaughan4798
@thomasmaughan4798 Ай бұрын
"You don't teach kids counting from 0" This becomes a challenge when you introduce the zero as the fulcrum of a number line. Now suddenly "1" is not the first number; in fact, on a number line there is no first number.
@JoeJoeTater
@JoeJoeTater Ай бұрын
So, I learned a lot of math before I got into coding. In math, you just explicitly say what your starting index is each time, because sometimes it's more convenient to start at -1, 0, 1, 2, whatever. (In more advanced notations, like Einstein index notation, you don't even say what your starting/ending indices are. You work with placeholder indicies that each imply a loop over the entire range.) So, I think there's a lot of merit to the variable-first-index thing. I've written a lot of R, which is 1-based. Honestly, I ran into fewer off-by-one errors in R. Though, I think a lot of that is due to how R allows you to avoid using loops and explicit indices through vectorization. I think that's the real takeaway. Whether it's through vectorization, iterators, or whatever else, avoiding explicit loops is a good idea.
@jordsRSAint
@jordsRSAint Ай бұрын
I like Prime more and more each video. Solid vibes from his authenticity ❤
@khhnator
@khhnator Ай бұрын
holy shit, i was not expecting the brazilian soccer team shirt
@Misterz3r0
@Misterz3r0 Ай бұрын
Zero-based indexing comes from the fact that values are stored in memory locations. The zero-th index of an array represents the memory location where the array starts and each additional index represents an offset multiplier against the size of the data type being stored. Instead of having to know the memory address of where the array starts and then having to add an offset to the starting location of an array to retrieve a value at a particular location in contiguous memory, we use a zero-based index instead. Zero-based indexing isn't meant for counting the number of items in an array, it's to facilitate referencing values stored in the array. Despite the analogy of home addressing that is often used to teach people about indexing, memory allocation and data storage doesn't correspond one-to-one with real-world, physical objects. Storage in memory has to take into account the different sizes involved with different types of data, and the different sizes obviously affect the memory addresses those values end up getting stored at. Whereas a house of any size can be assigned an address and wouldn't affect the address of the next house because we are counting discrete physical objects. If addressing was based on plot size, than houses would be addressed in the same way as zero-based indexing to make the life of the postman easier.
@pqnet84
@pqnet84 Ай бұрын
in C the third element of an array is not at a+2, it is between a+2 and a+3. The address point at the start of the object. x[n] refers to the object that is in the memory range between addresses x+n and x+n+1. Once you start giving addresses to the gaps between bytes and not to the bytes themselves everything makes a lot of sense.
@treidex
@treidex 27 күн бұрын
this ^
@wolfgangsanyer3544
@wolfgangsanyer3544 Ай бұрын
dang dude, got me tearing up over here too 😭
@mduvigneaud
@mduvigneaud Ай бұрын
TJ isn't lying, he's just confidently wrong.
@jsonkody
@jsonkody Ай бұрын
why?
@mduvigneaud
@mduvigneaud Ай бұрын
@@jsonkody Because: mathematics. The first element in a collection of elements has no elements before it.
@user-cx5jj2yv3p
@user-cx5jj2yv3p Ай бұрын
Gigachad ending
@sk-sm9sh
@sk-sm9sh Ай бұрын
No because sometimes you just don't want to iterate the array in sequential order you want to build your own order of iteration. For instance maybe you have 2d matrix and you are iterating in a spiral that starts at center.
@kc3vv
@kc3vv Ай бұрын
If the origin address of an array would just be stored as the -1 address. Then accessing each element would still be one addition. Ofc this has the disadvantage of figuring out what to do with the first bite. Maybe we could have an array end pointer there or some other useful metadata.
@DataUser1357421En
@DataUser1357421En 18 күн бұрын
The last part reminded me of this "For what shall it profit a man, if he shall gain the whole world, and lose his own soul?"
@softwaretechnologyengineering
@softwaretechnologyengineering Ай бұрын
No Hood. Unsubscribed.
C Is Not A Language Anymore
34:29
ThePrimeTime
Рет қаралды 180 М.
The Pain Of Frontend Dev | Prime Reacts
21:42
ThePrimeTime
Рет қаралды 223 М.
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 2,1 МЛН
Vivaan  Tanya once again pranked Papa 🤣😇🤣
00:10
seema lamba
Рет қаралды 18 МЛН
The child was abused by the clown#Short #Officer Rabbit #angel
00:55
兔子警官
Рет қаралды 11 МЛН
`const` was a mistake
31:50
Theo - t3․gg
Рет қаралды 121 М.
the new PS4 jailbreak is sort of hilarious
12:21
Low Level Learning
Рет қаралды 596 М.
Why you're wrong about 0-based indexing
10:23
TJ DeVries
Рет қаралды 26 М.
Have We Forgotten How To Program?? | Prime Reacts
22:53
ThePrimeTime
Рет қаралды 438 М.
You dont know OOP
50:48
ThePrimeTime
Рет қаралды 288 М.
ThePrimeagen On Running Linux
9:40
Tech Over Tea
Рет қаралды 198 М.
What Makes A Great Developer
27:12
ThePrimeTime
Рет қаралды 146 М.
Understanding B-Trees: The Data Structure Behind Modern Databases
12:39
Scams In Software Engineering
31:44
ThePrimeTime
Рет қаралды 573 М.
This Might Be The Best Advice I Have Ever Seen
40:02
ThePrimeTime
Рет қаралды 225 М.
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 31 МЛН
После ввода кода - протирайте панель
0:18
Lid hologram 3d
0:32
LEDG
Рет қаралды 7 МЛН
Купил этот ваш VR.
37:21
Ремонтяш
Рет қаралды 299 М.
Неразрушаемый смартфон
1:00
Status
Рет қаралды 1,7 МЛН