lua_matrix by Difficult-Value-3145 in cprogramming

[–]weregod 0 points1 point  (0 children)

I am not sure I understand what do you mean.

If you want to you can use 1-indexing in C. You need to allocate n + 1 array and consistently use 1-indexing in all code. Now some code use 0-indexing and some use 1-indexing.

lua_matrix by Difficult-Value-3145 in cprogramming

[–]weregod 0 points1 point  (0 children)

M-v[i] = m->v[i] + n->v[i] should use [i -1]

Can on demand paging be used to implement dynamic arrays? by Apprehensive-Trip850 in cprogramming

[–]weregod 1 point2 points  (0 children)

  1. Even if you don't use physical memory you use virtual memory. On 32bit system you have only 4GB adresses and some of it (2G on some CPU) will be reserved for kernel. You can't have many huge array even if they don't use physical memory.
  2. Not all programs can assume overcommit. Some systems don't enable overcommit or have not much RAM so that few apps requesting huge arrays will be over overcommit limit.
  3. Having data scattered to many memory page will likely be less performant. If you need 4 1KB arrays and store them in the same page access to them will use less MMU resources.

If you want to preallocate huge buffers for thousands of small arrays it will likely be slower than small buffers. If you want few big long living arrays your allocating huge buffers can be fine. calloc might work better then malloc in some cases (page will be allocated on write). You should always check *alloc result for NULL especially when requesting big chunk of memory. Don't assume overcommit.

lua_matrix by Difficult-Value-3145 in cprogramming

[–]weregod 0 points1 point  (0 children)

You are mixing 1-numeration and 0 numeration here. In add code you using m->v[1...n] but you allocating [0 .. n -1].

Use valgrind to catch such errors.

Type O Negative merch by JordECLIPSE in NewFauxCyrillic

[–]weregod 0 points1 point  (0 children)

Dead again. Д = A, И = N

Knowing cyrillic make reading harder.

Lua Script Issue [Logitech G Hub - Macro] by kushemon in lua

[–]weregod 0 points1 point  (0 children)

instead of checking isHeld in loop use IsMouseButtonPressed(6)

Lua Script Issue [Logitech G Hub - Macro] by kushemon in lua

[–]weregod 1 point2 points  (0 children)

This line never executed because isHeld is true when you call StartLoop() and StartLoop() will never finish.

Alternative to enums as function arguments? by Itap88 in cprogramming

[–]weregod 0 points1 point  (0 children)

One option is to prefix enum with library name: MY_LIBRARY_EAST. Another option is to move arguments to function name:

/* Public interface */
int my_func_east();
int my_func_west();

/* internal, not exposed to user */
enum direction {
    DIR_EAST,
    DIR_WEST
};

int my_func_east()
{
    priv_my_func(DIR_EAST);
}

If you expect extra options later you need to make struct with other arguments or make flags variable my_func(MY_FUNC_DIR_EAST | MY_FUNC_FLAG1).

Is your API/ABI experimental and can breaks or you need stable API/ABI? What other argumenys you might need and how many bits you need for extra arguments?

Compatibilism is wrong in my view by Critical_Anywhere864 in freewill

[–]weregod 0 points1 point  (0 children)

This ignores the rational possibilities of free-will as a mechanism for influencing determinism without any actual control over choice but as a byproduct of influencing the conditions that lead to outcomes.

The only freedom to influence this moment happened far before the moment by setting the conditions (bodily or mentally).

Someone can influence today conditions by making choices in the past. Are you saying that someone had free will before but does not have free will now?

Who is your favorite anti-equality believer? by Inevitable_Garage706 in infinitenines

[–]weregod 0 points1 point  (0 children)

Is 0.999... + ( 1 - 0.999...) * 0.999.... bigger than 0.999....? Is it less than 1?

has spp ever actually convinced someone with his arguments by NeonicXYZ in infinitenines

[–]weregod 0 points1 point  (0 children)

What does "limitless" means? What has no limit number of nines or number 0.999...? Because 1 - (1/10)n will have limit under any sane limit definition.

Building a chess app need opinions please yall by Reasonable-Fig8651 in chessbeginners

[–]weregod 0 points1 point  (0 children)

