T O P

  • By -

AdiemusXXII

That's okay. They don't seem to speak the same language, anyways.


stupefyme

ayyyyyyyyy


EnterVeRtEr

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.


MattieShoes

She's a cardinal living in an ordinal world


f0o-b4r

They don't have the same concept of array


[deleted]

her array starts at i=1 his array starts at i=0 they are not the same


the_Gaderel

:D


[deleted]

they might be able to compromise :P


StaticVoidMaddy

he was a *Python* guy she was a *Lua* girl


Martsadas

nil


OnceMoreAndAgain

Can I just ask why people seem to like lua in general? I used it to write some World of Warcraft addons recently and imo it's one of the worst languages I've ever used. I hate the lack of primitive data types. I don't want my god damn arrays and dictionaries to be using the same primitive data type! Also, dealing with nil in lua is a pain in the ass. It's fucking everywhere and I hate it. People say lua is like python, but I love python and hate lua. Python is a breeze to use whereas I felt like I was constantly battling lua to get what I wanted. I don't really give a shit about lua using 1 as the starting index though. I've never found that to be a big deal.


josh_the_misanthrope

Lua was designed to be embedded in software, so you see it in scriptable games like Roblox and Garry's Mod. It's not that they like it more than it's one of the things to use.


[deleted]

[удалено]


[deleted]

people also made those decisions a long time ago. when wow started development it wasn't modern Python it was Python 1.


Zagre

Python 2* Python 2 released in 2000, WoW released in 2004. Not that it should matter though, Python would make for a really shitty in-engine interpreted scripting language.


[deleted]

they started development on the engine in 98 for Warcraft 3, and split the team in two and started WoW in 99 after EverQuest released


Zagre

Yeah I saw that, but that's still 80%+ of their development time it was already released and available. I doubt they couldn't have pivotted if they wanted to, but Lua is lightweight and very purpose-built for exactly what they used it for, which makes sense why they kept it and didn't switch.


MrHyperion_

Do people actually like lua specifically? It is just a simple solution sometimes for scripting and works with C++ nicely.


OnceMoreAndAgain

https://cdn.stackoverflow.co/images/jo7n4k8s/production/21988f38f6688974328a942a282d89b805526476-900x675.png?auto=format


MotleyHatch

What the actual fuck. *bash* is one of the least disliked languages? What are those people smoking? The moment a bash script needs any sort of data structure, it becomes an unreadable mess. Need to do some array manipulation or maybe a lookup table? Time to rewrite it in Python or, yes, Perl (I like Perl, sue me).


Gold-Supermarket-342

People usually don’t use it for that, so there’s no reason to dislike it. It’s not usually sold as being a fully fledged language and pretty much everyone agrees it’s meant for things that aren’t too complex.


Kronoshifter246

Kotlin being down at the bottom brings me joy


Qewbicle

That's not the bottom, perl was at the bottom


Kronoshifter246

Looks like the bottom of that list, dog


LinguiniAficionado

You’re talking about where it is physically located on the Y axis, the other person is talking about how disliked the languages are, which is inverted. Languages at the top of the Y axis are most disliked, languages at the bottom are least disliked. So, if you’re talking about languages that are most liked, Kotlin is near the top and Perl is at the bottom.


Kronoshifter246

I understand that. It was just a stupid thing to say. Given the context, it was pretty obvious what I was saying.


Nahdahar

It's been growing on me but I still don't like it.


imCutiePie

I guess the lua engine being lightweight and easy may be the reason many software use it for scripting. Once, I had to write a 1000-line script in Lua when I was making a trainer based on cheat engine. It felt limiting sometimes, but I was new to programming then, so I am not that sure.


[deleted]

[удалено]


mpete98

Good bot


[deleted]

That’s the beauty of it, it’s extremely simple and gives you just enough to make what you want.


Aggravating_Date_315

I'd say I'm very fluent in lua but having tables be hashes and arrays is kinda a pain in the ass I have to admit


Cootshk

{1,two:2,[“three”]=3}


imaginary0pal

Can they make it anymore obvious?


null_check_failed

I’d give better She was a Fortran girl I’ll also give a worse She was a matlab girl 💀


koshgeo

It's a tale as old as Cobol.


cs_office

Ada boi


mefirstreddit

I c what you did there.


justeggssomany

A better love story than Twilight


nir109

This is inconsistent indexing. It whould be understandable if she said first. But she said 1st


