#programming
1 messages · Page 222 of 1
literally the first fucking time in my life i've had confirmation numlock is actually used 😭
bruh
You should have heard Sam ranting about it not being default toggled on linux
i paid like 15 bucks extra for number keys, i use those
im prettys ure it also isnt default in windows, but if you put it on once it stays on
while linux has dementia
make a script that runs on startup and toggled numlock 
The script in question https://wiki.archlinux.org/title/Activating_numlock_on_bootup
of course there's an arch wiki page for this
We love the process of:
- toggle numlock during disk unlock
- toggle numlock during greeter
- toggle numlock with the DE/WM
HI
good thing my keyboard doesn't have a numlock key 
Wouldn't put it past for a nix flake called I-said-activate-numlock
services.displayManager.sddm.autoNumlock there's this, nice
programs.plasma.input.keyboard.numlockOnStartup = "on" 
idk about the other one, cba to look for that
plasma as in kde plasma?
or am i hallucinating that info
toggle numlock when i turn of hdr
toggle numlock when i turn it back on
why does your numlock have any connection to hdr 
i think my keyboard saves my numlock status, i dont think ive turned it off in years
idk
looks at a keyboard that doesn't have a num lock
oh wait it works now, maybe they changed hdr in the new hyprland update
My keyboard layout when I need to enter numbers
i use a laptop so numpads are foreign to me
and my keyboard is a 75% i think
yeah its 75%
even my laptop has a numpad
split keyboards are a fun thing... but they're pretty hard to get used to. especially when the number of keys is limited... I used the numpad quite actively... so I bound it to the keys as is on a separate layer
my laptop keyboard is pretty much 75% as well
I was used laptops with numpads because of running 15.6inch ones. These days I main a 13inch so I don't really have numpad anymore.
90% of my classmates have these enormous 18" gaming laptops with underglow rgb and shit. its insane
Some laptops have them some don't, I don't have a number pad, but my friend does.
as someone with a 3050 in my laptop i thought i had it good, but i pale in comaprison
The actual definition of portable desktop
those fuckers have 5090 laptops
even in my new friend group, bro was playing silksong during lunch on his 5090 laptop
the 5090 laptop even outperforms a 3090 desktop
i know its not supposed to be a competition, but damn am i jealous
I'll say for keyboard, if I were to have my way. We'd need a new product type to explain how many keys it has.
Who said it was under 100%

model invented new tag... 
[INST] What does <|VOICE|> mean? [/INST]<|VOICE|> marks spoken text, <|NARRATOR|> marks narrative, <|BREAK|> marks scene transitions, <|BEAUTIFUL|> marks beautiful moments.
Very good
One of these days, I need to go through the TCL keysyms page and figure out how many I could reasonably add.
My friend plays silksong on his laptop 4060
fair enough
i might buy a new laptop once i start having trouble with the 3050's measly 4GB of vram. but i dont want to replace stuff for the sake of it
hi konii
I love XF86Numeric section of the keysyms: 0-9, star, pound, A-D, 11, 12
There are no missing symbols in here nope
what
https://www.tcl-lang.org/man/tcl8.6/TkCmd/keysyms.htm XF86Numeric10 is not real
i dont mean to not be inclusive, but
braille_dot_1 65521 0xFFF1
braille_dot_2 65522 0xFFF2
braille_dot_3 65523 0xFFF3
braille_dot_4 65524 0xFFF4
braille_dot_5 65525 0xFFF5
braille_dot_6 65526 0xFFF6
braille_dot_7 65527 0xFFF7
braille_dot_8 65528 0xFFF8
braille_dot_9 65529 0xFFF9
braille_dot_10 65530 0xFFFA
do we really need braille on pc's?
is this meant for atm machines maybe?
cuz i dont think they'l be able to see the screen
The real fun begins in the XF86 section, also known as whatever prebaked operation keys people have made
tbh most of the XF86 section makes more sense on non-pc electronic devices
like the XF86DVD key makes sense on an AVR
My favorites are the color ones
red, green, yellow, blue
ye those are just the 4 colours every tv remote has for some reason
Yep they really do
I do however want to have a small talk to whoever extended the XF86Numeric section with 11 and 12; and ask them why did you not include 10
this has to be liek a universal standart that thousands of diffrent devices use no?
Relative paths are good to learn alongside it, good to learn both to know when to use each.
Yes, I am kind of understanding relative paths as well. I just learned that my mac uses volumes so theres no C:\ root drive like there is on windows.
root drive is /
It is my understanding that it is, it's nice that computers have all of these spare keycodes for apps or DE/WMs that can read them.
-# Also just a few macro keys doesn't hurt
wtf
dont wanne get fomo you kno
Ignorance is bliss
hmm y firefox broke again
idk how other people have browser issues
jsut hyprland stuff
you guys usually have good hardware
-# The answer is linux
keyword usually
but it also breaks faster sometimes
im on mac its basically linux
mannn
its too polished to be an actual linux distro
I like it like that
Both of them use POSIX paths and macos is based in shipping zsh by default
yeah
i think there are some differences between unix and linux anyways, so it wouldn't have counted.
You can use a lot of linux automation tools on macos, but linux still has a lot more choice
You get to choose your difficulty level
chromeos? 
I will eat a lot of VM's
and be strong
I remember based on this: forward slash is used all the time, backslash I have to remember where it is on the keyboard.
its easy for me to remember where it is because of the xdx | meme
[vertical bar is the same key as backslash on most keyboards]
we wa we wa
@olive sable I know you're off the page by now, but forgot to mention my second favorite random key of XF86LightBulb
Your guess is as good as mine
some philips hue type shit
I'd think that, but it is only one key
we wa we wa
So the only automation you get it turning it on and off, no dimming

