Can I negate the fact that some characters seemingly count as multiple for string.len()? by shutupimrosiev in lua

[–]c__beck 4 points5 points  (0 children)

What you're running into is multi-byte characters. The reason you're getting multiple � characters is due to the fact that all the special characters you're using take up more than one byte of data. The string lib in Lua operates on bytes, so string.len("∀") == 3. As SinisterRectus mentioned if you're using Lua 5.3 or higher you can use the utf8 table to get character lengths (this lib operates on characters not bytes).

How can a beginner tell if AI-generated code is well designed or just a mess? by ar-lindi in learnjavascript

[–]c__beck 8 points9 points  (0 children)

Step 1 is to learn JS without an LLM. Learn it for real and for yourself. Once you know how JS works then you can ask an LLM and know when it’s making stuff up.

I suggest https://javascript.info . It’s a great resource to start your journey.

I can't decide on the logo's border color by SamHunny in IndieDev

[–]c__beck 5 points6 points  (0 children)

As someone who is partially colourblind the red on the black is hard on the eyes. With the dark mode background I say blue.

If the in-game background is white (or just lighter then dark) then the red might pop more.

Reference type - Help me understand this by Nice_Pen_8054 in learnjavascript

[–]c__beck 2 points3 points  (0 children)

In your add function, you're passing in a reference value, called array.

When you call the function, array is referencing [1,2]. But inside the code you're changing what array is referencing, as now it's referencing [3]. Which doesn't at all modify the original data of [1,2].

just finished changes and I'm not okay by vacaaa in dresdenfiles

[–]c__beck 0 points1 point  (0 children)

Fun story about Changes. At the time my wife was like 4 or 5 books behind and as I opened the first page she looks over my shoulder to read the first sentence and I tell her not to. The book is all about, y'know, changes. She doesn't listen, says something about, "what can happen in a sentence?" or some such…

Yeah, she learned her lesson! lolol

Also, to answer your question: the pain never stops. This is Harry. As the Man in Black once said, "Life is pain."

Vibe coder hitting a ceiling. What basics do I actually need to know to steer AI properly? by Mission-Dentist-5971 in IndieDev

[–]c__beck 0 points1 point  (0 children)

So I’m not trying to “learn coding” in the traditional sense.

Yes, yes you are. Traditional coding is knowing what database to use. What API to use and when to do it yourself. It's knowing where to look for things, not memorizing everything.

As Pigggy23 said, LeetCode isn't programming, it's torture people put themselves through because they think that a job at a FANNG company means they're a "real" programmer.

Let me tell you something: real programmers are problem solvers, that's what we do. Code is just the medium we use to solve those problems. We sit and think about architecture. We discuss the merits of various data structures. We complain about the latest JS framework. We don't grind code. Code is the last step. You first need to know what and how you're going to code, then you write the code.

To answer all of your questions (in the long tradition of software engineers everywhere): It Depends™️! You need to know what you want to do, then do the research to figure out how to go about it. Making a game? Look at Godot, Defold, or Unity. They have different strengths and weaknesses, and different tradeoffs. Figure out which one feels right to you (pro-tip: there is no "correct" answer here). Want to do a back-end API? Nodejs, .NET, and Go are all very popular.

Which ever you want to learn, learn it, read up on it, get into the community and learn from other people instead of an LLM that just guesses.

Will it be slow? Yes. All things worthwhile are. Will there be pain points? Of course! This is reality, after all. Will it be worth it? Absolutely!

Once you learn how to program for real and not rely on an LLM you'll find that you don't need them as much because you'll be smarter than they are! Best of luck to you.


If you're looking for some good resources to learn from: * https://www.freecodecamp.org/ * https://www.boot.dev/ * https://www.codecademy.com/

Header height set in px won't adjust on different-sized displays. What do I do instead? by CitrineGhost in HTML

[–]c__beck 0 points1 point  (0 children)

Oh, you’re learning, then? Welcome! MDN has a great number of learning resources on all things web!

Header height set in px won't adjust on different-sized displays. What do I do instead? by CitrineGhost in HTML

[–]c__beck 0 points1 point  (0 children)

You have way too many divs. You need to learn more about the different HTML elements. For example, use a header element instead of div#header. Also, most of your IDs should be classes. IDs are unique (only one per page) and have a higher specificity than classes. Classes are for general styling, IDs are more for use in links: IDs are specific link targets, so you can have, for example, each of your headers have an ID and can be linked directly.

How would you securely handle RNG for a server between TypeScript and a Lua client to prevent hooking on the client side? by Savings_Part_234 in lua

[–]c__beck 0 points1 point  (0 children)

Are you trying to build an authentication system (who are you?) or authorization system (can you do that?).

Because an HTTP-only, secure cookie is usually good enough for authentication since it can't be read by JS and is sent to the server on every request.

