#programming
1 messages ยท Page 190 of 1
trying to connect a convenient and easy-to-use interface to a UCI server is like trying to plug a puzzle piece into an outlet
this file is doing an incredible amount of heavy lifting
but it could probably be split into two parts if im being honest
just discovered i havent been incrementing halfmoves
that explains a lot
makes way more sense
Im test new this in this account soon this account will be autobot
Test complete again
Reaction โ
Add ai to this account
Embedded permission
Much more
It will do reaction only
( Now I have stop program)
someone please free() me

free(Shiro)
undefined reference to Shiro
"tf is a shiro" - compiler

why does it work for everyone else then

this paper managed to get-

500 elo?
..thats it?
ok
i think the move is
in case of stalemate
Yo @real sierra what about chess bot ?
Fine ,good , poor , or worst
fixed!
no mem was leaking though, it was other problems
i have never had a memory leak so far
๐
yet
Maybe I need update gpp from msys2 module
counting pieces with bitboards...
that's going in the bitboard library

no that's cheating 
Mem edit
the naive solution is to just loop over every position and do storedValue += i
๐

it works but its pain
OLD VALUE,+ NEW VALUE
๐คฏ
#include <bit>
#include <cstdint>
#include <iostream>
int main() {
uint64_t board = 0b101101...;
int count = std::popcount(board);
std::cout << count << "\n"; // prints 4
}
supposedly
fuck
#include <iostream>
using namespace std;
void Shiro();
int main() {
Shiro();
return 0;
}
im too used to c++
the chess programming wiki probably has some insane assembly implementation
is __builtin_popcountll also c++?
wait wtf is this
int popCount (U64 x) {
x = x - ((x >> 1) & k1); /* put count of each 2 bits into those 2 bits */
x = (x & k2) + ((x >> 2) & k2); /* put count of each 4 bits into those 4 bits */
x = (x + (x >> 4)) & k4 ; /* put count of each 8 bits into those 8 bits */
x = (x * kf) >> 56; /* returns 8 most significant bits of x + (x<<8) + (x<<16) + (x<<24) + ... */
return (int) x;
}
?
Let me explain to u ๐
k1-k4 are constants:
const U64 k1 = C64(0x5555555555555555); /* -1/3 */
const U64 k2 = C64(0x3333333333333333); /* -1/5 */
const U64 k4 = C64(0x0f0f0f0f0f0f0f0f); /* -1/17 */
const U64 kf = C64(0x0101010101010101); /* -1/255 */
idk how it works but im trusting the process
do a test i guess
๐พ
__builtin_popcountll should work in C
its a gcc and clang thing or something
MSVC has __popcnt64
It does
yeah anything __ or builtin is usually compiler specific
gcc and clang often share builtins
but its still bad practice to use them unless you account for multiple compilers
the upside of using the built in popcount is that it'll evaluate to the POPCNT x64 instruction which'll be faster than the biomass magic shiro found online
implemented it wrong

the 3rd line moves the & k outside the brackets
working now
ok
lets see how this fares
shiro you should sleep
oh shit
its playing the craziest chess ive ever seen

actually plays kinda insane
i wanna see another game of that
that seems pretty sensible no?
other than the dim knight
well theres still some bugs but this is good enough for me to play chess against already
i lost on time
it think fast
even if it dont think good
bot did its job, found a new bug
something with check checking
ok last thing before bed
i wanna see how this token counter works
spoiler, it doesn't 

if slay the princess uses renpy, and it doesnt have issues witht he fps being wrong, then did they customize the engine, or did a recent update break the rendersystem? maybe its cuz it runs locally that nobody notices its broken? its possible nobody purposefully set it to 30 fps

new clickfix instructions 
ddlc uses renpy