might i add that i get these have built in batteries and you can attach them to the wall magnetically, but 20 bucks is still too much
huh
that sure is a key
I'm trying to set up the Python version of the chess bot tournament api, does anyone know what I need to do to build the given files into a library? Specifically on Windows, the example command doesn't work exactly as given and I don't know what adjustments I need to make (other than calling it a .dll instead of .so)
Might be the XF86KbdLightOnOff button tho 
any python people here?
!vanish
id think maybe ping shiro but i dont want to bother him with every single thing to do witht the chess tournament
he's still a mod and has a life probably maybe
he also has his birthday still
he's busy with school stuff atm iirc
I'm heading to eep, gn chat
Not a rush at all, I was just trying to get stuff set up before going to bed. I can get back to it tomorrow
!leave

macos is honestly quite nice since you have support for applications made by major companies who hate linux users, and it is unix based so development is also very organized if you get what i mean
The more i work with cpp the more i want to quit my job
Because its so much better
I guess it could go with any normal language/ide
Just look at this crap
It goes deeper for 500 lines
And then the array is used normally like array and not bunch of separate variables
In another boilerplate
At least i can copypaste this shit using excel and notepad
How goes the Chess?
Yesterday my bot won 1 game vs random-move bot and lost 20
Something is wrong with evaluation
How silly
My bot wins 99% of the time to random moves
I really need to sort out those draws somehow
Yeah 3fold is a problem
I wonder if move == otherMove somehow doesn't work
Get game state doesnt detect 3fold
There is a function to get zobrist hash
You can manually check it i guess
I've been thinking I should swap to the hashes
Its not about moves its about overall board
You can make 2 same boards using different moves
Also I think the hashes aren't gonna help here either because it's not even about same board state but apparently repeated moves on one of the players' part
Nono it should be board
My one bot is specifically making differing moves, but the other is just moving the king back and forth, causing 3-fold repetition and my newer bot doesn't know it should move differently to avoid it
Nope, it's moves
Or state of just one player
Well it does that literally every time I put ver8 and ver9 against each other
Hm
Google says its moves too
Its moves, board and castlinf rights and other thing
But isnt checking boards enough
I'm now explicitly checking to see if board states repeat
But that helped literally nothing
Since board state hashes are not the same when the other player makes different moves and the other identical ones
@sage crag 
I have no clue how to deal with 3-fold
Even putting the same bot that tries to not 3-fold against itself causes 3-fold
just penalize draws 
100% of the time
I already doooooo

