#programming
1 messages · Page 218 of 1
wsl addon in vscode it will connect automatically assuming you installed wsl2 already running wsl code . will launch wsl and connect in the current directory
me justifying having my own json parser:
and i can run cutechess in that wsl? its complete vm?
idk when it works its alright
alright sounds legit
even something like firefox

that when is doing a lot of heavy lifting here 
at least wslg sounds like something that wont require weeks to set up
I don't use it much
it's basically identical to just running in linux as far as anything involving the shell you can barely notice it's wsl
it works for chess though
the gui should run fine but hardware accel is not a thing really
(without a lot of annoying changes on your end at least)
you can set the animation time to 0 in cute chess settings if you're worried about graphics degrading your performance
running wsl in vscode for months was what made me fine with just saying fuck, wiping my system drive and installing arch
it's not exactly raytraced anyway
me when i run the nixos installer and my gpu is too new for the open source drivers so firefox crashes trying to software render
then you got programmer socks and lived happily ever after
it came with the socks
yes
they just appeared in my closet
I would switch to linux but little things bug me
this whole chess tournament operation is just linux sect recruiting 
i had to buy my own set of programmer socks separately because i use fedora
well at least you get a cool hat
true
Silliness
i ran nobara for a while but then i got pissed at no AUR again so went back to arch
once you go aur you can never go back
it's not even really the AUR although it's great just mindlessly searching on it for pretty much anything if it's not already in the arch repos
pacman itself
I turned Kotlin into Python
i am going to vomit
this is so immoral
But tokens
Blame chess
right mindset
i can thanks to nix 
is it guaranteed that whatever slop i make in wsl will build on shiro's pc
4 tokens goes a long way
surely this can be if (turn <xor> (indexFromBitboard(move.from) < indexFromBitboard(move.to))) 3 else 1
with my macros, 4 tokens gets me an entire for loop
I'm doing so many little things to reduce the token count all over the place, which makes the code look horrible at times but it saves tokens and that's all that matters here
they're both booleans so shruge
you can box the first index and use the power of comparables to probably save more tokens 
would be something like this in haskell
scoreCpy * if (if turn then (<) else (>)) (indexFromBitboard $ from move) $ indexFromBitboard $ to move then 3 else 1
Two tokens saved
i do things other than java too :(
this is slander
it is truth
every time i need to use my laptop i miss comma 
I should probably see how my current thing does at some point
And at the same time set up the build pipeline
it's time to write memory arena shenanigans in
NOT JAVA
second monster of the day here i come
int from = chess_get_index_from_bitboard(move->from br_sc
int to = chess_get_index_from_bitboard(move->to br_sc
scoreCpy *= turn == (from < to) ? 3 : 1;
What magical language is that?
C
Crazy
macros lead to many powers thought unnatural
where's the FORTRAN66 chess bot
wait, is macros c-exclusive thing?
no
no
you wrote from twice you dingus
nah they're in C++ too
oopies
but java doesnt have them
i mean c/cpp
no
my C doesn't look like C half the time
So I think the current bot may be a lot better than random moves already
chess_get_board no_args_after_board
that's a line in my code
yeah :(
I think Kotlin doesn't have macros, so at least it's not the most ultimate language of all time
rust 
depends how you define better
after having to write a bunch of them honestly idk if i agree anymore
if your language does not have a preprocessor then idk what you'd be saving with macros
i think i'd rather write c macro spaghetti
i feel like
type safe (cant believe im saying this)
rust macros are a pain to write but they are indeed more powerful
rust macros arent type safe
they run before the type system
rust macros are better for some use cases but worse for just quickly copypasting code
My bot is pretty silly, it tries to always advance its pieces, will take a checkmate if it sees one available, will take a promotion if available, will take a piece if possible
It just does a bunch of stuff already
And definitely beats all random moves by a lot
My bot vs random moves
i would hope checking like 1 move depth search would beat random most of the time
Yeah this is nothing crazy but it sure beats random moves
i'll try run wsl separately from vscode
mm depends on what you mean
they are more powerful in that the syntax is more flexible
yes
especially proc macros
yeah i guess i was saying that since it runs on the syntax tree rather than just expanding literally any text yolo mode that matches so they are safe-ER
but they are less powerful in that theres more restrictions and boilerplate
and i hate boilerplate so i tend to avoid macros
proc macros have even more boilerplate but sadly they're actually useful 
i write them very often
i avoid rust macros whenever i can
draws are always tricky in chess engines

we need a #programming logo 
oh my god i have a genius strategy
I did something funny
Random moves didn't get any move here
day 1/... of setting up linux 
make the best chess bot ever but throw in a random move every few random seconds
who here does graphic design? my budget is 10 bucks, a mcdonalds tshirt, and a mcdonalds cap
i am so smart
holy shit mcdonald's merch
I have no clue how it's possible for random moves to not play anything here
mcdonalds employee dresscode merch 
@real sierra Bug? Though I'm not on the very latest build of the Chess API
are you filtering the move list before that?
what did i run wsl --install for if it gave me 0 distros
i think you made it give up
well try the latest first...
It's literally the example bot
command prompt yucky run it in powershell as admin
Somehow it didn't find any of the many possible moves in this position
i assume i do this
its probably windows terminal
is it braindead
hu
use --install
you wrote intall
oh
all the ints
its installing
you absolute sillybrain
Oh yeaaahhhhj
it's ubuntin time
I forgot the test bot only does 500 total moves
ubuntus all over the place
I should compile one that doesn't do that
note that you'll have to use cute chess from ubuntu as well
cant wait to get 500 problems that require 5000 console command each to solve 
thats exactly what i need so makes sense
if you were using cygwin yeah, but i expect wsl to be easier in this regard

is cygwin still a thing 
unfortunately yes
was this actually a bug btw or
did updating fix
test bot
I made it while(true)
is it normal that it connects for 3 minutes
So this is a bit concerning
lazy-ass bot
kinda a holdout from the early days of the API where it could get stuck in a busy loop and fry your terminal
The illegal moves are not good
I should try the same on latest API
can you find the relevant games in the pgn
wtf is it doing for 5 minutes
same illegal moves 
I would love a test case for these bugs
can it conflict with my vpn
e8c8 what even is that
uhh i mean it's connecting to localhost
is that castling
for 5 minutes
its a rook or queen move
i dont see vm running
could be castling
do i have to launch it myself
looks like castling
e8c8 is queenside castling
since its e8c8 and e8g8
i don't think it'll make a difference but you never know
it could be downloading the code server and the vpn interferes with that
possible
i've run into issues with vpns under wsl2 before, had to tune the mtu 
castling is so annoying to check
was too high so things just broke, like git
need to check if any of the squares involved are attacked by the enemy, need to check castling rights, need to ensure the squares between are empty
didnt help i feel like vscode just stuck
most of it is done with giant masks
your linux sucks 
I wonder if the masks are missing ull 
how do i know what it runs
it could run a demon, that's for sure
check task manager and MURDER vs code
Update to latest, 100% bugged
try launching wsl manually and run code inside it
lost twice to random moves 
when i run wsl it just opens empty console window
maybe its not installed properly
mfw 1 in 2000 chance bug
when you went to install it, did it ask you for a unix username and password
Having a CPU that can run 1000 games quickly is good for testing
no it's closer to 1 in 200
1/2000 pretty good all things considered
1/200 more so
i dont think so
there was a username without password i think
it might also just be asking for a username, been a while
use cheat engine to read the raw memory
if you set a file for the tournament results
its not asking anything at all 
it should write each game there in PGN notation
then you can just grep for e8g8 or something
grep my beloved ❤️
well it only asks when you install it 
try reinstalling i guess, wsl --shutdown; wsl --unregister ubuntu; wsl --install ubuntu; wsl -d ubuntu
hmm so wsl just completely hangs huh
yes
you could try killing its process(es) but yeah, restarting would be the easiest way
so linux loves reboots
Results
windows try not to be a pain in the ass challenge (impossible)
Naturally the one time I'm like nah it's super ez it's the one where it explodes instantly from nothing
thanks, this is super helpful for debugging
I can run thousands of games if you need, I've got a decent CPU
that reminds me
alright i think it worked, now it wants to create user account
keep in mind it will crash if you try and log too many games
i still need to run my json parser on my craptop and see how it performs
or more specifically too many threads I think
idk it really disliked 100k games
it just flat out refused to make the pgn file
idk if I've ever seen this channel so lively 
that reminded me, i have the linux user urge to buy the shittiest $100 laptop and slap linux on it for ???
by default yes
how am i supposed to play chess in terminal
oh my god same
bro
you launch cute-chess
noway same
wsl2 does support gui apps
I just don't want to buy a laptop that's too shitty
prompt can make windows
dw
it just doesn't come with a desktop environment 
While you try to figure out what is bugging in the API I'll do some quick figuring out on what to do about stalemates and stuff
is that a neuro cursor

look at my cursor guys
bugfix may take some time I have an assignment to complete tonight lol
isn't it prebby
i forgot i have had that on for a few days
my requirement of "must be amd" really isn't helping
Silly
I'll just keep developing and ignore the illegal moves
if it's a C API issue it'll vanish at some point
Yeah I only play moves that come out of the API so it's definitely the API providing wrong moves
yeah i keep increasing the price because i want an amd system but all the truly shitty ones want me to use a god awful N4000 celeron or the newer but still VERY poopy N100 and its ilk
do i need this
I need this pthread support working for mac tho
fuck you you made me look up shitty laptops in my area
now i'm sifting through market listings
my current debate is if whether or not I spend ~£400
make sure to run chmod +x Cute_Chess-1.4.0-x86_64.AppImage before you run it
the plague runs deeper
because on one hand its not too bad
dont look at minipcs or you'll be like me soon enough
but on the other hand that's a lot of money for a linux laptop that idk how much I'll use
run chmod 777 to be extra sure you can run it :)
oh no
I didn't realize they made minisforums that cheap
ah that's without ram or storage
in fact do sudo chmod -R 777 / :)
that one is
(this is a joke)
but you can get so much for like $200-400
(don't do that please)
i checked twice i dont see typo this time
./chess.AppImage
do ./ before it
windows user mindset 
7730u with everything
$300
let me guess sudo apt libopengl

didnt work
sudo apt update
sudo apt install mesa-utils libglu1-mesa-dev freeglut3-dev mesa-common-dev```
you are missing any graphics drivers
mesa ftw
but I shouldn't
does it even have internet

yes
it should
doesnt look like
I'm so curious how many people are silently working away at this
me neither but ive had one of the $100-$150 shitty n100/n150/n97 tier ones in my cart at various points so munch
i so close
no it didnt
I absolutely would want a modern amd one
i'm gonna do it i'm gonna look up cheap laptops
amd stops me every time
yes
you can get like
5700~ tier amd for under $200
pretty frequently
nvm it said its up to date

phrrr
does glxgears run
do without mesa-utils
freelut too
I was gunning for a N100 system in the past. I got the best I could for $200
what about freeglut3-dev
very close
is this ok
probably not needed either i dont run ubuntu so idk what exactly is needed i just googole it so
Funny, half the time it draws against its new variant that attempts to avoid draws
wow, another qwen release today @sick owl
is your vpn on
of course i cant access discord without it
welp
And the other half of the time the new variant wins
How is it so perfectly 50/50
i will add wsl to the list so it doesnt run through vpn
seems that the outcome depends on the color they play, mk2 only wins as black and thus always draws as white
dont mind me jus watchin gearz
is your algorithm fully deterministic
i love gears
Yeah no RNG in it
It's a simple evaluation function
Ok disabling vpn helped
It's also just 316 tokens big
that's tiny
No. This is not a good idea. I know 
@fast pagoda it was a N100 system ig
Oh now that is nice

there's so many with n150 etc that are so cheap rn
and you can upgrayyd ram/storage w/e
Wait its just a python app over omni lmao
kinda tempting to get one and mount it to the VESA mount on a cheap portable monitor
then it's the world's shittest form factor laptop if u have a keyboard
8945HS for $600
I ended up on a N100 with triple monitor, 2 HDMI 1 C, dual 2.5GB. All upgradable including 2.5inch
DDR5 is nice tho
500GB 16GB
yeah i keep getting hung up on kinda wanting ddr5 for futureproof and then it hits a price range that goes from goofy to "are you fuckin stupid what are you actually using this for idiot"
uuhh how do i build it now
i need to cmake it or smth?
can i build it in vscode
@obsidian mantle i have an admittedly scary looking command you can use to try out to get internet working inside wsl if you feel like it
(it only lowers the minimum packet size for compatibility)
it works, i disabled vpn
what language are you using for your bot again?
I pretty much got the best I can, and honestly just a small upgrade over these
£700 is surely worth never having to deal with windows usb passthrough shenanegans
i gave it source files for bot now i have to build it
in windows i used clang and bat file
i meant with the vpn on
what about $400
clang exists in linux.. not sure if its installed by default on your ubuntu tho

i assume its made so you have to install maximum amount of additional shit possible so no it shouldnt exist on my ubuntu
yeah wsl default install is super minimal
sudo apt install lsb-release wget software-properties-common gnupg -y
echo -ne '\n' | sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
LLVM_VERSION=$(echo $(ls /usr/bin | /usr/bin/grep clang | /usr/bin/grep -oP '\d{2}') | tr ' ' '\n' | sort -n | tail -1)
sudo apt install clang-format-$LLVM_VERSION
sudo ln -sf /usr/bin/clang-$LLVM_VERSION /usr/bin/clang
sudo ln -sf /usr/bin/clangd-$LLVM_VERSION /usr/bin/clangd
sudo ln -sf /usr/bin/clang++-$LLVM_VERSION /usr/bin/clang++
sudo ln -sf /usr/bin/ld.lld-$LLVM_VERSION /usr/bin/ld.lld
sudo ln -sf /usr/bin/clang-format-$LLVM_VERSION /usr/bin/clang-format
to get llvm (clang)
build .so library,
then i have to link it
then i have to
do something else
and it all in bare terminal
honestly very tempting

i like my NAS box to have a bit of processing power for M A X I O
🗣️ 💬 🔥 phrr
OCuLink is actually banger
I should look for mini PCs again just to see what amazon can give
give me a number between 0 and 1030
1024
93
pi
aight, i keep 1024 and put 6 bucks into my savings account

i dont think i can split it that way

what do i get in return?
there is not much you could offer
you get vticutcoytbknibyehjobdavm
i dont want that
why not
why yes?
it's worth 1024 tokens to me
sudo dpkg --force-all -i vticutcoytbknibyehjobdavm for a good time

it's dpkg so it would only do anything if there's a vticutcoytbknibyehjobdavm in that dir anyways
i gave you the snippet to install everything you need related to clang 
oh i thought it was internet related sorry 

the problem is the built-in ones are all outdated af so you want to get it from llvm directly
ubuntu 
"b-b-b-b- we backported 3984157901384019234809 security fixes to the one from 2016"
chat, build me an investment robot and yall can keep the profit of the first month

the goal is to make money
bwaa PSUs (we are stealing from eachother)
represent investments as a chess game and you will have many investment robots by November
-# I am not posting context
i dont really care baout having multiple, i need 1 really good one
oh ye i said id buy silksong once i got paid didnt i? aight
Do i abandon clang and go gcc for 100% compatibility
they are meant to be compatible almost entirely unless you're using some sort of weird optimizations/features from one

if I buy a minipc I can throw nixos on it and then cheap out on a laptop to do remote nixos builds
Ok so same question
ALSO CHECK OUT
SHAKRA'S THEME REMIX!
There are 500 gccs
I typed sudo apt install gcc surely its enough
probably fine
worst case you uninstall and get a different version
if it works it works
finally, no more , as decimal point 
God linux is awful
also its ubuntu 
though gcc would work just fine (clang from the repos too, you dont have to use a new version)
shiro does use c23 features but not that many, it should compile on most c11 compliant compilers
linux binaries dont have an extension
you can run anything as long as it's marked executable
# to build, as long as you have gcc or clang installed
# do once
cc -o libchess.so -shared bitboard.c chessapi.c -fPIC
# do after every cpp file change
c++ -o bot_exec -lchess bot.cpp
# to run
LD_LIBRARY_PATH=. ./bot_exec
Oh and i will have to mark it with some 1000 token command again
chmod +x = 1000 tokens
gcc cant find files i give him
i got my launch task figured out. i can now press F5 to compile, and play 10 games of my bot. and after im done it tells me the tokens
are you sure you're in the right directory?
True i wasnt
cant help without screenshot sorry 
How did you know 
for the record in powershell to give permissions to execute a file it's icacls "filename" /grant UserName:(RX) which is WAYYYY worse than chmod +x and you still need to give the file an executable extension to run it
windows files dont really work that way obviously but that's the best equivalent i could think of is just giving a user permissions to run something
powershell is in this weird space between bash and python
people seem to like it but i still get surprised every time i see it being used
thank you for great help guys
without you i would probably spend whole month setting it up
lmao those bot names
you'll get used to it, trust, i had the same mindset when i started using wsl2 because of development hell on windows
I thought my pipewire broke because Spotify wouldn't play any sound despite me not updating anything sound related
It was playing on my phone

This is what I get for removing the connect bar
something still causes plasma to die immediately upon startup all of a sudden ugh
i got a questions... what does this unsafe block do in the rust bindings... i can just remove it and it works the same
just use fewer tokens 
I thought I was in NN, I'll be leaving
kde moment
ye go optimize 
i did the thing
you may be slightly over the limit
@trim valve
truly is, it's been crashing occasionally for a while but i'm used to that from windows but not it crashes in a loop until it doesn't recover 
it matches if there are zero legal moves and... does something I don't understand bc I don't know enough about unsafe Rust
I would be impressed if you can shrink that to 1024 tokens
I can barely squeeze 1500 into 1024
writes to a null pointer
i see.... but if there are 0 legal moves doesn't that just mean i lost?
so uh, shrio's code doesn't let me exit normally
why would it do that tho 
i have school tomorrow, cant. i dont even have steam installe dyet on linux
like neither std::process::exit nor panic! exit the program
shrike
right now im not using the api cause i had a half finished version bot from a friend
so
wrong
yeah every time i've had to redo my install for real (hasnt happened in a while) it was plasma shitting itself
silk song
oh 
hoggle night
you can just call done without submitting
probably the second thread 
but if you have zero available moves and its your turn then shiro fucked up
that plays the same move again
so may as well crash
Maybe I should just use gnome instead but ugh
still possible by making moves on the local board copy
fair enough
but i have foundation for games, foundation for film, and aplied math and physics 1 tomorrow. i do kinda need to take those classes
I Chessed so hard my system froze
tbf using plasma from unstable certainly doesn't help either
you can technically make illegal moves on the local copy of the board, you just can't submit them or you lose
i may be irrseponsible with money but even i go to class
I have no clue what happened
uses unstable branch
it's unstable
REEE
alright... now that i have everything figured out.... time to actually make some logic and get a chess bot going
i might just do unstable by default and grab kde from stable
do you mean nixos-unstable btw?
ive not had issues with stable kde on this install other than normal kde jank
yeah
Well since I was forced to reboot anyway I'm gonna upgrade Mint, my Linux kernel and probably my Nvidia driver
honestly theres no jankless linux setups other than lts distros 

and lts distros are jank when you want to get newer versions of software
I hope the freezes are just the Nvidia driver and updating to 570 or 580 on a newer kernel fixes it
my actual reaction when my linux distro explodes after i poke it enough
nixos lets you have a nice middle ground to a degree at least, i like
i say that as i took such a setup and replaced it with an unstable only one

for nix i would wish it worked like one of those old system FREEZE setups
where no matter what happened it's ALWAYS fixed on reboot, even if you delete system32 somehow
idk mixing release streams doesnt go well for me because of mesa or something 
it does work like that if you use impermanence 
figuring out how to make something work for both opengl and vulkan is a pain. cuz i dont want to have 2 completely separate games to make, but reusing code is near impossible 
but like if i fuck up my config it would be kill still yeah? i thoguht you COULD break it still
on those you literally do not have the ability to destroy it from inside the OS
well yeah you can break it if you install a broken config
then you probably want to add some layers of abstraction
yeah im talking like, i install a broken config, a bird poops on the computer, i put it thru the dish washer
reboot it and everything is fine
come up with a primitive you can implement using either framework
and then only render via that primitive
if the config is broken it's broken 
not much to do other than roll back
my librewolf crashes the moment i open twitch now
lovely
i can abstact all i want, but vulakn and opengl jsut work diffrently
ill have to make a more universal way to handle stuff i guess
anything written to your HD is sent to an allocation table
as soon as you restart
it's back to the original
no matter what
whatever you changed is gone
even the most broken config of all time
Process 32159 (.librewolf-wrap) of user 1000 terminated abnormally with signal 11/SEGV, processing...
can you not
oops
Wayland protocol error: zwp_linux_buffer_params_v1#442: error 7: importing the supplied dmabufs failed
hmmm
this reeks of nvidia
yeah but it should never be your turn if you've lost 
it sounds like nvidia driver yeah lmao
does it crash on like youtube
that's true yes
or just twitch
youtube works
1917
i think dmabuf is just borked
sem is a pointer variable for struct Semaphore right?
direct memory access buffer
YOOOOOOO
I LOVE LINUX
I BUILT CPP BOT 

IT'S SO OVER
WE ARE SO BACK

i need to write down these commands for future

surely using beta nvidia drivers will magically fix all my problems 
soon you will be like why am i doing all this in wsl when i can just run linux
just give it a while
nice now to find out what this is in pascal xD
??
are you reimplementing the entire thing instead of making bindings..?
you should not need to touch the synchronization primitives in the .c file, it's sufficient to just make ffi functions that can call the functions in the .h file
that's the intended interaction with the API
i-i think?
im trying to access the dll functions and you have to declare then in pascal with all the types (i think)?
tho maybe im misunderstanding something, guess i'll go read some more forums
(my test function btw)
yesterday
the API only ever returns or requests Board * values, never a Board itself
yeah that might be something actually
so you shouldn't need to define the Board struct
you need only find the equivalent to a pointer in your language
thunderbird and librewolf 143 should both share the same base
the Board struct changes frequently unlike the items in the header file, so it's not a good idea to rely on it having particular fields, that's part of the point of having API functions for many of the simple fields
yeah thunderbird is basically firefox
sounds doable i think i'll try my luck with just using generic pointers and see where that gets me, thanks
I now have Kernel 6.14 and Nvidia driver 580
okay yeah nah the thunderbird segfault is different
oh well, i'll just go back to 142 and hope it's fixed soon
apparently my spotify got hit with a SIGILL 45 minutes ago

SIGILL 🤒
(not a issue i just want to complain about myself)
i forget pascal has a dif word for functions without return i was getting so confused why i was getting a error
im so washed
what am i even doing at my job, take me away
why are you trying to interface with the semaphore function 
once again I don't think you need semaphore_init
you should only be binding the functions in chessapi.h
the rest of the functions in chessapi.c are marked static and won't be exported anyway
oh i.. was missing that bit
that should make this easier for you
lol
I would not expect someone to make that many bindings
yeah
i hope it gets better
bitboard.h is kinda optional whether you want to implement it or not
the functions there are less important but allowed
dlang
why is gdb 40MiB, how many scripts do they bundle 
msvc being 7GB:



LMAO
idk why but the idea of spotify getting 360 noscope kill -9'd is super funny
oh
SIGKILL makes sense at least
less funny
yeah illegal instructions do make more sense
because when i read sigkill i just imagined your borked kde just being like
get rekt SIGKILL
kde hasn't complained at all yet after rolling back thankfully
someone needs to make an app that SIGKILLs all electron-based apps
i'm inclined to just blame nvidia, seems like a wayland issue
i wanna merge that change I have in the other branch
but there was no update to the driver as far as i can tell, only a kernel update
can someone confirm at least that it still works on linux
and potentially on windows
i need one that just randomly sigkills something once in a while without warning
the behaviour using threads.h should be unchanged, even if the pthread.h compat isn't functional
if i ever write a computer virus that's all it'll do

i can write that :3
damn
It just became unstable like this overnight, but it returns to stability when expo is disabled
Very odd
This is after years of operation
update bios maybe
dram has had enough
Yeah that's what I'm trying
dram is checking out for a spot in heaven
nah seems stable enough
most helpful arch forum user
reminds me when I had 2 million memory leaks last week
Well I think I'm now about stuck with where I can get to with a bot that only looks at what it achieves by doing its own move
Next I guess I need to make it see what it enables the opponent to do as well to make sure it doesn't just blunder checkmate
The classic RTFM, never fails
cursed windows version yep
Also eventually I'll have to start evaluating more complex stuff probably like pieces being threatened if I can even figure out how to do that
Oh yeah it's known to break stuff
Yeah but fucking your ram sticks up seems a bit out of even its purview 
Okay looks like bios update fixed it
Well it breaks SSDs, RAM is not that far off
Oh yeahh that is also something it does do
There's just no way
brick
It did seem odd for my ram to become unstable overnight
Windows 11 24H2 be like: corrupts your BIOS
Bios update actually fixed it 
If game pass wasn't a thing I'd switch to Linux full time dude goddamn
How has Windows become this ass
that's the secret cap, it was always ass
Windows 11 moment
Okay yeah but not corrupts your bios and GPU drivers levels of ass
swap and just dual boot for only game pass since it needs UWP
how do I put the bot in cute chess
Carries the same risks anyway if I'm gonna be booting into Windows from time to time
My laptops full time Linux because I only use it for light gaming and productivity
Also my systems Nvidia unlike my AMD laptop so Windows does confer some benefits, though give it a year and I imagine Linux will have parity with Nvidia too
I think I may have some idea of how it might be possible to extend this to look as far into the future as I want
But first I want to be able to handle the opponent move evaluation side of things
https://bugs.kde.org/show_bug.cgi?id=509192 i think i found the cause of my plasmashell crashes hmm 
tools>settings, engines tab, plus at the bottom
set the command to something that will start your bot, and the directory to where your bot code is
varies slightly depending on the language you're using so you may have to play with it a bit
I put the example bot python file in there and it gave me an error
I think the recommended way to do it is to use a script that calls the run command of your bot
For example in my case java -jar chess-bot.jar
Damn, apparently 24h2 is known for fucking up asus mobos
Wish I'd known that before updating
you will have to set command to something like "C:\path\to\python\python.exe C:\path\to\bot\mybot.py" on windows
on Linux and Mac it should be similar
that makes sense

known for?
I have literally never heard of this
make sure the directory is set to where the bot python file, and ideally the library file, are
Windows 11 be like: bricks your system cutely
even windows wants you to switch to linux. so nice of microsoft
So far my bot only uses 399 tokens
I think some of the logic I have is bad, some of it not sure
And there'll have to be a lot of work to bring it into a state where it can actually do something good
microsoft is the best linux promoter
what do you mean good one 
good one 👍
Good One 👍
So far best it does is beats any of its versions or itself as white every time and beat fully random moves 99% of the time no matter the color
can someone give me a rundown how i would use the chess api to test out moves?
it is a start I guess
wdym by test out moves
now put it against stockfish
like play against the bot?
I don't even know how
And no it won't do well at all
no, more like make a move. analyze it figure its bad for the future. go back and then do it again for another move
i'll be honest... i have no clue what im doing
i also have like 0 idea what the usecase for like 90% of the functions in the api are
Oh, you just want to use chess_make_move(Board *board, Move move) and chess_undo_move(Board *board) or the equivalents on your language
There's docs you know
where
the code comments only describe what they do. but not what use they have
In Shiro's repo in the wiki section?

You're the programmer, you figure out what to use it for when you know what it does
I should sleep, too much Chess for today
wtf is that documentation
it is in bitboard.h
I forgot to copy from shiro
'i wrote this but idk what it acc does' or 'im too lazy to explain allat' typa doc
nah it was the rust docs for the bindings. just thought it was a funny comment 
@real sierra Are these functions legal? Not all APIs have them
They're also not documented in the C API
seems more like the other api's are missing them
rather than it being illegal in the rust one
If they're not part of the C API, which is the official one
Then they're likely illegal
they are part of the C API
The C API defined in the docs
they're not static so should be fair game 
bitboard.h and chessapi.h are the 2 files allowed to be included... therefore its legal
shiro mentioned them being allowed
I'm pretty sure we're only allowed to use chessapi.h
it even has comments for usage 
The C API docs are missing all the BitBoard functions though
seems more like a github wiki issue rather than api issue. the actual api definition and comments are in the code 
// Aside from allowed standard libs, you only may include this and "bitboard.h" for your bot.
^ first 2 lines in chessapi.h
what do I do if cute chess is just telling me it can't execute command to start the engine
My Kotlin bindings don't implement them
Something, probably give more information at least
make a request to bind them then. should be simple enough
I made the KT bindings
then bind them 
Eh, I'll see if I need them
um am i seeing this correctly that while chess_get_legal_moves gives me a pointer; chess_make_move wants the struct and not a pointer to it?
-# (
pls be the right stuff this time or im going to bed)
i jsut wanted to restart my pc
you get an array of moves hence the pointer
actually
good point
why does it need to make a copy of the move 
a move is 24 bytes so i guess it doesn't really matter
hyprland moment
i jsut deleted 2 lines of the config and ill pretend those werent important
probabyl some touchscreen shit
sounds like it
legal but optional
Interesting
I don't think they're super useful in the grand scheme of things
Well, gues we'll see
I'll wrap them if I find a use for them

it's a small struct so I thought making that one directly accessible without dereference would be useful
it's also one I don't plan to change often, and is specified in the header, so it's possible to do so
as toast said, the pointer is actually an array 
the latter function does expect the struct itself, not a pointer to it
do note that the caller is responsible for freeing the array (see chess_free_moves_array)

yeah was just at that free method xD
im not convinced this will work in any way whatsoever, but i will find out
get_legal_moves and maybe get_board are the hardest functions to interface
the rest are pretty straightforward, many have similar signatures so you can copy paste much of it
that is not the turtle model i was expecting
looks like chessboard...


wait but what i don't understand if i get a pointer to the struct (thats at the top of the file) here, how can this be a array?
or is that just a c thing?
it's a pointer to the start of the array (just a big chunk of memory where all moves lie next to each other)
that's why it also takes the len parameter as a pointer, so it writes the actual length into that for you so you know how long that array is in memory
o-oh i see, i get the feeling this is a tomorrow problem, thanks so much
im gonna explode
i implemented a general purpose version of the speedy vm thing
and it 50% of the speed
im not sure what i broke but i have spinning tutel EDM now 
fair
i just realized something... how do i know if its my bots turn? or does get_legal_moves only return moves for my bot?
iirc there was a function to check whose turn it is
well yeah i can check if its white or black's turn...
but how do i know what color my bot is?
hmm.. but get_legal_moves does only return actually legal moves for my turn... so there has to be a way to check if its my turn and it does it under the hood
@real sierra how do you know what colour you are?
you call get_board and see whose turn it is

wait i might be stupid
get_board returns the board that your bot is actually playing in the chess game
so if you call that and it's whites turn you are white
otherwise you are black
makes sense.... i guess
your code only executes when its your turn, so "i can check if its white or black's turn" you check when its your turn
your bot does not run during the opponent's turn
ok thanks shiro

Why does it line up so well to the music
i have no clue
it seems semi-random
this was a test for updating matrices in a different thread than the one that opengl is running in, uniforms stillg et updated there tho
so does the api not work on windows? i remember seeing that here but i could have misunderstood
lots of things changed so who knows, give it a try 
Otherwise this
it does now. im using it on windows
@gritty dust i summon the cheese
so i need to update the api i am using?

kk
For the others who need to search in:programming from:shiro_nya windows Just in case.
i made a improvement i think... now it wins sometimes against a totally random bot
it still sometimes makes illegal moves...
in 500 games i had 1 illegal move e8c8
or e8g8
oh @real sierra (soz for the ping think you wanted feedback)
i still get the error with the pthread branch, tho apparently because it goes in the wrong if?
(top is main branch bot is pthread branch)
fascinating
can you try adding -std=c23 before -o in your build command
like this?
oh
guess i'll continue to use the tinycthread thingy for testing tomorrow or install a linux vm
i wonder if mingw's gcc toolchain just doesn't ship threads.h




what

?





i guess i'll have to rewatch sebastian's chess videos again...


ok