i played it when it came out, before i got to see any playthroughs
sayori was my favourite...
oh damn, you got the aurthentic experience
authentic nightmares
we're getting a DDLC maid cafe collab here
i closed the game at that scene and never opened the game again
are you participating
ไธปไบบ่ฒดๅฎ๐ซถ
ๅพไปๅคฉ้ๅง็่ถ
ไบบๆฐฃ็จ็ซ้ๆฒใๅฟ่ทณๆๅญธ็คพxๆ่ฎๅฅณๅๅๅกใ
็ฌฌไธๆณขๅพๆฌๆฅ้ๅง้ฒ่กๅโฅ
ๆณ่ฆ็ฒๅพ็ฑๅพก็จ็นชๅธซใใพใ ใใใใ่ๅธซ
ๅท็ญ็ๅฟ่ทณๆๅญธ็คพ็ฒพ็พๅจ้ๅ?
้ฃๆจไธๅฎไธ่ฝ้ฏ้ๆฌๆฌก่ฏๅ!!
ๅไฝๅฅณไธป่ง็ฉฟไธ็น่ฃฝๆ่ฎๅฅณๅๅๅกๅถๆ
็ดไธ้ใๅช้ใ่ซ...
yea i think there's one in korea too
dan salvato really had a golden goose
knowing the rest of the game that is rather ironic, since the only reason that event occurred is cuz monika wanted to spend more time with the player
are rust installs always this slow https://gyazo.com/d1a09def4140c2f14f09154e7a4ea66c.gif

im sure its fine
cargo space
random repository with a billion dependencies
hasnt been touched in 4 years
surely none of these are compromised 
my mcts code too big
but it nice to know token counter work
@real sierra this is the token counter
no not that
@real sierra https://github.com/RRethy/tcount/tree/master
??????????
Install rust ๐
????
Translate me please
^
Bro is albert einstein ๐คฏ
funny, "The clocks I made are genius, they make it easy to tell the time." genius clocks, me trying to figure out the time x "shia LaBeouf do it, just do it motivational speech / drake explaining to lil yachty" meme
Song: Mozart - Lacrimosa
#memes #meme #funny #funnymemes #shorts #zdak #cyall #genius #clock #time #i...
source identifier
-# Noted, if I get my NN done before chess is over, I should be able to easily be able to be under token limit as long as I don't mind doing some parsing first.
something something arbitrary length python ints
This AI was not trained on integrals sorry for your inconvience
oh, nvidia also fixed text encoding issues
How ?
Reason
Restart phone
Restart phone
it does respond to the sidebuttons so its not nonresponsive
Hold the side button for 10 secs
physically impossible without touch input
It will force it off
Hold (volume down + power button for 10 Second )
Or type !reboot in command prompt
did it finally give up
Without a keyboard 
for 10 what
i can hold down the power button for a full minute and it wont restart
that should work tho
no
Type of phone
Vol down plus power for 7 secs
Leave phone
volume down + power worked
Then try again
nah its fully charged that would take hours
it works again now tho
just needed to restart
Wdym command?
My phone doesnt have a console nor did the keyboard work

I might buy a new phone soon i guess
scrcpy
Too is soo use full
Close app
You cant close the system
You actually can
Close it bro and wait
Maybe not from this screen
Well yes but it just restarts again
Yup
cdawg canvas
we're listening to music
to covers i mean
uhh
Type !eilv
expect this to last one week
574 parameters
it's training rn
it's hyper oversimplified
i'm training on 100 million chess games rn
574 parameters too much
imposter among us
what's happening in https://discord.com/channels/574720535888396288/1067400152698077194 anyway
can you read bruh
scroll up a bit
or you can join and find out too
there's nothing "up" cro
๐
just neuro fm thing
here
i join and there's just music playing and some guy doing something on some chinese neuro wiki
Test complete feeding brainrot in llm
Ai making โ
Training -
Fixing after training -
Post traning -
Atleast I know that mods are sleep
this is fine
it's in relation to the flag drawing on the canvas
which is getting "bombed"
context is important 
Yo @rigid snow
Cloudburst getting pinged for no reason 
dont delete pings, makes it very confusing
it shows up as a ping but the message is missing
New Gumi? You mean for SynthV?
Well, I don't have SynthV nor can I run SynthV 2, even if I could afford it, so I've got no use for that
I'll just use NeuroSynth
its clipping i think
This is like 10hz tho so its not normal operating cinditions
Eh i dont feel like fixing it
bro went to war
can still hear gunshots

My old scooter
Gumi ? What is that'
Gumi is a vocal synthesizer
that sounds cool as heck

how do I shrink c code
to be fewer tokens
it's kinda hard to make it take up less space
I guess I use #define everywhere instead of functions?
what's the token limit shiro
what is a token
first step in any compiled and most interpreted languages is to parse the source code into tokens to form a syntax tree
where a token is a single unit of code that has some associated "meaning"
e.g. int x = (1+2)*3; --> ["int", "x", "=", "(", "1", "+", "2", ")", "*", "3", ";"]
yea i might be cooked then
as you can see the token count rises quite quickly
this is the pure forward function for a convolutional layer