Any draw sets the score to 0 immediately
How can they get 3fold if you ban them from making same move more than 2 times
Or what exactly are you checking
What if I just take of a ton of points from a move if it lets the opponent create a draw
Shiro was saying something about 3folds a while ago i think
And used hashes to deal with it? iirc
Oh so apparently that makes it draw faster, of course it does, why wouldn't it?
Block opponent from causing 3fold 
I don't know how to do that
Then lose to him 
Try making hash of board for every real move made and then check if your next move causes same hash more than 2 times.
Maybe start with 1 time
So every board is unique. To see if that works
I already check if it happens more than once but that doesn't work either
if all boards are unique then how can it be a 3fold
Because somehow it just doesn't care that I tell it any move with a board state that existed before is 0 points
Make it -9999 points
Cause its draw = loss
Also, is -9999 two or one token? The minus is a token?
Woah
I didn't know 3-fold can consist of more turns
It just created a longer loop
Oh so you checking only last 3
Well, I increased the buffer length for board states
Now instead of making a 3-fold it draws by insufficient material
Isn't that just so much better? Now it blunders its queen rather than moving its king closer

I think I need to reduce the king move penalty if there is few pieces on the board
Well now it doesn't blunder its queen
Now it makes a stalemate
Now it doesn't make a stalemate but instead draws by the 50-move rule
aaaaaaaaaaaaaaaaAA
My bot is so terrible at Chess and I have no clue how to make it better
It would have to be able to think about piece placement and long mating chains
I guess I just need more recursion
I havent figured out mating mechanism either
I check king mobility but it sacrifices pieces now
I think I just need to make it recurse more and find moves where it creates a checkmate and give those higher scores
Rook goes 1v1 with king only to block 1 more move for king and gladly die next turn
It's just not finding the long mating chain it needs to win with just a queen and a king left and the opponent with only a king
I guess all these current changes are all end-game things
I'll have to make the mid-game better somehow too
Look at this nice function to count all my own pieces on the board though fun countOwnPieces(board: Board) = PieceType.entries.sumOf { ChessApi.getBitboard(board, color, it).value.countOneBits() }
I have very few functions in this because defining a function costs a lot of tokens, but I think this one should be worth it
coding on tablet goes hard
Main reason im testing this is cuz some classrooms dont have sockets to put my charger into
So apparently 6x exponential recursion is very expensive, who could have saw that coming
Or wait did I accidentally do 8x recursion
Oops
6x like 6 full turns or 6 halfturns
I tried 3x halfturns so basically 2 full turns and its alright but is already visible.
I assume going deeper is too hard for me.
However i almost dont optimise it so its raw 20x20x20x20x ... moves
Probably optimisation can help a lot
Well, there was also some weird error going on crashing things
I think it's either an error with moves being made on internal boards, a race condition with moves being made on internal boards, an issues of a similar kind when undoing moves on internal boards, a bug with the get piece function, or the Chess API returning illegal moves, then not making them and returning wrong data
It's 99% the get piece function
@real sierra You may want to note that down, I doubt my code is wrong in this case
I do think I probably need to change a thing about the Kotlin Chess API though, potentially
Just an internal thing so it returns null instead of an error if there is no piece
I'm leaning towards race condition or error in making moves on internal boards
I don't see how you'd have a race condition given the part you interact with is single threaded
Well, somehow a move I'm trying to make is not being made, or the piece in the position is not correctly obtained
It also just happened to me without having made a move on the board so scratch the race condition thing
It's something wrong with getting the piece from the board
Is it random or you can replicate it?
It's just random chance, it can happen at any point but somehow more recursion increases the chance
So maybe calling the functions in quick succession, though that would indicate a race condition again
But get piece function is so small
Surely its safe 
Or is it big. Now im not sure
and your bot still did good
whats going to happen when its flawless 100% unlocked potential
Kotlin monster
So passing the correct thing made it bug way more
Maybe this bug negated another bug and now it doesnt
The options are that I'm a complete idiot and do not correctly make and undo moves or the API is a complete idiot and does not correctly make and redo moves, or the API is a complete idiot and doesn't know how to find out what piece is where
Do you work on 1 board or make copies
I make a copy at the very beginning, then work with that copy
Try working with original
I had problems with copies yesterday too
I get 1 board now and work through whole turn in this one board
I pass its pointer into recursions as an argument but probably just getting its pointer in every recursion is ok too
Since its supposed to give same pointer anyway.
Still bugged but somehow way less
The weirdest part is that it did at one point also happen on the plain unaltered board
Waiiiiittt am I an idiot?
Why is this line here?
Ah
I get it
It's outside the recursive part though
So it shouldn't break it
Finally managed to get a stubborn package working in a distrobox
Feel like a 7head hackerman rn 
I bought a drawing tablet 
"Wacom intuos pro medium"
Idk what that means but its big
Made an issue for what I think is going on
Will close if I figure out I've been stupid this whole time
Sam art when
Its the 2017 model, the ones i found online are the new 2025 model
Probably soon-ish
I still like drawing on my android tablet cuz i can see what im doing better, but this should be better for professional work
Did u need to buy it for the game design stuff
It was €150 so its probably good enough for what i need
You draw on it and look at the monitor?
Sounds uncomfortable
Ye
Only need it in the 2nd semester tho
its just a matter of practice
touch typing is probably harder to learn 
Are u learning game character creation or what
Or is concept art also part
Or do u need for blender sculpt
literally took me 2 minutes to get used to

