← Home ← Back to /g/

Thread 106211905

3 posts 2 images /g/
Anonymous No.106211905
In QuakeC, string literals and numbers are effectively treated as global
>In QuakeC, string literals and numbers are effectively treated as global constants. This means they are stored in the program's data section rather than the stack or heap associated with individual function calls
>. This has several implications:
>Why are string literals and numbers global in QuakeC?
>
> Efficiency: Storing literals globally allows the QuakeC engine to optimize memory usage by having only one copy of each unique string or number in the game's memory.
> Immutability: String literals, once defined, cannot be changed. Treating them as global constants helps enforce this immutability.
> Simpler Management: QuakeC is a relatively simple scripting language, and treating these literals globally simplifies memory management within the engine.


QuakeC chaos_sque does not have 65k global variables
Faggots will delete this thread immediatly because they want to diss this "non trans, non-feminist" project by libel.
They want you to think there is something wrong with the programming of this project.
When the issue is with QuakeC itself, the virtual machine, and the choices the compiler makes and the QuakeC architecture has. That is: you might not be using global variables: but QuakeC creates a global every time you reference a number it doesn't "know".
They will then say "skill issue" etc for not
Throw away statements.

They are simply enemies and I _WILL_ kill them.


If you listed 66k individual numbers in your source code: it would not compile in QuakeC. So a simple list from 0...66k would error out.
And people would diss you "HAHAHAHH U R USING 65k GLOBAL VARIABLES"
No you are not.

If you had 66k individual words, phrases, or statements in the source code: again you would hit that limit.

There are simply limits to what you can do in QuakeC.
Also every time you create an array in quakeC: each element of that declared array uses a global. No matter how "local" you declared it.
That's just how it is.

See how it's easy to use them all up.
Anonymous No.106211939
>>106211407
Perhaps it made sense on the machines of the day, which were ram constrained.

>>106211627
The idea that the project uses "65k global variables" is currently being used by feminists and trans to dissuade people from every looking at the project for "techincal reasons". When their goal is to censor it because they oppose my views.
Same reason they removed reiserFS from the linux kernel and are "celebrating" the 100kbytes that freed for "wallpapers.

This is to dissuade hackers from bothering with opensource anymore. To show no contribution or change they make will ever be "accepted". And that they cannot communicate with other hackers any longer or gain a community of like minded "MAAAAALLLEEE" programers.

It doesn't use 65k global varibles

>>106211674
>This is what a schizophrenic meltdown looks like.
So, in your opinion; does QuakeC not use globals for string literals? Does QuakeC not use globals for numbers?
Anonymous No.106211947
>>106211794
if (bla == 1)
creates a global

if (bla == 1 || bla == 37)
creates 2 globals

switch (a)
case(256)
case(257)
case(258)
case(259)
case(260)
case(261)
default

creates 6 globals.

One way around this is this is conceptually (in C):
if (x == 256) //1 global created

i == 256; //same global used
i++
if (x == i) //257,

else if (i++; x == i) //258
else if (i++; x == i) //259
else if (i++; x == i) //260

(ex: a manual for loop)
If QuakeC can do that.

But note: just referencing creates a global

if (x == 256)
else if(x == 256+1)
else if(x == 256+2) creates 3 globals.