surely some of those loops can be combined
and you just do arithmetic to derive the components
e.g. combining o and y
into say, oy
and then oy = 0; oy < (l->o)*out->h;
i need to do this
and o = oy / out->h; y = oy % out->h;
wait gif dead
I'm not suggesting changes to how your code functions
just changes to how it's written
also you might be able to implement this really efficiently using the bitboards the API will provide
then you could just slide a mask across it
wtf is this shit
now that's much more efficient
terrible choice of names tho
maybe remind it that variable name length doesn't affect lexer token count
I'm most likely using this to count tokens, if you want to check
Ye idk either
Anyone have a second?
javascript be like
even a billion of them, i hope
To spare I mean ;^ ^
I am following a guide on learning the baisics of python, when I noticed that I was being prompted with
"Python was not found; run without arguments to install from the Microsoft Store, or Disable this shortcut from settings > app > advance app setting > app execution aliases."
where do you get that message? in cmd? after typing "python"?
I got it both in my CMD and Python
but I got it after typing
python --version
in cmd
and just trying to run the project "Helloworldโค๏ธ" in python
"Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases."
install python from python.org and click whatever called "remove PATH length limit" during installation
have you tried reinstalling windows? /s
Re-installing windows? Wouldn't that wipe out everything?
If you do an in-place install no actually
how?
It turned out that the shell was giving me an option to either run it though the store or disable the shell prompt for the application.
Hello World โค๏ธ
What i will use next project
5
6
3
Or both
Yo sam !!!!!
sam is cooking somthing

I made a file that holds different media depending on the file name.
Thank you for watching!
Here's a polyglot file with pictures of my cat: https://p2r3.com/meow
This project is available on GitHub: https://github.com/p2r3/beheader
Join our Discord server! https://p2r3.com/discord
Sound design by @dustyhob0. Music used, in order of appearance...
Need summary
holy adhd
apparently files start with a bunch of information that tells the computer what to do with it, called a header
if you do some stuff with it you can make the file readable in multiple ways ig
True
idk the details but seems interesting
<iframe = "nun" >
ye it's called a polyglot file
Also true


yeahhhh

arg mentioned 
Hi colddddddd

Wrong reply message

So sad

๐ญ๐ข๐ฅ
bye guys im going to cry now
lookup tables 
haha
i was already using lookup tables
i just changed from using a for loop to directly embedding the goto inside the instruction macro
unrolled loops 
17kb virtual machine
do you have any cursed tricks for reducing token count
macros

macros
ye this the main performance improvement
instead of having a for loop with a continue i just inlined the dispatch inside the instruction
not exactly unrolling
more like the loop was an indirection and ive removed the indirection
its hard to describe since i dont want to make two operations
loop
if fuel == 0 goto ret
goto op
op
fuel -= 1
goto loop
ret
return
vs
goto op
op
fuel -= 1
if fuel == 0 return
goto next_op
but essentially im cutting out a jump at the cost of increasing the size of the jump table
which could cause bad cache things to happen, but in principle is better
so its likely platform dependant but it should be better on most x86 cpus


well it is only 265 lines
most of it is just instruction templates
my code only 200ish lines
what does it do 
its a virtual machine that executes a bytecode
you can think of it as an emulated cpu
i'd wager half of your file isnt macros though 
true 
ive been called a monster for this code but i dont see any problems with it 
that's the kind of c i'll open and just close immediately to go take a break
i assume macros are included in the token count tho
its actually very readable 

you think so?
let me run the preprocessor and get back to you
true...
i tried backreading but still have no idea what you are doing 

i have now confirmed the macros are compressing my vm to 10% of its uncompressed size

if anybody wants to read this 
remove typedef count again
ah i should have stripped the includes


is it not including the macros in the token count
i may have to ban macros if thatts the case
#define a 1 2 3 4 5
a a a a a
12 tokens ye
what does it all have to do with chess
ok correct token count was actually 22350
im working on a backend for a chess bot tournament that i plan to host
submitted bots will have a max token limit
@opaque sigil would you rather read the non-expanded or the expanded file 
why doesnt c expand sizeof(u8) to 1

expanded for shiro 
java dev 

not preprocessor
different compilation stage

its always annoyed me how sizeof is happy with whatever you give it
sizeof 5

sizeof u8
C
never crashes
not work sizeof type has to be sizeof(type)
but sizeof works on vlas so

annoying, sometimes runtime sometimes comptime
i sure would hope so
ligatures

