#programming

1 messages ยท Page 244 of 1

rigid snow
#

is it really that much better

glass flower
#

its fun for the first time you install linux LULE but... i don't need my vscode terminal to show it cut off

sick owl
obsidian mantle
#

i was shocked when i bought 240 hz monitor neurOMEGALUL i thought difference between 60 and 140 hz is not visible

#

not when i look at my old 60hz second monitor it feels like its in 20 fps

solid bough
#

It's time

#

That I do the unthinkable

sick owl
#

My old monitor was 360hz but I found that to be completely overkill

clear sedge
obsidian mantle
#

yeah 144vs240 is also much less visible than 60vs144

solid bough
#

I un-code the code, I unsort the sorted, Even worse: I scramble the unscrambled

#

Okay, my messages might have been a bit unhinged at the start...

clear sedge
sick owl
#

The higher the numbers climb the smaller the difference

#

50 vs 60 is noticeable, 90 vs 100 you'd really have to squint

clear sedge
#

the inverse of decibels

solid bough
#

What the filtered filtered neurOMEGALUL

obsidian mantle
#

trained neuroSuperior

sick owl
solid bough
sick owl
#

120hz on OLED will beat many 240hz LCDs in input latency and motion clarity

solid bough
#

That is an unhealthy learning rate I guess

obsidian mantle
#

what do "test" and "train" actually resemble

#

im not sure i get it right

solid bough
obsidian mantle
#

yeah but where do train and test come from

maiden geyser
#

a victim of the burnt pixel

solid bough
#

Basicall: py train_loss = model.evaluate(x_train_mini, y_train_mini, batch_size=8, verbose=0) train_rmse = np.sqrt(train_loss) print("Train RMSE:", train_rmse) test_loss = model.evaluate(x_test, y_test, batch_size=batch_size, verbose=0) test_rmse = np.sqrt(test_loss) print("Test RMSE:", test_rmse) train_score.append(train_rmse) test_score.append(test_rmse)

solid bough
obsidian mantle
#

vedalNoted i comprehend nothing

#

you are training your model, so i guess it goes to "train"

#

but what is test

solid bough
#

I could just DM the maker neurOMEGALUL

#

no really

obsidian mantle
#

so it got it's parameters adjusted, then it tries to work and we have this rmse value

#

here we have train rmse after each "training" session

#

but who is test

solid bough
# obsidian mantle here we have train rmse after each "training" session

It is basically doing a loop for X epoches: ```py
for i in range(num_epochs):
print(f"Epoch {i} of {num_epochs}")
log_info(f"Epoch {i} of {num_epochs}", logg)
print_vram_usage()
print(x_train.shape, x_train.dtype)
print(y_train.shape, y_train.dtype)
model.fit(x_train, y_train, batch_size=batch_size, epochs=1)

# Evaluate using mini subset for VRAM-friendly training metrics
train_loss = model.evaluate(x_train_mini, y_train_mini, batch_size=8, verbose=0)
train_rmse = np.sqrt(train_loss)
print("Train RMSE:", train_rmse)
test_loss = model.evaluate(x_test, y_test, batch_size=batch_size, verbose=0)
test_rmse = np.sqrt(test_loss)
print("Test RMSE:", test_rmse)
train_score.append(train_rmse)
test_score.append(test_rmse)
model.save('Model.h5')
print("Model saved.")
plotscrores(train_score, test_score, 'Scores.png', True)
gc.collect()```
#

filtered

obsidian mantle
#

batch_size=batch_size mhm

solid bough
#

Just for kicks n giggles I wanna put one of the Sketches as a pre-selected sketch when the code starts

obsidian mantle
#

what "batch_size=batch_size" even does when you pass it as an argument

solid bough
#

I'm mostly just doing trial and error and that train session was not even the right data evilDeadge

obsidian mantle
solid bough
#

Just for kicks n giggles I tried... Uh... Images that I can't show here and it failed hard

#

before going to sleep

rough bloom
obsidian mantle
#

but cant you just send it "batch_size"

rough bloom
#

no, it would have to be a positional parameter then

solid bough
rough bloom
#

Python has both positional and named/keyword parameters for functions

obsidian mantle
#

so function doesnt have 4 arguments

#

its like foo(a,b)

solid bough
#

I might just sift through another 3K images evilDeadge

obsidian mantle
#

but we call it with foo(a,b,batch_size=batch_size)

#

or what

solid bough
#

And I tried as good as possible to have good amount of variation but also good data

obsidian mantle
#

or it has million of parameters and we dont need to specify each and here we tell it which is which

#

so in batch_size=batch_size on the left we have funcion's batch_size and on the right our batch_size we have here, not the function's internal one

solid bough
#

I'm real close to the VRAM max I set in code PH_sweatingpepe VRAM: 25.2 MB / 6095.4 MB | (2016, 5, 192, 144) float16 (2016, 3, 192, 144) float16 57/101 [===============>..............] - ETA: 4s - loss: 0.0316

rough bloom
# obsidian mantle its like foo(a,b)