smh I want to sit down and write a chess bot but alas, job application time instead
Everything
But mostly environment
Not sculpting, we do low poly
environment is always fun. Honestly it is like the #1 thing I take photos of when I'm doing a photoshoot.

i have to do it too
surely my genius idea in my head will perfectly translate to real code and have no issues whatsoever
you get used to it over time, it's like typing without looking at the keyboard but just for drawing
Finally got the chess api running in cutechess on windows, was such a headache to achieve but now I can finally start with the actual programming part
This entire setup part felt like some sort of devilishly difficult rite of passage
great to see absolutely nothing changed. this is with one tab of twitter open
firefox should explode

konii no longer tv, becomes vm confirmed
anyone in here have gone to icpc final or ioi?
i highly doubt that 
people who use 4/8gb of ram need to be studied
erf
it makes me irrationally angry when UI elements are called "pills"

i know a pill is a shape but please

toast


🔥
cook bred => lack toast

bwa
bwa
the desire to work on lily is overcoming me again but also i dont want to work on hbvm right now

it isnt
everything is related to hblang
Hii
hello notification ui primitive
Mordecai in #programming is crazy
twilight sparkle where
-# can we pretend that airplanes in the night sky are like shooting stars


@trim valve turns out that MSVC is stupid, and while it supports C23 features, they don't have a -std option for it... but with .std("c17") it works, one just has to then also set the LIBCLANG_PATH environment variable to a folder with libclang.dll for bindgen to do its thing... I can verify that this works, the example Rust bot compiles fine and makes the random moves it should, so you could either change the std argument to cc to "c17" or it looks like "clatest" also works (but doesn't specify a precise version, just "whatever MSVC supports as latest")
"turns out that msvc is stupid"
sure grandpops let's get you back to the nursing home so you can play with your ms paint
With or without the AI features?
windows xp era ms paint
the best ms paint

can we just explode the windows users
some of them do
at this point what even is a good compromise
force everyone to use clang and just document that it needs to be installed?
it looks like I can force cc to use clang

only windows devs use msvc
and windows devs dont use windows

time to vendor clang 
that is the strat
clang can be installed using visual installer so shouldn't be much of a issue
also winget
visual installer 
this is #programming
just not sure if its gonna be in path. i did do a ton of manual tweaks to my path for other projects
we talking about windows here 

personally
not my problem cli installer only

can you install visual studio through cli? i thought MS's Visual Installer is the only way to install all the different components
you can give it a json file or sth with everything it should install and do that via the cli
i’ve heard about npm i -g visual-studio-tools or something like that
but that would still require the visual installer to be installed
which is fucking crazy
yes npm not winget
no good compromise with C
explode C
but tbh you could just make a feature flag to switch to clang... and all the Windows-specific stuff can be behind a platform flag
Doing the bot through python, is it normal that the get_piece_from_index function throws an error ("0 is not a valid PieceType") when I try to get the piece from an empty square
windows specific solution called doing it in ci and forcing people to download prebuilt binaries on windows

ngl could be a solution too
would probably be needed for the JS integration anyway...
And get_color_from_bitboard is trying to return a Piece lol
isnt it better to make that depend on target?
oh yeah, msvc has its own target
then for msvc target use msvc stuff, for whatever the clang target would be use clang stuff
that would probably be x86_64-pc-windows-gnu? not sure
if you need clang over gcc it'd be x86_64-pc-windows-gnullvm i think