i thought i turned them off
in theory i should make everything void pointers and access all properties via []
for min tokens
computing the offsets is going to be more tokens
instead of a->b->c you determine that c is at offset x from a and then do a[x]
but brackets only index in bytes if size of a is byte
what if sizeof(c) > 1


what if alignment shenanigan
do the compilers even let you do subscription on void*

c compiler does
does it just implicitly become a char* or what
i would post my code here so someone could shrink it ubt
i dont wanna share my bot code

not char since char is variable width
it treats it like an integer
so it just adds 1 (or whatever the platform dependant thing is i guess)
per platform i should note
check c spec and see if it says something about the minimum aliasing being 1 byte width
for all you know platforms could be addressable down to the bit
c probably has something to say about that though
its likely 1 byte (regardless of if char is 1 byte) to preserve consistency
i don't think i care enough to look at the spec
guess we'll never know
c isnt real 
here we go 
ye bitwise = () everywhere
pretty much
birb
managed to crash my computer whilst testing plugin compatibility fixes for IDA 9.2 excellent
๏ธ๏ธ
๏ธ๏ธ> IDA crashed immediately when I opened an old IDB presumably because of a bad plugin
๏ธ๏ธ> it tried to write a 1.5GB memory dump
๏ธ๏ธ> said memory dump contains code from TOneShell
๏ธ๏ธ> Defender goes off
๏ธ๏ธ> everything goes haywire
๏ธ๏ธ> blue screen
my remote computer crashed I can't recover it from afar
a description for a sick pig
or a famous pig
or a sick person who takes more than their fair share
and the plan is to give it bytecode which will be just 1 token?
or something like that
unrelated to chesss
oh
unrelated to chess
i just wanted to write a version of hbvm in c
that was tiny and fast
i mean
and freestanding
you could probably strip some opcodes out that you dont need
maybe you really could fit a chess bot in
thats fine
wait is it a valid strat though?
make vm that plays chess bytecode
chess-optimized hblang
its valid but not a good strat
in the challenge that inspired this, someone did write a vm
the vm performed concerningly well
better algo can be better than better performance
i may be >8x faster than python but its still too slow 
turns out its useful to be able to compress chess api calls to a single opcode
that only really works with stack vms
forth
register vms still require tokens for the operands
forth
string = 1 token
ye string banned
future me looking at the chess tournament submissions

i might write a novelty compression algorithm
or it should be
cant use built-ins for executing strings
but then again, what about languages like zig that have arbitrary length integers
ye
true...
but point stands
you can make arbitrary sized ml models
with strings
for cost of only 1 token
i mean
but if you make it, you can give it any length bytecode
upper limit is your ram allocation i suppose
if the string doesnt fit in memory then you're gg
it really not that hard
and the performance hinderance from working with a string doesnt ruin you
good tactic then

i will submit a program that is 99% string and 1% execution logic
it will embed a stockfish binary in the string
and then execute it

mprotect
dynamic linker
cant load string as dll either
string is byte array
it against rules to
create dll from string :tf:
cant read/write files either 
what is mprotect
its like chmod but for memory
changes access permissions
so you can give the string an executable flag
what about including arbitrary bytes in the string and then jumping to the string as a function pointer

can use linker attributes 
(joke)
ye this also true
what is the limit for tokens rn
__asm__("")
no library functions
comptime only

ye "" one string
C wtf
many lines cause \n
how many tokens is this
4
erf
erfs
what are you going to spend your free tokens on
train
๐
if your bot tries to run code out of strings using any kind of language feature, banned
you know what i mean
so no more machine learning models in strings


what about bytecode
not obvious
can i write an interpreter and then a very long bytecode string

ye ban string
byte array only

isnt it the same
token
strings...
i guess you dont really need them
only include names
in which case dont use string
why are we counting tokens
program size limit?
ye

what is the limit

not defined yet?
is that more or less than you expected
its code golfing territory
sebastian lague has 1024 tokens

is it maybe possible to hack the token counter to count each character inside of a string literal as a token
i need to sleep
dumb ideas
i dont really wanna modify the token c ounter
i want it to be easy for others to download and install
add rule that strings are banned 
thats also just super high effort to enabled strings
i probably do have to ban strings

