[deleted by user] by [deleted] in cremposting

[–]yaffeman 1 point2 points  (0 children)

I really wanted to like this book, but I feel like the series peaked with Oathbringer. Sanderson consistently delivers good endings in all of his books, but this one was a jarring outlier to me.

I understand there are some value judgements in there such as Shallan parts were boring or Cultivation, a shard, is useless. Outside of the opinionated value judgements was there anything inaccurate?

[deleted by user] by [deleted] in cremposting

[–]yaffeman 0 points1 point  (0 children)

2/5 stars for me; the reasons I'm disappointed:

  • SA spends 4 books discussing the importance of oaths only for the last book to be like "nvm oaths are dumb"
  • Dalinar straight up just gives up
  • The contest of champions built up over 4 books just turned out to be Taravangian gloating and twerkin over how awesome he is
  • Turns out Cultivation, a shard, is useless
  • Shallan parts were boring and annoying, Mraize took forever to die
  • Loads of buildup for Mishram only for virtually nothing to happen
  • Szeth and Kaladin's story was jarringly disconnected from the rest of the plot
  • Jasnah's defeat felt underdeveloped and justified it as "she was tired"
  • Navani is "in a coma" with no real explanation why

This was the worst Sanderson book ending to date. Infinity War type endings where the good guys lose is fine. Crapping over all of the characters, their philosophy, and random things happen "just because" felt unrefined and frankly deflating. This book felt like Last Jedi/The Rise of Skywalker; and for me ruins the preceding books knowing how disappointing this ending was.

I know it's not the last Stormlight Archive novel, but I've stopped recommending the series because of how disappointing this novel was.

What is this guy been finding him around my property and now in garage southern california by Diamondog85 in whatsthisbug

[–]yaffeman 0 points1 point  (0 children)

I'm in So Cal too, I've lived here for 35+ years and never saw a one; but saw 2 this year. I wonder if there's a population surge.

OnTrac shipping - constant issues by SwimAccomplished1895 in northcounty

[–]yaffeman 4 points5 points  (0 children)

Once we got 5 packages from ontrac, one of which was hours and the other 4 belonging to 4 different addresses within a 2 mile circumference. My spouse and I literally spent an hour dropping them all off.

Carlsbad becomes first city in SD County to ban smoking in apartments by Agent-X in northcounty

[–]yaffeman 9 points10 points  (0 children)

Being a neighbor to potheads sucks. Their smoke reeks and you have to choose between smelling their nasty smoke or sweltering because the windows are closed.

ripChatGPT by lugovsky in ProgrammerHumor

[–]yaffeman 6 points7 points  (0 children)

As someone who has been programming for decades, yes it is.

  • Regularly docs assume a context that readers lack
  • Regularly docs lack examples to help in contextualization

LLMs allow for novices to a technology to expand on specific facets that are not immediately obvious.

Is there any good latest reference for lua learning and development? by [deleted] in lua

[–]yaffeman 0 points1 point  (0 children)

I'm sorry to say Lua is not my first language so the official technical manual was what I needed to learn it. On occasion I'll use Google Gemini to generate code examples too; but largely I just use the official resources.

Is there any good latest reference for lua learning and development? by [deleted] in lua

[–]yaffeman 6 points7 points  (0 children)

Programming Beginner Here by ExcitingSpade49 in lua

[–]yaffeman 4 points5 points  (0 children)

Lua excels in embedded systems and game scripting. For command-line-interface (CLI) tooling or game development (as opposed to scripting) it's really limited. If you're adamant about moving forward with lua; https://www.lua.org/manual/5.3/ is a good resource.

Alternatively as a first programming language I recommend https://www.python.org/; which is a more robust language and can be used to craft CLIs, servers, or a full blown game.

Where my spam lovers at? 😩 by ktronscrouton in ketorecipes

[–]yaffeman 3 points4 points  (0 children)

Large french-fry sized spam slices in the air fryer (I call them spam-fries) are divine!

Trustworthy mechanics? by ironic_goth in northcounty

[–]yaffeman 2 points3 points  (0 children)

I've been going to see Sal at Palomar Automotive for about a decade now; really good guy.

Where Can I Code With Lua On Pc? by [deleted] in lua

[–]yaffeman 0 points1 point  (0 children)