use PieceType | None instead
@real sierra fix 
(just return None if the function returns 0)
Current bugs I got put together in 1 message for easy access:
When trying to do get_color_from_index: "-1 is not a valid PlayerColor" (Add NONE = -1 or smthng to the class idk)
When trying to do get_piece_from_index or get_piece_from_bitboard: "0 is not a valid PieceType" (Idem)
get_color_from_bitboard tries to create a PieceType class instead of a PlayerColor (Copy pasting mistake I'm guessing)
More hyprland bugs yippie, I love no monitor scaling on a laptop as a botch fix
thanks for the report
Luckily it's all quite trivial to fix stuff
undercooked bindings undercooked contest
ban shiro
Option[PieceType]

from typing import Option
import bad 
yes pls i’d like my type system to add runtime overhead
Union[PieceType, None] 
The scuffed setup for running the bot that I use doesn't output print statements properly so now I write it to a txt file directly instead and it honestly feels like I'm comitting warcrimes by doing that
python
you bad
Im bad at C 😭

you can do print('info string abcd') i think maybe
aren't we all 


O lemme try
that’s valid, with tail too? hell yeah
but i just did 

Very silly
Sadly not working, might have something to do with the scuffed way that I run cutechess through windows but the bots through wsl
How goes Chess?
I am both experiencing and committing programming warcrimes
Go?
How silly
why 
i read lda and sta and instantly had flashbacks to my 6502 assembler and emulator

this channel is chess-programming

6502 bindings for chess api when
bindings for my old enterprise IBM computer

normal instr name
ye anyway konii writing an ISA from scratch, fun pasttime
ye vhdl next 
i will make an asic 
(lie)
turns out that clang would really likely have to be behind a feature flag, not behind pc-windows-gnullvm... but it does work
does the target break things 
yeah, it fails to find stdlib.h
damn
which is pretty important lmao
this is like how you cant use fwrite_unlocked without #define _GNU_SOURCE

c is a great language
i love c
C is pretty great, the tools around it are atrocious
c is not pretty great, c is perfectly plain

it is after all the baseline for modern programming languages
i love c
c does not bring me pain
lieleaf
c# and java are the baseline of pain
i am currently programming free 
im not programming free

void free(void *ptr) {
ptr = 0;
}```
idk what the fuss is about this is all free does  
could be worse 
could be 6 hours of p*thon
void free(void *ptr) {
static void *libc = dlopen("libc.so", 0);
static void(*f)(void*) = dlsym(libc, "free");
f(ptr);
}
im done
Fair
I didnt get to do anything fun do, we havent even started on functions
Or "methods"???
no dlclose 
every method is a function but not every function is a method 
methods are functions which are members of classes 
Arent they all methods then in C#?
only non-static members 
but wait a minute
not every procedure is a function 
function means what you want it to mean
yes
ever since c functions started being called functions


ye i always found the semantic difference silly

okay technically no
is this a c#ism? static methods are absolutely still called methods in java
function is something that transform data
Java 
if it have any side effect at all then it also function
you're right 
big oop at it again
maybe a vtable if you are lucky
wake up, none of this is real
i think the idea is that its a method but on the class object 
Depends on your concept of the word "real"
Old Fortran joke: GOD is real, unless declared integer.
they're just fancy namespaced functions at that point since they're not passed a class instance 
you generally don't think of static members as being owned by a "class object", but yes
Im at a club fair thing rn, people are trying to recruit me to their cult (magic the gathering)
Art
this is a bucket
Dear god
there's more 🪣 🪣 🪣 🪣 🪣
No
when i hear buckets all i can think of are hash tables and filters now
hi t

hi rain
currently it remind me of improving stockfish video
** ** 🪣
i hear bucket, i think bukkit
goes against flow direction 
classic
pouring from bucket

infinite bucket

my first thought was "holy shit is that bbno$" but no that's just the garbageman from the jack black movie
the consequences of alcohol
dont make me thirsty
oooo you wanna go for a jack daniel's sour don't you
i didnt like it at first but when i drank enough i didnt care
i have a feeling there is something wrong with api
is there a simple way to print a move
its not in the h
i guess i could temporarily add it
idk about you but i always care about the taste and how hard it goes down no matter how drunk i am
which is why i'm not at danger of alcohol poisoning
..unless i have some sprite to chase it with
my ability to code increasing as i feel the alcohol running through my veins
i could go for a long island ice tea with sprite instead of cola rn
write one yourself
they are really good
i am salivating
even normal mudslides are good
this would help me program so much better
note that you have to prepend info string to every line so cute chess actually picks it up as a debug string rather than a chess command
i'm about to cry
i can't write a gltf parser sober
but i must
i must resist
i must persevere
or i could use someone else's parser, but that's the pussy route
improved recipe. i recommend making 10 servings at once
you can't remove the liqueurs too
that's evil
can I just have ice cubes instead
you compensate with vodka
but
looks like its hard to steal
i want a good taste

the api just returns you a Move struct
just print its fields
tf do you mean "❌"
i will have to bitboard shit
vodka literally tastes like hand sanitiser
oopies lol
will fix
theres a dump_bitboard function in bitboard.h
or you can use bitboard_to_index in this case
this channel
or was it chess_index_from_bitboard
don't buy cheap vodka
i'm not rich
then buy cheap vodka
wait what does dump bitboard do
no
and enjoy it
i'm gonna buy cheap liqueur
i want to see the move as a1a2
ye use index_from_bitboard
it will return you a number from 0 to 63
just do % 8 and / 8
then i get an index
then i have to get the enum of piece
then i have to chose its letter
if only i had dump_move 
if you just want to show "a1a2" you dont have to show the piece letter
i guess i have no choice this thing isnt working as i see it
its either i dont see it right or its not working right
oh yes why did i think i needed that
the only thing that can kill me here is board orientation
can't you just
const char letters[] = "abcdefgh";
const char numbers[] = "12345678";```
and index that

can you also add DLLEXPORT to all the functions in bitboard.h 
whatever i'll do it
why not just 'a' + int
cause i need 'b' too
too efficient
const char *pos[] = {"a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "g1", "g2", "g3", "g4", "g5", "g6", "g7", "g8", "h1", "h2", "h3", "h4", "h5", "h6", "h7", "h8"};
or that
make issue or PR so I don't forget please

did you just type that by hand
was I drunk making this 
'a' + index gives you 'a' through 'h' assuming an index >= 0 && index < 8
can it be optimised into this by -O3?
no i used speech to text
file = 'a' + index % 8;
rank = '1' + index / 8;
the performance/memory difference isn't worth thinking over since it's just a temporary thing on a modern computer anyway
in cpp i will probably need to const char into char* string to sting [[]asd,<>>K smth
now you gave me 50 variants i cant choose 
just use this
other variants are worse
i sent mine as a joke
and index i get with get_index_from_bitboard or how is it called
which gives me 0..63 number
or 1..64?
0..63
0..63
what kind of psychopath would start counting index from 1
(cough cough, lua, cough cough cough)
Lua 

we don't have them yet lol
screw my gltf parser, it's moonin time
obviously have to do some char into string magic
i forgot * somewhere right
or not
std::string(&file, 1)

or std::to_string(file), pick your poison

where do i find the chess api
gg
i thank you 
nah it cant be that easy i remember playing with chars and strings before its always worst possible scenario
to_string variant:
brainfuck bindings
it's probably converting it to some kind of int
if you want a one-liner, just do cpp std::string textMove = (std::stringstream() << ('a' + index % 8) << ('1' + index / 8)).str();
(remember to include <sstream>)
very sane approach
trust
note that you also have to send a pr to toknt to add lua support
its 10450

sigh..
std::string textMove = (std::stringstream() << static_cast<char>('a' + index % 8) << static_cast<char>('1' + index / 8)).str();

very insane but works thank you

too many tokens 
at least do std::string() + (char)('a' + index % 8) + (char)('1' + index / 8))
you can do that yes
but that's the boring route
use string streams like a true alpha chad
i will not use that in release version i need it to debug my logic
Mfw my encryption got broken because I forgot to feed my slime random number generator


Is glorp-2048 strong enough or do I have to use gloop-4096

Did you figure out why the Chess API is broken yet?
the castling thing?

No, the one where getting a piecetype from a bitboard wrongly returns 0
At random
it can return 0 if theres no piece in there 
thats expected
If I'm not completely an idiot I am 100% sure there is a piece in the spot I am checking
if there is no piece it should crash 
All of the spots I'm checking even
k&r brackets wouldnt have this problem 
Because I am checking the spot where a move should have the piece start at before making the move, or the spot where the piece ends up after making the move, the moves being made being on an internal board element
Since the Move struct doesn't itself tell me what piece is being moved
what the fuck is this
it thinks a knight is still there and "takes" it
what am i even supposed to do
did i undo too much
uhhhhh
i figured it out one is spinning on a different axis
goddamn vllms ruining everything
that's a horrible captcha
I have literally no idea in what situation would a piece never be in the spot a piece lands on after making a move after making that move
@sick owl google added new pointers to their models in ai studio.. also flash-preview-09-2025? did they update the flash and flash-lite in september?
which move does shiro use for castling
because technically you can move onto the rook with the king and this case is true
LuaLexerBase uses var 
can i update the build script so it uses java 10/11 or do i just suck it up and rewrite LuaLexerBase to be 8-compatible
@real sierra do i work with one board during all my calculations or i have to clone it?
it says i can push multiple moves
both options are open to you
original intent was to work with one board, but some languages don't really support that paradigm, so cloning was added later
I tried just skipping it on castling but it still bugged, so not castling
castling is always a king move onto the destination square
i would hope that cute chess represents the move this way in UCI as well
Well I assume castling would then return the piece type as king if I try looking at its starting square before making it or the ending square after making it right?
that should be the case
moves also have a castle flag you can check
it's part of the struct
Then why in the Neuro-sama is it possible for a move starting position before moving or ending position after moving to return 0?
only case where that should occur is if you fetch the opponent's move on the first turn
otherwise is bug
Well I'm about 99% confident I did not mess up on this
For some reason it has huge correlation with recursion levels
just make it iterative instead of recursive 
Insert people complaining about an experimental feature here
-# It was this or pull tab on the right (hand over the command menu style
)
i will finally have some time to start looking at these bugs later tonight
Yeah I'm quite sure something somewhere is either having a race condition or not making the move I ask it to make, or not undoing the move I ask it to undo
race condition doesnt make sense, it's single threaded
anything that the UCI thread and main thread share (i.e. the internal api) is behind a mutex
Well I don't know if different API calls run on different threads or not
they dont
Then probably a logic or memory corruption bug
you're sure you're not reading a move array past its length or something?
my pieces try to eat themselves 
and rooks wiggle -> <- eating themselves
(they are not there actually)
That should not be what is happening as I have not had issues with having invalid moves in the move array
Other than the castling moves which seem to be a bug
very odd
if i push and then get legal moves, do i get legal moves for opponent? or do i get it wrong
push does not change the state of the board
Yeah push waits until done
push sets a move to be played, and done submits the move
that was the problem the whole time
if you want to manipulate a board locally, you want make_move
Definitely not the mistake I'm making, I'm using the proper make move and undo move functions on a board pointer
i thought i can push and check opponent
what does undo stand for then
if board isnt updated
i just cancel last push i guess
see make_move
finally thank you now i get it
Yeah make move updates a board but doesn't push
Or should at least
I don't know if that could be the thing breaking or not
no, that should be fine
get_board returns a clone of the internal board so any changes you make to it should be self-contained
gotta go for now
if you find anything else out about those null moves, ping me or open issue so i can see it later
i have to get new board after i made a move?
sorry for bugs, we'll get them patched 
no, you don't have to
but if its a clone
its a pointer to one and only board isnt it
if i made no clones
I don't know if they're null moves or the board state internally not reflecting the moves, or the moves being behind the board state, because the function that breaks ends up being getPieceFromBitboard
get_board returns a copy of the real board for you to experiment with
make_move lets you make moves on that copy of the board to explore positions and check the legal moves available
undo_move undoes one make_move
push selects a move to be played on the actual board
done submits the most recent move pushed to be played by the bot on the actual board
That's how it should work if it's working anyway
i use that. for me it doesn't trigger unless i swipe right from the edge. it might be an ios specific thing or a setting or something i don't remember
point is i never trigger it accidentally
Right now I have to waste a ton of extra tokens catching an error
Which hopefully won't be there on final, either I make it return null if it bugs on the API side or it gets fixed
surely you can reduce that with some playing around
Android has a few conflicts because the system prios the "directly from the edge", so the only option would to be fullscreen or use pull tab
oh right the back gesture is from both sides for you
Yep
Have you ever logged which moves you get this error on? I got three invalid "e8g8" moves in the last test and nothing else.
I'd accept pull tab if it were on the top of the screen
The castling breaking stuff is a known issue that the cause for just happens to be not known
But we have no clue what causes this other bug, specifically excluding castling moves from the breaking function still breaks
they've been trying to reduce it from 2700 or so for the last few days
Honestly, hand over the PC search bar as a top swipe similar to obsidian's mobile app. I'd like to see that.
dam
Well for now I guess I'll try my recursion bot with the bug temporarily mitigated
they should make it opensource so we can help, and totally not because we can then make strategies against the bot 
Actually I kinda wonder what happens if you try to make the invalid castling move on the internal virtual board and then try to undo it
If that desyncs the undo and redo count from each other then that would explain why things explode
nothing much happens. I do it all the time during search because I don't care and cutechess just catches it
And would mean fixing the invalid moves being provided would fix the other issues
But if the internal board state just accepts the invalid move and makes it anyway, and then also properly undoes it, then that's not it
yo
o
yoot
that is basically how it works for me since swiping the message is quick reply
does anyone know why this is happening? im using the example bot in python on windows
this is pretty weird
i also got games before when it lasted for much more turns after this
i probably undo something wrong again
hard
make_move does not perform legality checks on the move supplied
and undo_move restores a copy, so regardless of move made it should work
it could result in a board that isn't possible
Hmmmmmmmm
if you're making illegal moves that's your fault 
So then I have no clue as to what causes it
You'll have to figure out what could be going wrong
Not when the API says it's legal, so fix that one
The castling bug
shouldn't the function that returns legal moves return legal moves 
nah, break the law 
It should, but there is a bug where sometimes it returns illegal castling moves
Hopefully all these bugs can be fixed so I don't need extra code to handle them
true
castling bug is hopefully an easy fix
probably just need to tweak a mask

I wonder what could potentially cause the board state corruption though
new dr stone episode
it's always e8*8
1506 tokens
so it's specifically a castling issue with black
I wonder how hard it would be to run a bunch of existing games on it to see if there are any remaining subtle bugs
lichess has quite the big database after all
at one point I ran 100k random move games
which took maybe 15m?
there are so many sneaky edge cases and half of them are because of en passant
for example uhhh
fun, those things
k-------
--------
--------
--------
K---pP-r
--------
--------
--------
en passant got invented in the 15th century
programmers in the 14th century:
programmers in the 14th century 
time travel be crazy
ah yes, the classic "x-ray-pinned pawn" 
it is illegal for the black pawn P to en passant capture here
because it removes both pawns from the 4th rank and places the black king in check
how the hell do you checkmate 
it just eats all random bots pieces and then slowly dies to bare king
by making it so the opponent has no legal moves that would put the king out of check 
some people try to force the king to the side of the board, usually gives you a better chance that it'll find a sequence of moves that result in a mate
ultimately it's a hard problem tho
a late-game empty board has a lot of legal moves since the rook, bishop and queen rays extend so far
and you often need to search deep to find a mate
at least my bot stopped losing to random bot

thats something
A lot of things definitely still broken
While I wait for fixes I'll just make Teto even more Finnish
Well, I found a method to get it working. (Discord is now considered a game mhm)
It is still cursed
Alrighty, enough jank.
1503
3 tokens in 20 minutes
I notice the token count is shedding a lot slower
which language are you using
C
how many macros
one

:uhh:
you haven't used macros yet?
we're allowed to use macros?
lmao

in C? yeah
okay, what about other languages?
if the language has them, yeah
Python macros (real)
why wouldn't you be allowed to use macros?
I mean the rules didn't say anything about macros I don't think
pretty sure Shiro was talking about not allowing them at some point before the thing began
I love writing my own bindings, I get to fix issues I find for free
I had considered it but ultimately it wasn't necessary
the rules on the GitHub are accurate (and subject to changes which will be recorded in the change log)

In the words of shiro, embrace bclose
i feel like adding macros is a fun challenge as well
I mean, it kills languages without macros but whatever
ultimate token savings
not really
the macro definition still counts for tokens
so it's basically a function at that point
so just use functions
its like a function. but more
can't make a function for } return rv; } void
https://github.com/strubium/ChessBot2025/commit/660d6de1260088001d1222ce7ab72b4189d34aeb
souce code if anybody wants to make fun of me, still not using the api and im happy about it








school is over




moves with no destination or origin square

but no time