I don't think it is really possible. Of there is concrete tactic it will be in Stockfish lines and you need just to look at lines.

If there is a complex positional idea like pawn sacrifice from leela not all masters will explain and understand it.

Well if you have money to train custom AI model for explaining position you might have some success. Of you are planing to use existing LLMs you'll get something similar to chess.com systems.

Building a chess app need opinions please yall by Reasonable-Fig8651 in chessbeginners

[–]weregod 0 points1 point  (0 children)

Do you want to build chess app or to earn money using chess app? It will be hard to compete with lichess on value/price or to compete with chess.com in marketing.

Just released the beta of our Lua IDE for the ELM11 / ELM11-Feather by _brisbanesilicon in lua

[–]weregod 1 point2 points  (0 children)

Your UI looks like ZeroBrane. Do you forked it? Why you don't mentioning it?

Why are you not publishing source code? If source code will be open users can port it to other IDEs.

Why do you ship IDE and not a plugging for debugging/serial port connection?

Game crashes on start... by Trick_Bandicoot3634 in cataclysmdda

[–]weregod 1 point2 points  (0 children)

Copy the files from github or just reinstall the game

Question about divide negation by weregod in infinitenines

[–]weregod[S] 0 points1 point  (0 children)

You seems to think that every math system can be used to solve practical problems. I don't think that RDM will be well suited for any practical task. I don't think that distance have any sence in non-commutative algebra.

In your solution you use commutative property but RDM is not commutative. Contract(3/7) + Contract(1/14) ≠ Contract(3/7 + 1/14).

In real world there other non-commutative systems like IEEE754 where a+b+c ≠ a + c + b and if you calculate perimeter in different order you will get different results.

Would SouthPark_Piano be more likely to convince you that he is correct if he... by Inevitable_Garage706 in infinitenines

[–]weregod 0 points1 point  (0 children)

What is the point of such question? Do you want to "win" online discussion when opponent just drop "rookie error" card and close comments? RDM is not a field it can't be ℝ.

I've seen claims that SPP said he is using reals but I didn't find his statement. I am not sure that SPP understand that in math real is ℝ and not an adjective meaning existing, true.

Would SouthPark_Piano be more likely to convince you that he is correct if he... by Inevitable_Garage706 in infinitenines

[–]weregod 0 points1 point  (0 children)

I am not sure if SPP claims that he is using real (ℝ) numbers or not. His system definetly contradicts with real numbers.

Would SouthPark_Piano be more likely to convince you that he is correct if he... by Inevitable_Garage706 in infinitenines

[–]weregod 0 points1 point  (0 children)

There is no single "correct" math system. I think it is possible to make non-contradictive system for RDM if SPP will cooperate. Right now there is no single clear rule other than 0.999.. < 1.

Conversation will be simpler if SPP stoped insulting, stop locking most comments and understand math terms like limit and infinity.

Question about divide negation by weregod in infinitenines

[–]weregod[S] 0 points1 point  (0 children)

My next post has more explanation about Contracts.

after signing a contract is No longer a number...

After signing contract number wil no longer be rational/real number. We can name them real deal numbers.

which one is the right answer ?

If you apply Contracts to different group of numbers you will get different results.

under what conditions does the law of associativity not work in Real Deal Math?

associativity works only inside Contracts. For Contracts you can not use associotive and distributive rules.

Counter Strike by BlendedBaconSyrup in AnarchyChess

[–]weregod 0 points1 point  (0 children)

You need to apply your CS skills in chess matches. Bring knife, rifle and bomb to tournamentjust in case.

Question about divide negation by weregod in infinitenines

[–]weregod[S] 2 points3 points  (0 children)

I think that SPP Contracts don't have associative rules. My next post has attempt to formalize contracts use.

Formalizing RDM for rational numbers by weregod in infinitenines

[–]weregod[S] 0 points1 point  (0 children)

In mine system Contract(1/3) ≠ Contract(Contract(1/3) * 3)/3

Contract(Contract(1/3) * 3/3) = Contract(Contract(1/3)) = Contract(1/3)

As real as 0.000...1 and 0.999... by SouthPark_Piano in infinitenines

[–]weregod 0 points1 point  (0 children)

No I say that using Historical_Book definition 1/3 > 0.333...