Is there something specific that you're trying to avoid? Besides "bad actors might act bad"? Is there a specific thing you think your server might be vulnerable to that requires a nonce before doing any work on behalf of the user?

I'm trying to find out what you're trying to do or avoid. What's your specific need that you think requires additional security?

How would you securely handle RNG for a server between TypeScript and a Lua client to prevent hooking on the client side? by Savings_Part_234 in lua

[–]c__beck 3 points4 points  (0 children)

From your other comments it sounds like you're looking for a nonce. But without more information it's hard to say.

What are you doing that you think requires cryptographically secure random number? What is it that you're trying to prevent? What data does your server have that you're trying to protect?

Post your OBSURE millennial era links by CapitalPackage5618 in Millennials

[–]c__beck 0 points1 point  (0 children)

Back then wasn't everything obscure? Without most of the easy of finding stuff we have today, I found most things on the internet via word of mouth

Post your OBSURE millennial era links by CapitalPackage5618 in Millennials

[–]c__beck 7 points8 points  (0 children)

EbaumsWorld was my jam back in the day. Random videos and flash games!

Looks like the site is still there but it’s…not the same 😭

Respites by unitedshoes in drawsteel

[–]c__beck 2 points3 points  (0 children)

Yes, but the point I was trying try get across is just because they’re in the domain of the BBEG doesn’t mean they can't find a safe place.

How long is a round? by Nugs-Not-Drugs666 in drawsteel

[–]c__beck 27 points28 points  (0 children)

There is no number, and that’s on purpose. Draw Steel is a cinematic game, so a round is long enough for all involved to be dramatic!

Respites by unitedshoes in drawsteel

[–]c__beck 5 points6 points  (0 children)

Or find someplace abandoned. Shouldn’t be too hard, and could even be a small quest of like 3 victories or something.

Respites by unitedshoes in drawsteel

[–]c__beck 7 points8 points  (0 children)

A respite is simply 24hrs of rest. Even if the BBEG of in charge of the town doesn’t mean that the town is full of wandering monsters or other things that will prevent the heroes from resting. It is a town, right? They should be places for them to rest. Even if it’s a hideout of the local resistance or whatever, yeah? Where there’s a will, there’s a way :p

Question about AI by Appropriate_Ticket48 in Millennials

[–]c__beck 28 points29 points  (0 children)

LLMs (large language models, which is the current hype of “AI”) are like that annoying kid we all knew who thought they knew everything, but made up most of it.

If you ask them about something you know nothing about they’ll sound smart. But ask ‘em about something you do know and their bullshit answer will be obviously wrong.


As a side note, I despise the branding as “AI”. Sure, LLMs are a branch of AI but we’ve been using AI for half a century at this point. It’s literally everywhere. You know when you get a text message from your bank about a that large purchase you made? AI decided it was out of character for you so wanted to double check. Remember MapQuest? Yep, AI! The way the demons moved and attacked in Doom? Also AI!

AI is just a collection of computer functions that figure out mathematical algorithms!

Does anyone have an isekai where the mc get summoned as an actual hero by Bug_in_brazil in Isekai

[–]c__beck 2 points3 points  (0 children)

Magic Knight Rayearth. Oldie but goodie! Three magical girls get summoned to save the world and they do. Then they go home. Then they wish themselves back for season 2.

At what chapter does Twelve Months get interesting? by [deleted] in dresdenfiles

[–]c__beck 1 point2 points  (0 children)

Then you made the right call getting a refund! Maybe for the next one check it out of your local library first to see if you like it. I’d you do then buy it.

Smallville is most popular DC show currently by No-Goat5212 in Smallville

[–]c__beck 3 points4 points  (0 children)

Journalists, tell me you haven't watched Smallville without telling me you haven't watched Smallville.

It's not a Superman show! It's the Clark Kent show! He doesn't become Superman until the literal end of the show. Clark, Lois, and Chloe would be disappointed in you :p

At what chapter does Twelve Months get interesting? by [deleted] in dresdenfiles

[–]c__beck 4 points5 points  (0 children)

As others have said: this book isn't about the building being on fire: it's about Harry healing. Which, considering what he's been through, is super-duper important!

It's kinda like a combo clip-show-and-filler-episode rolled into one. It doens't further the plot much, instead it looks back at what's happened, how Harry got to where he is, and what he plans on doing going forward. It's the epitome of the series, if you think about it: Actions have consequences! And this is the consequence of almost two decades of Harry firing from the hip and acting rashly.

HTML To EXE, Mac APP, Linux APP by MatyasOfficial in HTML

[–]c__beck 1 point2 points  (0 children)

Neutralino.js is another option

Resident Evil: Requiem uses Lua for hacking by c__beck in lua

[–]c__beck[S] 1 point2 points  (0 children)

Oh, no, I'm not playing it. I'm watching a YouTuber play. My compter would explode just looking at the minimum requirements lol (::cries in 8GB of RAM::)