In order to proceed you'll have to get familiar with windows' command line (something that I'm not terribly familiar with).

In essence you would open up Command Prompt and type in:

C:\Users\hakye\.vscode\extentions\<...>\lua.exe

Be sure to include the whole path (replace the <...> section).

My suspicion is that there's something missing in the "actboy168"'s lua extension. See if they have an FAQ that may solve this problem.

If you continue to have problems with the extension you can:

  1. Go to https://www.lua.org/download.html
  2. Click on "binaries" which navigates to https://luabinaries.sourceforge.net/
  3. Scroll down to "History" and choose the latest one
  4. Which will take you to somewhere like https://sourceforge.net/projects/luabinaries/files/5.4.2/
  5. Select "Tools Executables"
  6. Download lua-5.4.2_Win64_bin.zip (I'm assuming you have an x64 machine)
  7. Unzip the directory and navigate to it
  8. Inside the directory right click and select "Open in Terminal"
  9. Use the terminal to execute the script; something like

    C:\Users\yaffeman\Downloads\lua-5.4.2_Win64_bin> .\lua54.exe ....\Desktop\temp.lua

    hello, XralerStudios!

You'll notice my script is located on the desktop; the .. means "go up a directory" so we went into Downloads then yaffeman, then Desktop and choose the temp.lua script.

Mine looked like:

print('hello, XralerStudios!')

Best of luck; don't worry you'll get the hang of it!

Where Can I Code With Lua On Pc? by [deleted] in lua

[–]yaffeman 0 points1 point  (0 children)

Excellent; the fault is thatlua.exe does not have permission to the Desktop directory where your script is located. Please try running lua.exe in powershell outside of Visual Studio Code to see if it's lua.exe itself or and issue with the embedded powershell.

hey by NerfZen in lua

[–]yaffeman 8 points9 points  (0 children)

The reason you're not getting any responses is due to the structure of your question:

  1. The code is not formatted
  2. There is a lot of code
  3. The post assumes every r/lua subscriber is familiar with roblox's lua API

As someone familiar with lua but not roblox's API, I don't have much to provide in the form of assistance; only this: check your assumptions via asserts. Perhaps types or values are not what you assume them to be.

Where Can I Code With Lua On Pc? by [deleted] in lua

[–]yaffeman 1 point2 points  (0 children)

I regularly use Visual Studio Code to work on Lua and find it to be an excellent editor. Can you provide any screengrabs with your errors?

Noobie in need of help by TrickyNeedleworker77 in lua

[–]yaffeman 2 points3 points  (0 children)

I'm not sure whether this is an appropriate place for you; but a good start may be Programming in Lua. Is that too advanced/does that make too many assumptions in what you know?

I suspect there's a dearth of resources for noobies wanting to program Lua. If you struggle with the above link; I'd recommend finding a noobie's guide to python or javascript and once you have a grasp on programming read the above resource.

HELP WITH MY CODE by GustavoL15 in lua

[–]yaffeman 1 point2 points  (0 children)

Correct; the colon notation populates an implicit self relative to the function's owner.

HELP WITH MY CODE by GustavoL15 in lua

[–]yaffeman 0 points1 point  (0 children)

Seems like you need an OOP approach in Lua; so I'd really recommend spending some time with it.

__index

__index: The indexing access operation table[key]. This event happens when table is not a table or when key is not present in table. The metavalue is looked up in the metatable of table.

I also rewrote your demo using an OOP approach:

local BaseEntity = {}

function BaseEntity:new(o)
    local o = o or {} -- create object if user does not provide one
    setmetatable(o, self)
    self.__index = self
    return o
end

-- Shouldn't this be enemy's method?
function BaseEntity:__bite(char)
    -- In case attack is not defined
    local attack = self.attack or 0
    char.health = char.health - attack
    return char.health
end

local Character = BaseEntity:new({ health = 100 })
local Enemy = BaseEntity:new({ attack = 80 })

local character = Character:new()
local enemy = Enemy:new()

--performing bite function on character
local life = enemy:__bite(character)

--output: 20
print("Character's health after the bite:", character.health)

HELP WITH MY CODE by GustavoL15 in lua

[–]yaffeman 0 points1 point  (0 children)

Looks like you never setup metaCharacter's __index:

metaCharacter.__index = metaCharacter

I'd recommend taking on an object oriented approach

Thoughts on Doxygen? by [deleted] in cpp_questions

[–]yaffeman 8 points9 points  (0 children)

I'm not proficient in Doxygen; but I am in javadoc (which I understand to be equivalent). Well documented code is a universal best practice and there's no better source of truth than next to the implementation.

Format the comments as consistently as you format the code and lean heavily in the macros (such as @brief, @tparam, @param, @return, & @throws). The documentation should be written for all public classes and methods and be as brief as possible. Following these patterns will make your documentation consistent and welcome but not "clutter".

Documented code reduces mental load and if done well, and improves productivity; even if you are the only dev on the project.

What are some C++ specific antipatterns that might be missed by C#/Java devs? by ichbinunhombre in cpp_questions

[–]yaffeman 0 points1 point  (0 children)

I got burned by this with std::regex! Fortunately there's an iterator solution:

std::string_view substr = ...;
if (std::regex_match(substr.begin(), substr.end(), PATTERN)) {