Hmm maybe I explained badly
function parameters have names and sometimes also default values
if you don't specify the names in the function-call it is assumed that you are passing the parameters in order
but you can also specify them by name (like with the batch_size thing)

obsidian mantle
#

what the fuck is this

#

something is broken in my bot

#

quantum chess neurOMEGALUL

solid bough
#

I might need to be more strict on what faces I use evilDeadge

#

oh my god evilDeadge

#

And that are the sketches

#

I might as well spin up Francium again evilDeadge

#

shuni.ex wanna know what trips me up real good?

rough bloom
obsidian mantle
#

so now it just finds transposition of this position from previous search and returns it

solid bough
#

It's used nowhere

rough bloom
#

yes, I know
I already told you so like a week ago kek

sage crag
#

for osu 120hz oled is better than 240hz lcd

solid bough
sage crag
solid bough
#

dw, Francium is gonna keep me in check

#

Because since there is always a fluctuation of vowels which sort of forces me to clear the context I have in my head enough to not make me go wild.

#

In other words, I don't linger around with that thought that I need a long while on the sorting

#

Well, loads of images are getting yeeted if ANY amount of Background edges are detected (Dieter Bolen Get's a pass)

#

or if the face is not clear

midnight sigil
solid bough
#

Caibi am I insane that I listen to Francium while sifting through the roughly sorted images again to do fine sorting?

obsidian mantle
#

okok since they are optional it all makes sense

rough bloom
solid bough
# midnight sigil miku dayo

Well in a weird way Francium (Neuro cover) keeps me more sane than usual when looking closer if an image is suitable for training

trim valve
#

i personally make all my functions in python like this ```python
def my_func(/, a, b, c):
...

to make sure nobody uses those pesky keyword arguments
solid bough
#

I loosely use them in my Text Covnerter

midnight sigil
trim valve
#

uuuh

midnight sigil
#

/ works for arguments before the keyword

trim valve
#

am i misremembering

midnight sigil
#

yep I'm right neuroHypers

solid bough
#

Jesus christ that was a jumpscare for me

#

The base image looks normal though

manic jacinth
#

Looks straight out of an analog horror

solid bough
#

like wtf

solid bough
stray dragon
#

matplotlib smh

solid bough
#

Idfk, every time at the start it is a simple P2P connection and then turns to that

trim valve
#

I can never take the phrase "analog horror" seriously anymore lol

solid bough
midnight sigil
solid bough
midnight sigil
solid bough
#

or like 10

#

sure I used only 630 with flipped version (aka doubling that then) but damn

#

and that with like 4 samples of that image

midnight sigil
solid bough
#

Well, it's then time to maybe even sift through 10K images crying_skull

#

RIP my evening

sick owl
#

This screen fills me with irrational hatred

#

He even has a fedora on

#

The bastard

solid bough
proud ivy
midnight sigil
solid bough
#

But Francium (Neuro cover) keeps me somewhat in check

#

And since I have quite a lot of images like that, I loose a ton of images then due to that

#

That is my mood rn

solid bough
#

of the 630 crying_skull

#

But finally that kind of curve stopped happening:

solid bough
stray dragon
stray dragon
stray dragon
solid bough
#

Like pretty agressive I guess

stray dragon
#

i guess old machine learning thing, so old optimizer

solid bough
#

All that potentially could happen is that it goes horribly wrong

stray dragon
#

not sure what happens past that though

solid bough
#

That's what I'm doing rn

#

Just trial and error pretty much

#

And the line turned to a saw like shape initially

stray dragon
midnight sigil
solid bough
#

Basically what I did was putting the "Model.h5" as "pre_model.h5"

solid bough
#

Idk why I changed it... OH JESUS

solid bough
nocturne olive
stray dragon
#

very common tbh

solid bough
midnight sigil
#

can't read linear

solid bough
#

Either the faces weren't clear enough, there was stuff in the background, Or the quality like is like an Atari

nocturne olive
solid bough
nocturne olive
#

No that's just a normal thing

stray dragon
solid bough
#

Well, I just yeeted the pre-trained model through the learning process again

#

Like I train it the 2nd time now

stray dragon
#

stochastic gradient descent is an algorithm that adds random offsets to the weights to test how the performance of the model changes in response, and then it adjusts the parameters based on that data

#

since the changes are random, you should expect that at least some cause a lot more loss

solid bough
#

Time to check the model mids training

#

Holy, finally some sharp ish edges

stray dragon
# solid bough Well, for kicks n giggles I also wanna try to Re-train a model

i've seen some papers where instead of randomly initializing the weights of a large model and training from scratch, they train a smaller version of the model (with randomly initialized weights) to a certain point, and then upscale the weights to full-size somehow and train the full-sized model to completion

midnight sigil
stray dragon
#

speeds up training process but final result was a bit worse than the model trained from full-size at the start

midnight sigil
#

replace plt with your plot graph obviously

solid bough
#

Oh, I appreciate your help evilsHug

#

Btw, is that supposed to happen every loop?

midnight sigil
#

you can also use early stops in pytorch to fasten and stabilize the training progress neuroPogHD

obsidian mantle
stray dragon
obsidian mantle
#

is it for safety

stray dragon
#

no, you forgot a )

obsidian mantle
#

no i didnt

midnight sigil
obsidian mantle
#

wait

stray dragon
#

max() terminates properly, but then evaluate_moves( isn't ended

midnight sigil
stray dragon
#

wait no

obsidian mantle
#

next line

stray dragon
#

next line

obsidian mantle
#

right right i didnt notice myself too neurOMEGALUL

solid bough
#

That is now the scale, but idk if it chaned the form...

obsidian mantle
#

so max doesnt want int and uint64 because if int is negative it will give weird results

#

they are always positive i want tokens neuroCry

midnight sigil
#

max works on all data types which support <

#

this shouldn't be an issue

#

did you specify namespace std

obsidian mantle
#

this compiles

#

no im using namespace std glueless lets try

#

it was std

#

i can specify std:: even if i still have "using namespace std" right?

#

this compiles thonk it really doesnt want to compare uint64 and int

midnight sigil
obsidian mantle
#

come on g++ i know what these numbers are neuroCry dont limit me

#

anyway, i just thought, this is a bad solution.. i need it to be max (time, 700) and its too much

solid bough
#

Imma restart the code up to 5 times on train.py rq

obsidian mantle
#

it has to be depth limit

midnight sigil
#

clang would give this a warning at compile time NeuroClueless

solid bough
#

caibi should I have at least 500 images?

midnight sigil
#

I guess max can't do compare with unsigned and signed

midnight sigil
solid bough
#

oh god

#

I could try to increase the samples per images

obsidian mantle
#

the int which could cause problems while being negative, will never be negative in this specific situation since im constanting it

#

max should check what arguments its getting smh

rigid timber
#

well it's C++, what do you expect

solid bough
#

Hi toast.๐Ÿ”ฅ evilsHug

opaque sigil
#

sup

solid bough
olive sable
#

Surely

solid bough
midnight sigil
solid bough
#

Well, I can look what I can do

obsidian mantle
#

but it defaults to int

midnight sigil
solid bough
obsidian mantle
#

im doing this neuroDeadge

solid bough
#

It's after the second run still like someone that lost their glasses

obsidian mantle
#

should i do g++ -O2

obsidian mantle
#

no way that is 1 token right? glueless

midnight sigil
#

so on

midnight sigil
#

also use clang smh

#

faster binary

#

my python can only do 5000 nodes per second

#

I'm thinking of moving to C++ or do CPython magic

solid bough
#

Remember that?

opaque sigil
solid bough
opaque sigil
#

nice

solid bough
#

as said, the VAST majority of the 630 images had bs in the background

olive mango
#

man:
WA test 1
MLE
WA test 23
kill me ๐Ÿ˜ญ

solid bough
olive mango
#

havent got the skills to code like yall

#

im only grade 9

solid bough
solid bough
olive mango
olive mango
obsidian mantle
solid bough
obsidian mantle
#

or is it o2

olive mango
solid bough
#

aka: I downloaded the code and then made it run in Python 3

olive mango
#

or for a tournament, just bring the fish

opaque sigil
solid bough
olive mango
#

guys when can i upload image

midnight sigil
olive mango
solid bough
obsidian mantle
#

clang doesnt want dynamic range arrays

olive mango
opaque sigil
obsidian mantle
#

WHY IS IT NOT

olive mango
obsidian mantle
#

i know its dangerous

#

i know its absolutely safe in my implementation

opaque sigil
#

You'll have to declare it then memset

midnight sigil
#

oh no not the heap

#

๐Ÿฅ€

solid bough
#

Welp, Imma be answering late for a long long time, Because Imma just not look if the 10K images look to the camera and do it straight on filtering on the edges filtering

obsidian mantle
#

??? does it allocate memory for array before the function who creates the array is called

#

what if i call it 5 billion times

opaque sigil
obsidian mantle
#

does it allocate 5 billion arrays

#

no it doesnt

sage crag
#

wrrrr

#

wrr

#

wrrrrr

#

wrr

#

wrr

obsidian mantle
#

its just stupid or im not seeing something

midnight sigil
sage crag
obsidian mantle
#

konii hi explain why i cant use variable to initialize array

sage crag
#

hi show me

solid bough
#

7Zip is choking on the big 7z file

opaque sigil
#

You can declare but not initialise

#

Go ask the committee why

sage crag
#

do you mean like:

int a[] = {1, 2, 3};
int b[] = a;

?

opaque sigil
#

VLA

sage crag
#

its because arrays can only have static initialisers

obsidian mantle
#

len_submoves does not change in this scope

sage crag
#

doesnt matter

obsidian mantle
#

its literally constant in this scope

sage crag
#

any array can only have static initialiser

#

doesnt matter

obsidian mantle
#

constants are invented by pussies

#

cosmetic shit

sage crag
#

a = b is a nontrivial operation for arrays

#

it requires a memcopy and an allocation

obsidian mantle
#

i can write into any constant anyway whats the point

#

to make me waste tokens

solid bough
sage crag
olive mango
#

guys

#

brainrot words arent allowed right?

sage crag
#

yes

olive mango
obsidian mantle
#

so it allocates array of the size i wanted

#

then fills it with 0

opaque sigil
#

standard says no

sage crag
#

yes

#

well

#

it does

opaque sigil
obsidian mantle
#

whats the problem then

sage crag
#

depends where you declare the array

opaque sigil
#

Must initialise manually

midnight sigil
#

"Because that's dangerous tehe ๐Ÿ˜‰"

sage crag
#
int erm[];

int main() {
  return 0;
}

erm here is a global and zeroed

obsidian mantle
#

so this is not allowed but 1/0 is allowed

solid bough
# solid bough I'm doing more filtering now <:evilDeadge:1150735483396161586>

nvm: Traceback (most recent call last): File "e:/temp/datagen.py", line 88, in <module> main_datamaker() #for investigating the sketches File "e:/temp/datagen.py", line 33, in main_datamaker x_data = np.empty((num_samples, num_channels, image_h, image_w), dtype=np.uint8) numpy.core._exceptions.MemoryError: Unable to allocate 256. GiB for an array with shape (3313464, 3, 192, 144) and data type uint8

sage crag
obsidian mantle
#

i tell it how much of a size i want

#

len submoves lives the same life as the array itself

sage crag
#

having a size doesnt change whether its global or not

sage crag
#

lifetimes dont exist in c

obsidian mantle
#

its deallocated when function exits is it not

sage crag
#

doesnt matter

#

only const can be used as length

#

because lifetimes dont exist in c

obsidian mantle
sage crag
#

its deallocated, but c has no concept of lifetime

opaque sigil
#
int main() {
  int erm[variable] = {0};
  return 0;
}

committee angy

int main() {
  int erm[variable];
  memset(erm, 0, variable*sizeof(int));
  return 0;
}

committee happi

sage crag
#

also its only deallocated if its a stack array

obsidian mantle
#

tell me ONE example of where construction like this can cause any problem at all
int a = 5;
int b[a];

#

there are none

#

cosmetic shit

sage crag
#

this is just wrong

#

lol

#

its unclear whether a is const or not

#

so should the compiler initialise a and then do a computation on the stack?

#

or should it alias it and do it at comptime?

#

there are implications to everything you write in a systems language

#

dont blame it for not having syntax frills that dont make sense vedalSTARE

obsidian mantle
#

in this scenario it doesnt matter

#

pick any

#

mr compiler

sage crag
obsidian mantle
#

just pick any and give warning

#

like g++ does

sage crag
#

that's stupid

opaque sigil
#

a sufficiently smart compiler should glueless

sage crag
#

if it can be a footgun it should be an error

sage crag
obsidian mantle
#

compilers do random shit anyway all the time

#

i mean different compilers

sage crag
#

they do it according to specification

#

there is a specification

#

and for your knowledge,

#include <string.h>

int main() {
    int a = 5;
    int b[a];
    memset(b, 0, a * sizeof(int));
    return b[0];
}

this works just fine in c

obsidian mantle
#

is it true that clang gives faster binary than g++ as caibi said

obsidian mantle
#

thonk no?

sage crag
#

clang and gcc are different compilers

obsidian mantle
#

they both give identical output?

sage crag
#

gcc will perform better on some programs and clang on others

sage crag
#

clang is more modern and will do better with complex programs than gcc but gcc has the benefit of being mature

obsidian mantle
#

i get it , so if anything is not specified in specification they do it as they like
if specified - strictly follow

sage crag
#

doesnt matter which one you use but it does matter if your program is so awful it doesnt work on both

obsidian mantle
#

except g++ doesnt follow it by compiling my a[b]

sage crag
olive mango
#

just kill me, i use python

obsidian mantle
#

its compiled

#

no compiler needed anymore

sage crag
#

program not binary

opaque sigil
#

pedantic restricts it to the feature set guaranteed by the specification

sage crag
#

pedantic means you arent using some weird quirk of your c compiler in your program

opaque sigil
#

so it should work with every compiler that implements the spec properly

solid bough
#

toast to increase my speed of filtering the images, I do it in passes on one specific thing only now

obsidian mantle
#

ooh you mean so i see if my program will 100% compile on any compiler.
regardless of current successful build

sage crag
#

no, it means if it compiles on one c compiler it will compile on any c compiler

#

pedantic means:
compile here => compile everywhere

solid bough
sage crag
#

no pedantic means
compile here => dunno if it works anywhere else

obsidian mantle
#

does it work cross platform too

sage crag
#

platforms are a different matter

#

they arent defined by the c spec

obsidian mantle
#

then pedantic only guarantees that it will compile on any compiler on this specific platform

sage crag
#

as long as your program uses platform agnostic libraries it shouldnt be an issue

sage crag
#

it doesnt guarantee anything about platforms

#

the c spec doesnt mention platforms

#

its a language spec only

obsidian mantle
#

so if i compile my program with g++

#

and use pedantic

#

it will not compile

sage crag
#

g++ is gcc

#

g++ is gcc for c++

obsidian mantle
#

wpedantic pedantic

sage crag
#

i dont remember evilShrug

#

use both

obsidian mantle
#

it gives warning

#

but still compiles

#

like it should

#

i want a warning not an error ๐Ÿ˜ก

sage crag
obsidian mantle
#

if its a warning it should be a warning

#

anyway

#

how do i fix it

#

cast into const or smth?

sage crag
#

dont cast into const just define the length as const neuroCry

#

int len_submoves โŒ
const int len_submoves โœ…

#
poll_question_text

have you read the deep doodle source code (python 2)

victor_answer_votes

2

total_votes

4

obsidian mantle
#

its a function input

#

which is a variable

sage crag
obsidian mantle
#

it will change between function calls

sage crag
#

thats a variable length array

#

make it a const parameter or

#

use the heap

obsidian mantle
#

im literally using it neuroTomfoolery

#

so you suggest.. to define it as array[500] for example

sage crag
obsidian mantle
#

and throw error when its above 500

sage crag
#

what are you on about

obsidian mantle
#

i want array

#

i want the array to have unlimited potential size

sage crag
#

you cant do that on the stack

obsidian mantle
#

but i dont need it to be unlimited in every time

sage crag
#

you will overflow it

#

use the heap

obsidian mantle
#

is it slower

sage crag
#

allocating on the heap is negligibly slower

#

better than running out of stack

obsidian mantle
#

then fuck the police im not doing that

#

why would i run out of stack

sage crag
#

you may have stupid

sage crag
obsidian mantle
#

if i could do this
int a = 5
int b[a];

#

i would not have problems at all

solid bough
#

Where is the neck? evilDeadge

sage crag
#

that is an array allocated on the stack

opaque sigil
#

just increase the stack size glueless

obsidian mantle
#

and deallocated in 30 lines of code

sage crag
obsidian mantle
#

no

sage crag
#

do you call any recursive functions in that function?

obsidian mantle
#

no

sage crag
sage crag
obsidian mantle
#

i used to have recursions though in previous versions

#

how would that cause problems

#

new function call allocates new array

#

stack is 16kb???

sage crag
#

even less

obsidian mantle
#

i thought its ram NeuroHuh

sage crag
#

you as a programmer dont deal with RAM

#

you deal with program memory

#

stack or heap

#

stack is the preallocated memory your program gets when it is created

#

barring some situations the stack never grows or shrinks

obsidian mantle
#

so wait, if i declared it as const, it would still be in stack?

#

or no

sage crag
#

...

#

its an array in the stack

#

regardless of what you use, int a[] = {} or int a[100]; or whatever

#

its an array in the stack

obsidian mantle
#

so if i have int a[100] and function called recursively 1000 times i will run out of stack and crash

sage crag
#

yes, for a simple example

#

the only time stack is freed is when the function returns

#

firstly, dont allocate or create arrays in recursive functions vedalSTARE

obsidian mantle
#

they are small

sage crag
#

doesnt matter

obsidian mantle
#

then i cant allocate any variables at all

sage crag
sage crag
obsidian mantle
#

lets say its not int a[100]

#

but 100 different ints

sage crag
#

typical variables are stored in registers

#

not on the stack

sage crag
#

you are a competent programmer

opaque sigil
#

See that's where you're wrong

sage crag
obsidian mantle
#

why is stack so small

sage crag
#

because every program gets the same amount of stack

obsidian mantle
#

why

sage crag
#

and you may have thousands of programs running at once

sage crag
obsidian mantle
#

just use ram

sage crag
#

...

#

stack is ram

obsidian mantle
#

both heap and stack are ram are they no

sage crag
#

the kernel manages ram

obsidian mantle
#

i have 64 gb ram

sage crag
#

ok?

obsidian mantle
#

use it man why 16 kb

sage crag
#

...

#

ok so

#

you give a program all 64 gigs of your ram for stack

obsidian mantle
#

no

sage crag
#

oops you can no longer open any more programs

trim valve
obsidian mantle
#

i give it as much as it asks

sage crag
#

there is no "asking" for stack

obsidian mantle
#

when it allocates it takes some ram

#

deallocates - frees

trim valve
#

resizeable stack, pls invent konii

sage crag
#

stack is allocated before the program starts

sage crag
obsidian mantle
#

can it cause problems with fragmentation?

sage crag
#

the way stack allocation works is with a pointer incrementation

#

it requires contiguous memory

trim valve
obsidian mantle
#

i get it

sage crag
obsidian mantle
#

noow it all makes sense

trim valve
#

enub so everything must go on stack

sage crag
obsidian mantle
#

it cant use 2 chunks in corners of my ram

sage crag
#

yes this is the most basic aspect

noble zodiac
#

it as nothing to do with fragmentation

obsidian mantle
#

the arrays must be contiguous in memory

sage crag
#

well, that's not true

opaque sigil
#

Is the stack even guaranteed to be contiguous in physical memory

#

I don't remember

obsidian mantle
#

doesnt matter

opaque sigil
#

I guess it's 4 pages

sage crag
#

only virtual memory

tender river
#

technically stack can grow through the kernel lazily mapping its pages

obsidian mantle
#

virtual memory != physical memoroy vedalNoted

sage crag
#

virtual memory is what you deal with

#

you never use "RAM"

#

you use heap or stack

obsidian mantle
#

ok then what happens when i declare a[50000] (const)

#

anywhere

opaque sigil
#

You get that

obsidian mantle
#

stack is 16k i want 50k

#

ohh

#

wait

opaque sigil
#

well nothing is going to happen until you actually use it

obsidian mantle
#

what about "all programs get equal"

sage crag
obsidian mantle
#

so i literally cant have int a[50000]

sage crag
#

you can, it will just overflow the stack and crash the program if you write in it outside of the stack bound

obsidian mantle
#

i want to initialize it of course why would i make it that big otherwise

#

i will test it PauseSama

sage crag
opaque sigil
#

There's nothing stopping you from writing into uninitialised memory as long as it belongs to you

sage crag
#

correct

sage crag
opaque sigil
#

What about -O0

sage crag
#

it obviously work on -O0

obsidian mantle
#

nothing happens program works

sage crag
obsidian mantle
sage crag
#

pls neuroCry

obsidian mantle
#

๐Ÿฅบ

opaque sigil
#

It returned 0

sage crag
trim valve
#

it decided your function was cringe

noble zodiac
#

the compiler will ignore what you write if it does nothing of substance

obsidian mantle
#

WHAT

sage crag
#

basically your program was garbage

noble zodiac
#

its called optimization

sage crag
#

and the compiler decided to erase it

obsidian mantle
#

??????

#

no way

sage crag
#

yes its called optimisation enub

noble zodiac
#

shit guys, the jig is up, he called our bluff

obsidian mantle
#

no warning no nothing?

#

this is so funny neurOMEGALUL

trim valve
#

why would it warn you

#

it still works

obsidian mantle
#

rebel of compilers, he doesnt want to compile what i told it to

trim valve
#

it's just faster

sage crag
trim valve
#

don't you want fast?

tender river
#

no warning the compiler is allowed to erase code that wont do anything or does behavior that cant be relied upon

obsidian mantle
#

what do you mean it works

#

it erased my code

trim valve
#

it does what you asked it to do

noble zodiac
#

yes because your code did nothing

opaque sigil
#

It's the same outcome

sage crag
noble zodiac
#

so why keep it

opaque sigil
#

Semantically equivalent

trim valve
#

its a function that does nothing and returns zero

#

so it made a function that does nothing and returns zero

tender river
#

c isnt assembly neuroBucket

obsidian mantle
#

ohhhh you mean if i do something useful it will crash stack overflow?

trim valve
#

tias

obsidian mantle
#

i want to test a[50000] causing stack overflow

sage crag
#

here is what happens if i compile it without -O0

sage crag
obsidian mantle
#

does -O stand for "optimization"

opaque sigil
#

I need that font

sage crag
#

SIGSEGV (Address boundary error) -> we wrote outside the memory the kernel gave to us, therefore program is kill

sage crag
opaque sigil
#

Oh right

#

That one

sage crag
#

i like it

#

similar to fantasque sans mono

#

and comic code i guess

opaque sigil
#

Is nice

obsidian mantle
#

it still works NeuroRage

#

oh wait

#

it wasnt compiled

opaque sigil
#

Less stylised if that's the correct word

obsidian mantle
#

because its clang

sage crag
sage crag
#

also it has a font package on nixos

#
fonts = {
  enableDefaultPackages = false;
  packages = with pkgs; [
    annotation-mono
    noto-fonts
    noto-fonts-cjk-sans
    noto-fonts-emoji    
  ];
};
opaque sigil
#

I just saw

sage crag
obsidian mantle
#

it still works if i compile it like that

#

so what do i even do? use vectors?

noble zodiac
#

use the heap

obsidian mantle
#

how

noble zodiac
#

malloc

obsidian mantle
#

use_heap(please)

tender river
#

its not c

#

its c++

opaque sigil
#

vector

tender river
#

so yes vectors

obsidian mantle
#

so vectors are slower than arrays vedalNoted

noble zodiac
#

how dare you disrespect malloc, kinda rude

obsidian mantle
#

konii said heap is slower than stack

#

vectors heap arrays stack

sage crag
#

no

#

allocating on the heap is slower than allocating on the stack

noble zodiac
#

allocating on the heap is slower

sage crag
#

the heap is the same speed as the stack

obsidian mantle
#

yes im going to do many allocatings

sage crag
olive sable
noble zodiac
#

no, you allocate your array once and then only assign values within the already allocated memory

#

different things

obsidian mantle
#

actually i can just declare a[500] array hoping i will never get 500 legal moves

#

however...

opaque sigil
#

Wasn't there a hard cap

#

218 or sth

sage crag
#

which

#

is bad NeuroSip

obsidian mantle
#

how big is this i dont understand

sage crag
#

24

obsidian mantle
#

bytes or

sage crag
#

24

tender river
#

if you're optimizing for tokens you gotta use globals either way

obsidian mantle
#

24x64?

#

bits

#

24x8

sage crag
#

24Ui64 just means its the value 24 stored inside a uint64

obsidian mantle
#

array[500] will take 100 kb its over

#

oh

#

so 24 bytes (its sizeof(Move))

sage crag
#

500 things, each of size 24

#

do the maths

obsidian mantle
#

i thought its not 24

#

i thought its 24x8

#

+int which is 4 bytes i assume

#

28x500

#

12k ...... alot

#

ALSO I DONT WANT TO ALLOCATE THAT MUCH

#

usually its just 10-20

opaque sigil
#

I found it

sage crag
obsidian mantle
#

i cant this is stupid

sage crag
#

then dont

opaque sigil
#

218 is the max

#

there you go

obsidian mantle
#

max moves per board in chess?

opaque sigil
#

Not that it'll ever come up

tender river
#

just use globals evilGutter

sage crag
#

correct

obsidian mantle
#

globals yes nice idea i'll do that

opaque sigil
#

max number of legal moves you can have

obsidian mantle
#

will it allocate this array somewhere else not in stack

solid bough
#

What is the chance that the right arrow key is gonna die first on my keyboard? blurry_eyes

sage crag
obsidian mantle
sage crag
#

well

#

you are allocating another one

obsidian mantle
#

i feel programmism flowing through my veins after this conversation

sage crag
#

so you have the same problem still

obsidian mantle
#

oh

noble zodiac
#

that is, as the kids say, truly unfortnite for you

obsidian mantle
#

yes there are 2

noble zodiac
#

sure do

#

go ask them

sage crag
#

wrrr

#

god i hate programming

tender river
#

neuro cat mode on

opaque sigil
obsidian mantle
#

is this good

sage crag
#

no

#

explode

obsidian mantle
#

neuroCry whats wrong

#

it doesnt work without -c

sage crag
#

why are you using it

#

-c outputs an object file

obsidian mantle
#

this is why

#

ooh wait

sage crag
#

what are you using to link it

obsidian mantle
#

full command

#

im linking to c

#

.o

sage crag
#

linking to c isnt .o

#

thats just linking

#

why are you even using object files instead of the c src files neuroCatUuh

obsidian mantle
#

thats how shiro is going to do it i think

#

i forgot why

sage crag
#
g++ -O3 -Wpedantic bitboard.c chessapi.c cpp_bot_test11_negamax.cpp -o cpp_bot_test11_negamax
tender river
#

wont necessarily work since shiro uses c extensions not supported in cpp

obsidian mantle
#

interesting

#

i know why

#

because i guilt .o

#

with gcc first

#

because something didnt work

sage crag
obsidian mantle
#

and now i use g++ to link

sage crag
tender river
#

not for c files

#

i think

sage crag
#

er

#

maybe

#

dont rember

tender river
#

c++ is best considered a separate language from c

#

less surprises that way

sage crag
#

true

#

neuroCatUuh i hate programming

tender river
#

cppreference says

Every function type, every function name with external linkage, and every variable name with external linkage, has a property called language linkage. Language linkage encapsulates the set of requirements necessary to link with a program unit written in another programming language: calling convention, name mangling (name decoration) algorithm, etc.

sage crag
tender river
#

extern "C" only used to change "linkage"

sage crag
#

g++ is gcc in a trench coat anyway

olive sable
opaque sigil
obsidian mantle
#

my bot gets super bad move on depth3 iteration and stops depth4 because takes too long
what is proper mechanism to stop iterations

#

so bot manages to finish game in 1 minute

#

i give it "timeleft/60" per iteration

tender river
#

dont ask why -d0

obsidian mantle
tender river
#

wait why

#

why is cpp a separate binary from g++

obsidian mantle
#

so is this good or no

#

what is o3

#

optimisation?

tender river
#

it works just keep it

#

yes

#

O3 not o3 though

obsidian mantle
#

they are different?

tender river
#

important since -O is optimization options and -o is output file name

obsidian mantle
#

it takes both

#

-o3 is output file?

sage crag
#

reproducible build

tender river
sage crag
tender river
obsidian mantle
#

what if i have -o3 and then -o file.app later

#

it ignores -o3?

tender river
#

maybe

sage crag
obsidian mantle
#

i dont have "3" file even though i built it with -o3 before

#

nvm it might have been error-build before

tender river
sage crag
opaque sigil
sage crag
solid bough
#

vituha did you ever wonder what images I consider as bad images for traingin? Something like that is not good:

opaque sigil
#

Unless it's a nix thing that they're separate?

obsidian mantle
#

i did wonder yes

solid bough
obsidian mantle
#

and the guy on background

opaque sigil
#

I'm talking about something else enub

solid bough
obsidian mantle
#

are there no "ai training database faces" out there

tender river
opaque sigil
#

Hmmm

obsidian mantle
opaque sigil
#

Maybe I'm just misremembering

#

Or it's a clang thing only

sage crag
#

clnang

obsidian mantle
#

so is clang giving faster file or no

#

compared to g++

sage crag
obsidian mantle
#

i forgot

#

you said no

tender river
#

doesnt matter in practice, wont be too different

obsidian mantle
sage crag
#

between gcc and clang the performance is very similar

obsidian mantle
#

i get really inconsistent depth search durations

#

depth1 is 10 ms
depth2 is 50 ms
depth3 is 1 ms
depth4 is 2500 ms
depth5 is 30 ms
depth6 is 30 ms

sage crag
#

sound like bug

obsidian mantle
#

it finds transpositions

#

i assume

#

like, wtf is this..

#

max depth was 8 but it stopped at 7 ply??

#

yeah must be a bug neuroCry

#

is == two tokens

#

im talking about
x == 0
x < 1

trim valve
#

is "idk check" an ok answer

obsidian mantle
#

basically i dont care if its 0 or below 0

#

theoretically it cant be less than 0

trim valve
#

if you really care about tokens wouldn't if (!x) be better

obsidian mantle
#

it would vedalNoted

sage crag
trim valve
#

true

#

they should invent reverse guard clauses

sage crag
#

rrr

worldly plank
trim valve
#
int func(int arg) {
  if (check(arg)) {
    goto func_check_ok;
  }
  return -1;

func_check_ok:
  /* ... */
  return 0;
}
opaque sigil
#

== should be 1 token

sage crag
#

it wasnt with whatever we were using before

opaque sigil
#

Hmm

#

Really

solid bough
#

Why did I stumble across 3 Steve Jobs images already NeuroRage

opaque sigil
#

Well he is a famous person enub

solid bough
sage crag
trim valve
#

good idea

#

we need this pronto

sage crag
#

no this works

trim valve
#

can you pr that to the linux kernel

sage crag
#

ye ok

trim valve
#

it would save at least 1 byte somewhere

opaque sigil
#

Why the double pointer

#

Does 1 not work

sage crag
#

nope

opaque sigil
#

Interesting

sage crag
sage crag
#

its a label not a value

solid bough
#

toast, I interrupt for now just that one time now while I sift through the images, I can't make a model with 10K images

opaque sigil
#

The label still represents an address

sage crag
#

just be careful not to type goto **out;

sage crag
#

it represents control flow

sage crag
#

otherwise you get something or other

trim valve
#

smh konii why isn't your stack executable

sage crag
opaque sigil
sage crag
#

the double ref is required tho

opaque sigil
#

Interesting

sage crag
#

this technique is called computed goto

#

its used a lot in interpreters

opaque sigil
#

I remember there was a way to force a segfault in the compiler with something like this

sage crag
#
void *ops[] = {
  [vm_exit] = &&exit, [vm_print] = &&print,
};

int pc = 0;
goto *ops[bytecode[pc++]];

exit:
  return 0;
print:
  printf("hello, world!\n");
  goto *ops[pc++];
tender river
sage crag
#

computed goto is pretty size heavy

#

its faster than a switch in some cases but it requires a big ol table

trim valve
#

๐Ÿ˜”

sage crag
#

i use it in my vm

trim valve
#

4 frame anubis jumpscare

#

devious

sage crag
#

who even is this random girl neuroCatUuh

trim valve
#

very hard challenge right there

tender river
#

rrrr_mdr

sage crag
#

anubis presumably

tender river
#

๐Ÿ‡ซ๐Ÿ‡ท

trim valve
#

its not me either

sage crag
#

not me either

solid bough
#

What is that about?

sage crag
tender river
#

Making sure you're not a bot! vedalMagnify
Done! Took 16823ms, 1 iteration

olive sable
trim valve
#

mandatory 10 minute reconsideration period before viewing hblang

sage crag
#

hbvvmmmm

#

fastest hbvm implementation

#

in da world

olive sable
#

only a human would have the patience to wait 10 minutes, surely NeuroClueless

sage crag
#

i challenge anyone to make a faster version

tender river
#

git rerere

sage crag
#

its about making them really expensive

olive sable
#

i see

sage crag
#

it has the effect of reducing the web crawler traffic because it costs more

#

but its more of a "im shooting you" than "please leave"

olive sable
#

i have to do my blender homework NeuroBounce

tender river
#

konii american

sage crag
tender river
#

cheese powder

trim valve
#

smh anubis too fast I can't get a screenshot of how fast it goes

#

scheese

sage crag
#

seese chamwich

olive sable
trim valve
trim valve
#

ig chrome can throttle cpu

olive sable
#

i know that for firefox you can test different patato settings

trim valve
#

where is the settings menu on a potato

olive sable
#

idk

#

i dont have a patato with me

trim valve
solid bough
sage crag
#

must not have cooked them properly

sage crag
#

unhand me

solid bough
maiden geyser