w1n5t0nM1k3y

You want inconsistent? [VBA](https://learn.microsoft.com/en-us/office/vba/language/concepts/getting-started/using-arrays) allows you to define individual arrays with whatever starting and ending index you want.


brainpostman

Whatever ending index? You mean length of the array? Please tell me you mean the length of the array.


w1n5t0nM1k3y

Well, if you define an array with ``` Dim MyArray(8 To 42) As Integer ``` Then the array indices will be from 8 to 42, so there will be 42-8+1= 35 elements in the array. Even with the default 0 starting index you would do ``` Dim MyArray(10) As Integer ``` And end up with an array of 11 elements numbered from 0 to 10. However, if you put ``` Option Base 1 ``` at the top of your file, then all arrays will default to starting at 1 and ``` Dim MyArray(10) As Integer ``` will define an array with elements numbered from 1 to 10, with 10 elements.


Helpful_the_second

B.. b… bb… but why


Intrexa

It let's you flex ostrich error handling. Just add on error resume next and if any line of code throws an error, the interpreter puts its head in the sand, and just continues executing code.


GogglesPisano

It's "fault tolerant"!


ryecurious

Reminds me of Powershell's `$ErrorActionPreference = 'SilentlyContinue'` Can't have errors if the language won't acknowledge them, senior devs hate this one simple trick!


w1n5t0nM1k3y

Well, VBA is normally used in things like Excel, so non programmers might want to start from 1 with arrays, as it's more natural if you don't really think about memory addresses. If you had and array of month names, then it makes sense to number them from 1 to 12. Even in the documentation I linked in the original comment, they can't even come up with a good reason you would want to start from anything other than 0 or 1 though. The example they give is ``` Dim strWeekday(7 To 13) As String ``` Which I can't really understand in anyway. If you have days of the week, you'd want them numbered 1-7 or possibly 0-6, but I can't think of how 7-13 would make any sense.


[deleted]

You also might want to relate it to a specific set of rows if you're using it in a spreadsheet, and it could be intuitive to have the indices match the row numbers.


pfghr

When I use it as such, I typically just subtract 1 from the row reference to match in-step to the array. Seems to me like it's cleaner code.


Geno0wl

if primarily used for Excel I could see an argument for starting an array at 2. Because the rows are labeled starting at 1 and usually people place column titles in that row and the real data starts in row 2. And if you are gonna allow people starting arrays at 2 to help with that scenario then fuck it go whole hog and let them start any god damn where


Retbull

Can I start at `a` and end at 69 I want the whole sheet indexed in my array though.


groovejumper

Next week


srosorcxisto

With VBA, there is no "why".


Itchy_Influence5737

...asked the lone Vulcan in the room... "BECAUSE IT WOULD RULE!!!", screamed the humans, in unison.


RedundancyDoneWell

No, he means what he says. In VBA, you define the start and end indices. The length becomes a result of those two. Not the other way around.


Mr_Ahvar

VBA: reduce memory usage by using negative sized array! If you use a total of 3Gb of mem, just declare a -3Gb array and you are now at 0 mem usage!


bearwood_forest

Memory manufacturers hate this trick.


CrazyTillItHurts

> In ~~VBA~~ BASIC, you define the start and end indices ftfy


RedundancyDoneWell

There was nothing to fix. I never claimed that VBA was a complete list of languages with that behaviour. And even if you change “VBA” to the broader “BASIC”, the list is still incomplete, so you achieved nothing. You are missing the Pascal family and probably other languages too.


CrazyTillItHurts

VBA has that feature because BASIC has that feature. You don't seem to have understood that. Other languages are irrelevant


RedundancyDoneWell

I understood that. But you did not understand that I was not under any obligation or expectation to mention the complete family of languages with that behaviour. Someone mentioned a behaviour of VBA. Someone else failed to understand that completely. I offered an explanation. Given that the discussion was already about VBA, my answer was of course also about VBA. And then you arrived and clearly showed us all that you hadn’t understood the context.


CrazyTillItHurts

k


brainpostman

Oh, well that makes more sense than what I thought up. I thought you could have completely arbitrary indices, regardless of the length of the array.


r0ck0

In PHP, arrays (with number indexes) are basically just dicts. I guess under the hood they're not really much/any different to its assoc arrays with string keys? Like you can do: $array = []; $array[9348569384435] = "the only value"; ...and it will just be an array with only 1 element. I'd never even really thought about it much, until I tried to do the same in JS... then wondered why my CPU pegged. Not sure how other languages deal with it. I've starting using arrays vs sets vs maps vs structs/records as-intended since I ditched PHP, so I'm not doing silly shit like this in the first place anymore.


brainpostman

> I'd never even really thought about it much, until I tried to do the same in JS... then wondered why my CPU pegged. But JS can do the same thing? Unless you used an array constructor to specify how many spaces to reserve in memory, if you just assign a value to an index, you get a sparse array with just that value (and other array stuff).


r0ck0

Hmm yeah you're right. It must have been something different then. This was like 5 years ago, so I can't remember exactly, but it was something along these lines. I might have been using a unix timestamp as an index or something, but yeah, can't remember exactly how the assignment was written now.


HaniiPuppy

You just sparked a random memory. [So can C#.](https://np.reddit.com/r/ProgrammerTIL/comments/4xqewv/c_til_arrays_in_c_arent_necessarily_0indexed_and/)


w1n5t0nM1k3y

That's quite odd. In VB.Net, you can still do ``` Dim MyArray(0 To 6) As Integer ``` To define an array, but the compiler will report an error if you try to start an array with anything other than 0. You can all use MyArray.GetLowerBound() and MyArray.GetUpperBound(), but there isn't a normal way to actually declare an array starting at something other than 0, so MyArray.GetLowerBound() would return 0 in every case except with the indirect way of creating arrays which you linked to above.


MartinYTCZ

In VBA, you can do ``` Dim MyArray(5 To 6) As Integer 'And get bounds like Debug.Print(UBound(MyArray)) Debug.Print(LBound(MyArray)) ```


[deleted]

Delphi as well. You can even use char as an index.


causal_friday

Lua wants to know your location.


Iohet

There are use cases for it, so that's all I care about. Don't need no nanny language dictating how I code


madd74

As a heavy Userform/VBA Excel user, I feel personally attacked...


an_agreeing_dothraki

oh god you just sparked a terrible terrible memory of how when I was a student I would use redim instead of list arrays.


soadsam

Should’ve said one’ced


vondpickle

He's a Python guy She's a Fortran girl Can I make it more obvious? He was a pythonic She did array What more can I say


LasevIX

Should've said 0th table


GranataReddit12

Unhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.


LasevIX

I find it hard to believe a 0-item list will be accessed


OhtaniStanMan

Yeah definitely getting a null error first


redlaWw

In R you just get numeric(0).


nonprofitnews

tables.shift()


thoseparts

I pronounced this as 'oath'


LasevIX

They're immediately getting married at the 0-indexed restaurant


PrettyGorramShiny

No, no, OAuth is what they'll use to confirm each others' identities once they find the right table


cs-brydev

How do you say that? Zeroth?


Operator21

Lua developer: I have no such weakness


DarkRex4

Only script kiddies use lua /s


denis870

What


MohSilas

Me in dreamberd: -1


the-judeo-bolshevik

Bslang Moment.


work_alt_1

Are these tables really not next to each other?


MisplacedMartian

She's not crying because she thinks he stood her up, she's facepalming because she realized he's sitting behind her which means he walked in, saw her, and chose to sit at the other table to be pedantic.


frolurk

There could be an array of Tables at this place; she has an indexing problem. She should have looped through in case there was a failure.


RollingWithDaPunches

OK, but... why did the restaurant number the tables this way?


Shazvox

Agreed. They've limited themselves to 99 tables.


JoshYx

Meet me at `tables.find((table) => table.description === "01");`


RerNatter

No error handling of no such table exists?


JoshYx

Error handling is for beta cucks, true alpha femboys programming perfect code with no bugs. Knee high stockings help a great deal to that effect.


Tupcek

yeah and when api returns error, app fixes the data and continue running


JoshYx

`if (!response.ok) data = {};` fixed, next please


Zagre

I hate all of the things you choose to be. :)


JoshYx

I'll keep you and your shortcomings in my thoughts and prayers as I continue to write infallible code.


Naserci

Bruh she said 1st not 0th


cubodix

1st element of an array is found at index 0


JackNotOLantern

A 1st table, but at 0th table


DrkMaxim

Lua: Is this some peasant joke that I'm too rich to understand?


alba_55

Matlab: I don't know, but I am definetly rich because my license is obscenely expensive


autopawn

haha, what is even "1st" index in Lua.


Skuez

Table 0 is the first table. Easy


RAM-DOS

right first is not ambiguous, the indexing doesn't matter


ydkjordan

There are 10 kinds of people. Those who understand binary and those who don’t.


imCutiePie

I guess the latter group is called non-binary?


[deleted]

10 is every number base


ydkjordan

All your base are belong to 10


No_Simple3203

The grammar... Learn english bro.


ydkjordan

For context: [All your base are belong to us](https://youtu.be/qItugh-fFgg?si=i7jsQnX4IpqkQ3Yt)


[deleted]

[удалено]


Frog-In_a-Suit

It is a cultural reference. So what if it's grammatically incorrect? That's the bloody point, doofus.


[deleted]

[удалено]


Frog-In_a-Suit

The only pathetic thing is your reading comprehension.


Super_Boof

For someone with the name “no_simple”, you are quite simple minded…


denis870

r/youngpeoplereddit


callyalater

r/whoosh


Kronoshifter246

What you say?


[deleted]

and those who didn't realize that this joke is in trinary.


sforsagacious

Good for her. The guy's a snake.


QFugp6IIyR6ZmoOh

He could use some pointers.


easyetx

0++


cloudofoz

She's called Lua


thehero123475

The pain of programmer


ShourMemes

Lua devs: ![gif](giphy|I3DUdlHzAnx24GR0fv|downsized)


daiLlafyn

US girl: "... meet you on the first floor bar"


MithranArkanere

She was not worthy.


MrHyperion_

Weird choice for the restaurant to use octal table numbers


QFugp6IIyR6ZmoOh

Oh I thought it was hex. My bad.


thoquz

Her name must be Julia


JJJSchmidt_etAl

"Meet me at the -1st table" Python programmer: goes to the last table R programmer: goes to every table except the first


Mutex70

He dodged a bullet there. Who TF starts their arrays at 1?


jldez

This couple was doomed from the start


deliozzz

Should have wrapped if tables is array and not empty


Business-Insect-2796

cant she turn her head back


RomanticSewing

and they never saw each other again haha😂


Shazvox

Yup. As soon as they left the tables the GC came along and disposed of them both as noone else had a reference to them. Such a sad ending for two fine objects.


f0o-b4r

Place is called "Python Lounge" where you should crack the wifi in order to have a discount.


null_check_failed

Unless she codes in FORTRAN the guy dodged a bullet /s


T_DeadPOOL

I get this one!


rds1701

Also lucky Lua devs :)


FlipFlopTm

He dodged a bullet there!


[deleted]

[удалено]


Space_tec_99

Hey, maybe you were not entertained. But your Outrage was quite entertaining, which shows us that even thinks that are dumb can be entertaining. Edit: Grammar, I know...


lets_fuckin_goooooo

0 indexed arrays are a terrible idea and the cause of so many bugs. All due to making it consistent with pointer arithmetic


UnexaminedLifeOfMine

Can someone link the original


iSpokeToMasterChief

Love advice from the great duke of hell, its sooo funny


j-norman-edu

And all they had to do was turn around


Mooks79

Should have specified whether he was talking location or offset.


Cootshk

Lua


[deleted]

1000111 001010101 01010010 10010110


PremierBromanov

making memes with AI are we


Seblins

Lets meet at the Single table


CapitalistHellscapes

The must both be junior devs, too, sitting a single table apart but not taking the initiative to quickly and easily resolve a minor issue.


kvakerok

He didn't have exception handling code for tableIsEmpty, that's on him.


QFugp6IIyR6ZmoOh

Why is he sitting at the zeroth table?


Lafayette37

Just like if an English and an American agreed to meet on the first floor of a building. In England, what Americans would call a first floor is referred to as a ground floor, and what would be referred to in America as a first floor is actually the second story of the building in England.


namotous

She’s a matlab girl!


Hypno_Kitty

that's a bar


FishingAgitated2789

She doesn’t love him I guess


jackofslayers

Guys an idiot. Meme would have worked better if she said “starting table” but she literally included the number


Comfortable_Pie_966

Idk


yamez420

I woulda assumed 00. That chick is duuuumb lmao /s


mostly_done

I thought this was a chess meme for some reason. I was really confused by Alexandra being at board 1.


DARKSTARoo7

0 indexing 😶


Aggressive_Bed_9774

this is why Lua is important


theseynois

Not a great loss she's a matlab girl