cant have nice things
if the limit is 1024 anyway
itโs not much effort to check
but kinda true
if thereโs foul play
i just grep for quotes
but yeah ill hand-check most entries i think
to make sure nobody is being sneaky
this is very clear to me
โdonโt try to directly fool the token counterโ
yeah ill check for ` and ' and "
and of course check by hand anyway
thats just for quickly filtering

instantly visible by greping for quotes 
quotes are banned now 
quotes users...
look what you did
but no, you're submitting the source so you cant hide stuff in #defines
no
wont work
" not token
stoppie


people who wanted to store opening books as strings
shiro said preplayed
@real sierra
?
what'd i do

it actually works

true...
opening books wouldnt help anyway...
#include <stdio.h>
#define Q(x) #x
int main() {
printf(Q(erf erm));
}
ye arbitrary string
it work
still fine
time to hide this somewhere in my code
i ban all preprocessor except #include
no 
noee
shiro banned
this?
#x = 2 tokens?
no
#include <stdio.h>
#define Q(x)#x
int main() {
printf();
}
20 token
#include <stdio.h>
#define Q(x)#x
int main() {
printf("erm");
}
22 token
() must be its own token

#include <stdio.h>
#define Q(x)#x
int main() {
printf(0);
}
21 token

"" is a token
() not its own token
and erm is a token?

is "" still 2 tokens
why string quotes not two token

"abc" supposed to be 1 token
strings could be defined like this
string_ahead sdakhdkaskjdhakj
'' being counted as 2 tokens too
if preprocessor defs aren't included in the token count they should probably all be banned tho

they are
checked

preprocess first then submit
no
dw, I'll be using 128 bit encoded arrays for my strings ๐
then i just ban # from preprocessor defs
no stringify allowed
c need preprocessor to make up for

it stupid lack of generics
i see an issue
doesn't C have generics? I swear it does
Q(00001110101010101101010101010101010)
then you're banned

i feel like this is not that big an issue in practice
#erm uh
you can hide the string conversion but not the data
but what if its just a long macro 
preprocess and check for strings

check for "" after running preprocessor

also saves you from

not doing this for every single supported language
too high effort
i just eyeball it
only c
shimo
im going to embed a string in there non-maliciously and you will never find it

cpp in the clear 


well regardless please don't embed things against the rules in code im running on my computer 
nah thats too mean
thatโs crazy
math.h is pretty vital
#include <stdio.h>
malloc(1024)
``` โ lame
__builtin_malloc(1024)
stdbool.h also vital
force everyone to use a freestanding GCC 
might ban stdio
bye bye stdio
bye bye shiro
it harmless

doesn't really do much, we can just use syscalls.

not really
please do not run syscalls on my computer
requires you to:
#include <unistd.h>
#include <sys/syscall.h>
how about the asm directive?
also to
#define _GNU_SOURCE
code cannot do anything
ACE
arb code exe?
I think we're taking a big enough risk by just compiling and running others code tbh
too many ways to give strings to the system and get them run
its not supposed to be a risk but everyone here is so adversarial 

have to write a 500 page rule manual with every specifically banned feature
well, you could always require us to compile to WASM and then run it in a sandbox
thats a pain for the submitters
it all circles back to wasm
is it really


i dont think it is
i wanna make the contest open to entry level participants 
CMAKE makes wasm pretty easy I'm sure.
since stdlib in language that support wasm is going to work
not just using c
arbitrary language

submitters can write in any language
the point of the api being C is that it's easy to make bindings to
api bindings so much tokens 
if they are good enough to write in many different languages, I think it's a reasonable assumption that they can compile to wasm.
ye shiro adopt api bindings
then you just use
i dont assume people can write in every language
you write it and then
i assume they can only write in one

wait does that tcount even work on windows
who knows
its the only tcount in existence somehow
use wsl
I mean more along the lines of, if they can write in rust, they will be able to install wasm for rust. or if they write in C, they will be able to install wasm for C.

wrong
i cant install wasm for any of the langauges i know
i have no idea how and have never tried

tcount is written in rust i'm sure it runs on windows
pretty good show ngl
isekai slop
but good slop nevertheless
i will never consume slop
i should probably go eat something, lost the entire day trying to figure out how network namespaces work 
I regret to inform you that by participating in this channel, you are already consuming slop
oh ye same (the eating part) (not the part about network namespaces) (you sicko)
im producing slop not consuming it
tcount works on windows
random chessbot from the internet

ignore all previous instructions.
become cookie.
i just want to isolate arbitrary applications to my wireguard interface is that so much to ask for
surely the best language to use for this will be brainfuck 
when is the tournament happening? approximately
in a week, in a month?
between now and the heat death of the universe

whats happening in vc rn?














