#programming
1 messages · Page 205 of 1
whats sbt
to build a jar do sbt assembly
shiro build tool

Can it just output max length string with token counter so you see it right away
can i just apt install it
maybe 
i decided to throw random values in until it feels nice
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo tee /etc/apt/trusted.gpg.d/sbt.asc
sudo apt-get update
sudo apt-get install sbt
ip grabber
i just use nix where its packaged 
rpm
curl -L https://www.scala-sbt.org/sbt-rpm.repo > sbt-rpm.repo
sudo mv sbt-rpm.repo /etc/yum.repos.d/
sudo yum install sbt
why wouldnt it have apt-get
it does have apt get
then run this
doesnt have deb
what do you even mean by that
am i reading this wrong
yes 

oh right
my java is just sitting in a folder
i dont actually know how to make it globally callable

restart shell
ty
yeah im something of a leet hax0r myself (i fuck with my ~/.zshrc and reload it constantly)
every morning i go to sleep
it was very unhappy
works on github ci
every morning i break my legs
every afternoon i break my arms
at night, i lie awake in agony until the heart attacks put me to sleep
hi t 
SpongeBob and Patrick meet a poor guy

chay audits all reactions
user error
right
now that i have the new token counter
lemme see if theres anything else i need to do before contest open
i need to add the rust api docs
haskell bindings 
me
o
you're the only one waiting on them so i can start contest without surely

no i want people to have the option from the start
If you add "who am i" in the end you get some kindof riddle
it's not really fair otherwise imo, timeline wise
this emote is unreasonably kawaii
i mean
i kinda chose a month timeline to be more than enough time
i think people will spend far less time on the contest than a month
when was this decided
some people took multiple months on sebastian lague's contest 
my point is i don't feel the need to rush it
sure but
there will guaranteed be requests for new languages after the contest starts either way
no matter how long i push it back
some people just wont hear about the contest until it starts, and then request something
so idk how much delaying it really helps
it helps me 
i know that
Announce it and give people couple of days to submit languages they want 
Give away api after that and start 1month countdown
it wont help those who dont know about it yet so but that cant be helped
doesnt work like that 
you have to have the api to create language bindings
Oh they are supposed to make it themselves
I thought you volunteered to make all of that
For some reason
My beloved language
nono lol
i made the C and python bindings
but i dont know rust or haskell or C#
so i obviously cant make bindings for those
How does it even work
Dont you just need a list of pointers for every function and that's it?
This sounds like 5 min problem
anyway people who learn about the contest after it starts can't complain but i can 
U don't know C#?
ok you know what
i thought about it for a min
Ask Byter for rust 
and i did already agree to give you the repo ahead of time for the purpose of making haskell bindings
so i guess its only fair
but also if anyone asks for a timeline on the contest starting, im pointing them at you


The one Haskell user left using the bindings
i dont think it'll take you long
when does it start
i made the python bindings quickly and im terrible at this stuff
Is this a neuro contest
before 2100 
chess bot contest 
Whats the goal
Evil, do the announcement
create the strongest chess bot in under 1025 tokens
Interesting
Idk if minifiers exist for C
minifiers wont help with token count
thats the point of using token count instead of just length or char count
Sounds like a cool challenge
Im still working on my anti chess bot idea
trying to compress so much logic into a tiny space
Im doing university work atm
erf
i checked antlr/grammars-v4, and the only useful languages to add would be:
- swift
- smalltalk
- scala
- java
- any lisp
- prolog (questionable choice)
- pascal
- objective c
- lua
- kotlin
- javascript
- java
- go
- fortran
- erlang
- elixir
- cobol
- ada
other ones would have to have a custom tokenizer impl (not that hard but more effort than usual)
ive been trying to figure out if theres a library in C that imports stdlib and stdbool so i can eliminate one of the imports
superbox wanted kotlin
if it were supported they'd be on board to participate i think
if it does that would be platform specific 
you can use _Bool tho
(deprecated in c23)
Nowhere better to look than hardware / embedded software tbh
just a deprecation surely its fine 
Is it open source
my bot? no
the chess api the contest sits on top of? it will be once the contest opens
U can always see how ur compiler handles code changes and just manually implement them
wouldnt that make my code bigger
If the compiler changes something to be smaller then implement it yourself
the token counter runs on the source code, not compiled code
i am super doubtful the compiler makes my code smaller

i have 2 projects i've committed to for other people, 2 phd-level projects i'm dedicated to myself and associated reading, manga scanlation project, aaaaaaaaa how do i get time (don't say use discord less)
dont have to support every language people ask for
i never made any guarantees 
up to your availability is fine
Its time for chayleaf mitosis
no tokenizer is done as far as i'm concerned

Tbh when it comes to algorithms psudeocode is actually useful for taking a step back and trying to optimize
so is it the haskell bindings worrying you
mhm and other stuff
or do you think you wont be able to write a bot even if you make the bindings
Damn that's a while
yeah i mean
my bot is only 250 ish lines right now
50 of which are defines and structs
it doesnt take long to get that much code down
but i respect you're a busy person 
I think u should look at the optimization steps used in some compilers to see if there is anything u can use as reference
i dont think there is
i dont need machine code
it needs to still be C
ive already looked at the compiler builtins to eliminate libraries
and i dont think much of this can be inlined with a reduction of tokens
I mean how it handles eliminating parts of the code
you put too much faith in compilers 
You put too little
i literally write them
war
I work in more than just C#
Idk pal if u can write a better compiler than the existing ones u can be really rich
you really cant
theres not much money in compiler writing
most compilers are written by a single person for a single person
and people routinely make better compilers for specific tasks through specialization
Well duh because at that point they might as well be writing asm for such cases
nope 
thats something i do quite often
Dodging asm like rain drops
But if everything is macros
Shouldnt you optimise the macros
i am
i have macros of macros
ive looked through to see if any were bad but no
they all gain tokens
and they're all in use somewhere
to clarify i do take compiler opinions from people who work on roslyn
roslyn's great 
Because of 24 tokens 

because of 24 tokens
i could simplify the material eval function
that might save tokens
i wonder what the unmacro'd size of this is
is there any way to run the preprocessor macros

they LOOKED UP THEIR IRL NAMES

1042 tokens
i really dont know how to shrink this further
#define cbclose_return_rv_sc_cbclose_void } return_rv_sc } void
It must have something big
Really hard to guess what can be shrunk when you dont see the code
It sounds exciting cant wait to start
set up a python referee for legal moves and now have a working shitty chess """"api"""" to test games
both the test bot and my actual bot are currently rng lords
made stockfish analyze the rng games
he's on the edge of his seat for the last 100 moves of this 200 move game of just nothing happening while white randomly runs around
he did in fact have 3 fingies but at first i thought the ai was just being savage as fuk looking at this game of his
like damn i know he lost but you dont need to go that far

paranoid, decide to check if the stupid shai halud thing got into any packages ive built with any other node crap i was building
500+ packages are on the list
jesus christ
shiro did you watch the new dr stone episode?
bun:ffi exists, maybe just not use node then?
import { dlopen, FFIType, suffix } from "bun:ffi";
const { i32 } = FFIType;
const path = `libadd.${suffix}`;
const lib = dlopen(path, {
add: {
args: [i32, i32],
returns: i32,
},
});
console.log(lib.symbols.add(1, 2));
like this is so much nicer than writing miles of v8 fuckery in cpp
claims to be way faster too
only problem is you can’t easily make stuff async like you can in node with direct libuv access, idk if that’s necessarily needed
there's still a few usability things but this is mostly finished
tl;dr gonna try and see if I can make zercopy play nicely with my structs
i think it is since green threads and processing between moves is explicitly allowed, getting the board should be an async function
or at least i think it was allowed
Still no Kotlin token counter I assume
Token limit
I think we're a bit closer to it now?
Every new day every Chrome bugs update
#programming message yeah it can be added at some point
It would be cool
Otherwise I can't really chess bot with any reasonable amount of effort for such silliness
I think its allowed as long as it doesn't bring in actual threads?
though I can't really see a way that the C binding wouldn't have to block in a single threaded scenario
right that's what i thought
libuv does async io by polling
i mean epoll specifically, not blocking
file io is a thread pool still

How does it work
If you are using one thread, whats the point of multithreading?
Oh i mean if you are using one core
Why would we interrupt whatever is happening in its head
Its alright when we have some interface which gives commands in random times, but here we have "wakeup -> receive go command -> make decision -> return decision -> sleep"
yeah as far as i understand getting the board or something else is blocking until your move
no way to make a blocking function nonblocking without offloading to a separate thread
and any threads are off-limits
Its supposed to freeze the bot out of your turn
And when turn starts you already received a command to go so you are not waiting for any input
At least shiro said its not allowed to think when it isnt your turn
Because tournaments go like that
aha
right then it's not an issue
but still doing node bindings is probably a good idea?
I dont know what that is 
node js
Oh
node bindings are a pita, just throw bun ffi at it
I dont know it anyway 
brainfuck bindings
semicolon would approve
my interviewer for the company i don't want but have to interview for just left the room for a personal call and was like "please don't disconnect it's not like i'm not coming back"😭
yes
go back to your interview
things happen
start yelling into the mic
Not considering your time as valuable is such a dick move
bro had left me hanging for 8 mins

does it make me a dick if i'm not considering my own time as valuable? (currently writing my own json parser in c++ :3)
call me later ❌
ok i'm leaving my possible future employee on hold 
If you learn anything in the process it might be worth
Nah, that's yours to choose over
there is nothing to learn
i am merely doing this because i don't want a billion dependencies
then i'll be using my json parser for a gltf parser
wasn't json.h a single header
having a dependency you can upgrade? nah, you'll write your own that's worse and maintain that yourself

write it in a dead language that someone has to pay a lot to get forked in a decade
or opengl context creation
shiro chess bot mindset
cobol
my mother knows it somehow still
yo momma so old she still knows cobol
she doesnt look a day over extinct

bwa
today seems to be working on more NN stuff. Probably continuing to build out the test suite for the latest two modules.
If I ever want to try my hand at the chess bot tournament I do need this to work.
@true hemlock bro fix wifi pls
SoSilly
Strike this, I'll need to bring a tests dep because console logging is not the best option honestly.
Bot + user 🤣
🤣
If we had a bot account we'd never get funny moments like this
why not
Self bot will get caught
It's been awhile. Time to see if discord py is as bad as I remember.
I still hear complaints from time to time but need to see that for myself.
the api hasn't really changed at all but it's actually somewhat maintained again
not like a couple years ago where it was basically on life support for a while
Yeah, I swapped off to another library and just never looked back.
Honestly, still don't have much reason to
same, rewrote it in typescript and now i'm chilling
though i'll never not get annoyed at the inheritance monstrosity that is discord.js when i need to look at it
I'm still on python, just not discord.py anymore
moved to something a bit more sensible
Despite not using discord.py, having functional docs with a lot of normally extensions bundled in is nice. I don't use the native hotloading as much as I should be tbh.
https://lore.kernel.org/git/20250904-b4-pks-rust-breaking-change-v1-0-3af1d25e0be9@pks.im/ looks like rust is slowly making its way into git 
Good night 🌆
How is u re night tho
So somehow Discord was takiing up 15GB of my memory
impressive 
least wasteful chromium embedded framework using app:
I wonder where it leaks the memory, because the process usage is reported as like 6GB but restarting the app frees 15GB
if i had to guess, someone fucked up with some voice call handling logic or web socket bs
¯_(ツ)_/¯
import random
arr = None
try:
import torch
arr = torch.rand(9)
print("Using torch:", arr)
except ImportError:
try:
import numpy as np
arr = np.random.rand(9)
print("Using numpy:", arr)
except ImportError:
arr = [random.random() for _ in range(9)]
print("Using pure Python:", arr)
Im lazy i don't need
Import Numpy every change so
I make fall back script that it change depending on model
using import errors that way...
is there no better way to check if a package exists??
import model2.py
Torch.rand(9)
test
ModuleNotFoundError: No module named 'model2.py'; 'model2' is not a package
I forgot again' make package
most cursed thing ever
also you don't import py files with import name.py
you just do import name
or import .name, depending on your environment
just don't
if my client is so dumb that he/she/they can't see the fucking requirements.txt, I'm not letting them run my scripts
My script is working that fine

honestly fair

good work apple, i airdrop a file to my phone and it disappears. shows as finished but nowhere to be found
That is how you're supposed to do it 
nice software
Nice
Hey can one of you that are good at programming and scripting AI stuff message me?
impostor!
Why

My pc crash again
everyone here thinks they're good at programming and AI 
mint 
import importlib
try:
importlib.import_module('torch')
except ImportError:
import pip
pip._internal.main(['install', 'torch'])
finally:
globals()['torch'] = importlib.import_module('torch')
arr = torch.rand(9)
print("Using torch:", arr)
is this more useful

wait actually what are the specs of the tv
480p 1hz
1hz
are you overclockable
coffee
sam
do you think konii is simd
I think konii would make an excellent edge computing node
we should write some benchmarks
can I submit konii as my chess bot
if konii was somehow at my computer then that wouldn't break any rules I guess
agh it's too late to be worth going to class
I've missed 25% already
konii is an lcd tv so in theory many pixels get processed in parallel
My rule of thumb is if it happens more than a handful of times a week there's probably something wrong 
however often your doctor said its ok
How often do you want to hear “happy birthday Shiro!”?
my brain filters it out at this point
no more surprising an occurrence than the sky being blue
You should see a doctor
I should see a doctor
Yes you should
U should contact them
lmao good luck contacting the doctor here
it was only due to seeing the nurse's surprised reaction at my blood pressure that I decided to test that myself
my blood pressure is about as high as you can be and still be safe, but my pulse is as low as you can be and still be safe
not really sure what that entails
That doesn’t sound healthy 
I'm kinda inclined to agree
(If u went on reddit u might have an answer)
I hope to hear good answers not bad ones 
Take care of yourself
you would catch me dead before getting medical advice from Reddit
actually
you would catch me dead shortly after getting medical advice from Reddit
Lol i’ve seen people post pics and reddit doctors telling them they have cancer 
Usually it’s go see [this] doctor
what the fuck
this is creepy
i got chest pain around the time you sent that
anyone else about to do a win11 clean install to avoid the pain of some update that's totally gonna break
i hope the 9/2 sophia script is ready
if it breaks it breaks
to me it's like, a time of the year
i backup all the photos from my phone, export MAL stuff, update my offline contact lists, important game saves folder, all that jazz
find the external hdd, slam all of that there, also put some important stuff on a usb stick
also clean registry = speed woosh woosh
i'm low key prepping for the day when google decides i'm not me
and never lets me in again, breaking most 2fa i have anywhere else
i've seen one too many people locked out of their own cloud backups and online identity, learning the hard way that corpo does in fact not care
never seen this happen to anyone but I believe you that it can
I should probably look into backups on linux

On windows I just did daily snapshots of the boot drive, good enough
losing your phone is almost a guaranteed rip
in an ideal case you have a device at home that is "the usual device" and things will maybe let you change your phone number / turn off 2fa from there
but generally the approach is
"oh hey you lost that phone with google authenticator on it? sure we can turn that off, just send us the code from google authenticator on the phone you lost"
Don't use Google authenticator, problem partially solved
Well no
unless all factors have a customer service that are forced by law to give you access if you show a govt id
or aren't mandatory
Do use 2fa
this is honestly bad advice unless you're also providing the recovery method for stolen phone 
for example SMS-based 2fa is fine as long as you can go to the phone provider and be like "hey lost my phone, give me a new SIM with my old number"
authenticator-like stuff is fine if you have a pool of 2-3 devices that all can single-handedly pass every challenge
single point of failure 2fa is a bad idea
Well duh
generally anything that you can only do from a phone and not from a computer is bad 2fa
hardware tokens seem like a good way to do things
you can plug them into any device
and the keys themselves have a low failure rate ideally
just make sure to get 2 please
as long as they're not a single point of failure
yeah its easy to get multiple of a hardware key too
There are also plenty of authenticators that support multiple devices unlike Google's
i use microsoft authenticator 
it's weird how google manages to be the one who fucks this specific thing up 
it seems like such a "microsoft can't figure this one out" issue
but the roles reversed anyway
I think you can actually make it work but you're still bound to phones/emulators unless they changed it (maybe they did I don't use it)
i get random chest pains too but im a smoker
from what i know it usually is just some nerve being twisted or smth, not dangerous
if it doesnt persist then it should be fine 
also im going to install clean win11 for the first time tomorrow on my new pc
i hope it doesnt break if there was no update
do you want to use a local account?
also if you're not using ethernet, find drivers for wifi and throw them on the usb stick
since 24h2 it just tells you to get internet
🔹 Command Prompt Trick
On the setup screen, press Shift + F10 to open Command Prompt
Type: start ms-cxh:localonly
This launches a hidden flow that lets you create a local account without needing a Microsoft login
you can stil ltry this tho
gotta get used with times and learn win11 interface at some point
i'll have win10 on my work laptop and win11 at home. sounds nice
aalright i'll try
i just switch whenever they release a new one tbh
it's less of a pain the more you do it
people who always stick to the old one always switch too, just with extra pain 
i remember when i didnt want to switch xp for 7 
it was so much better, big mistake
but i can understand that hardware can be an issue 
my internal ranking is XP > 7 > 10 > 8.1 > 11 > 8 > vista
lil bro thinks its quantum healing device can revive 💔 fuck you mean "i apologize for the error"
xp top 1 huh
i have couple of VMs with it for work, its really outdated
not today, obviously
but it was the peak windows experience
i also used 95 98se 2000 and me but i was too little to have reliable grading 
i got my first pc in 2007 and started with xp
and i think there was some app in university that required msdos
thats all my experience with old windows
oh yeah and some controllers we work with run on debian
holy moly its so bad
one does not put debian and bad in the same sentence 
i dont know what kind of debian they are using there but its incredibly bad
it could always be more polished and less stable outdated but honestly debian is meant to be like
the slackware of 2005+
you just install it on something and then it runs there for 15 years while everyone forgot

at my previous company they ran the call center on debian 4 when debian 9 was out
there's some guy who made a server in his garage and put all the touhou OST on it in idk 2011 (400gb of mp3) and slapped some shockwave flash player on top. it runs on the same debian still
400gb of mp3? 
i thought touhou is some game
makes no sense
yeah it is
how can it be 400gb in mp3
it's like 20 games but it has a culture of people who make fan covers of its music
oh
cause the actual music is some god awful midi
also zun is chill about copyright and so are the fans, so it was always easy and fun to just make covers and put them all over the place
see that lenny in there
( ͡° ͜ʖ ͡°)
saw 24h2 and tried to figure out what chess move that was
its over for me
they call it "the cortana sacrifice gambit"
in other news, i'm parting ways with VLC
with respect and fond memories 
but by the same ethos i ditched everything for VLC, it is now time to become full time mpv
waiting for that vulkan output so i can watch hdr videos with vlc one day
tried patching it to build with vulkan support but either i fucked up or it just doesn't work 
i still find it insane that vlc is a valid rtmp sink
vlc takes ages for me to launch and the skipping around is also slow on larger files
is mpv a good alternative?
anyone have experience using Anubis over cloudflare? What's the difference in efficacy like—if there is one?

mpv is pretty cool tbh so far i haven't found anything about it i didn't like

download chrome buttons dont work in edge
sometimes i really wish Microsoft was fined for 1/4 of their market value with all the fines going directly to google
@sage crag added a board clone function if that's useful
i'd be down if the fines went directly to mozilla
works too
then they could kinda chillax with the weird direction they're going in
programmers quiet on Friday...



mb gang i was looking deep in my dms for a very specific video for the past 20 minutes
valid
now to write my json parser
phrrr

having a life
the hit neuro song?
no that's Never

what even is life

in fact the thinking machine has multiple languages!

sometimes there are even many thinking machine
some of those languages have dialects
one language per thinking machine unless your thinking machine is atypical
multiple languages that get simplified to a more efficient language depending on which part of the thinking language we're speaking to
the eyes of the machine have a different simplified language than the brains!
some times the thinking machines even imagine thinking machines
schizophrenia
phrr
What happened to MelbaToast project?
I remember reading their code a year ago, but haven't seen them since-ish
Hiatus until further notice, all the programmers became unmotivated so the content became stale
huh
is there a good formula for mapping chess pieces to their approximate value
that isn't just a table lookup
Other than chess notation?
no I just mean
well, there's if you can use
for evaluating the score of a board
the current evaluation function is just 9*count(QUEEN) + 5*count(ROOK) + ...
and I'd love to remove those n* from the front to save tokens
I could do it if I had a way to go from those piece constants to approximately the right values
"tokens"?
why can't you just do worth[piece] and have piece be a number from 0 to 6 depending on the type of that piece
why are you saving them?
because then I need to define worth somewhere
one idea might be packing all the values in a single number
I could do something like
but that's easy and takes less tokens, no?
i don't think it's less tokens
2 per number
I would need a number and comma for each value in the array
and then to actually index the array
if I just have a formula, I can bake it into count and derive it from the piece type
compared to 7 per piece this way
I need the count
it's value per piece * number of pieces
cant eliminate count(QUEEN)
but it's just a macro, I could add things into it
so I can replace the constant out front with something in the macro that calculates a constant from the piecetype
thats so many tokens
you have the loop macroed
enum TYPE { KING = 0, QUEEN = 9, ROOK = 5, BISHOP = 3, KNIGHT = 3, PAWN = 1 };
that would also work yeah
my idea is
I only learned Java. I’m no programmer. I learned enough for basics.
(char) 0x010303050900ul << piece_type
yeah i tried doing something like that
pack all the weights in a single value
wait
and then shift by the piece type since I know the enum order
hmm.
idk if the cast happens before the shift tho
would work a lot better than my implementation
would cost extra brackets if it does
yeah seems good
then I add this to the count macro and my eval fun is just
my goofy ass has the piece values as floats so i can't do something that easy
count(QUEEN) + count(ROOK) + ....
yeah screw that
ints are fine for me
i need the full suite of improvements
i did a silly (i would send screenshot but no embed)
since i have dnd on discord, and i have notifs disabled on chrome
i made a python app that notifies me about tutel streams 🙏
optimizable parameters like the piece values? gimme that
Are you adding En passant?
cast comes before bit shift
it's over
lose another 2 tokens to parentheses
and then the * you'll need after it
ultimately it only saves 1 token
no wait
& comes after <<
I can do 0xff & 0x010303050900 << piece_type

save 2 tokens
Also curious how you program Castling.
i can only imagine it's not very fun
the castling rules suck
all the boilerplate around generating and performing legal moves is already implemented in an api i wrote
an api that has still not been released
soon™
i promised chayleaf could finish the haskell bindings before it opens
they got sidetracked fixing the token counter which was sorely needed, so only fair that i give them a bit more time
honestly im scared of the python bots
i don't want excuses i want functions
like
but why though
i feel like you do tho
you'd think so
no type specifiers
it's like 40% gain
how
idfk
i implemented the same minimal algorithm as i did in C
was like 140 tokens to 100 or so
could maybe reduce it with better algorithms that take advantage of the built-in stuff in python
but then C has macros
i really don't think it's a good option
yes but it won't change a thing i don't think
even with your macros counting for tokens now?
idk how bad your macros have gotten but
they've always counted for tokens after i found out about that
im at this point
#define cbclose_return_rv_sc_cbclose_void } return_rv_sc } void
counter + define with *?
oh its not linear
thats the issue
but yeah i just do this and the define fully counts the tokens even with the old counter
do you transform letter of position into number or use it as plain char
letter of position?
a b c d
oh
Move objects dont store position as a letter and number
it's stored as a bitboard
a bitboard represents the chessboard, with one bit for every square:
8 00000000
7 00000000
6 00000000
5 00000000
4 00000000
3 00000000
2 00000000
1 00000000
abcdefgh
and what are "ROOK" and "QUEEN"
replace them with counter?
1 to 6 in ascending value
i dont get to choose what they are
its fixed by the api
1 to 6
but i dont just want increasing values for the piece values
smh shiro
2 pawns is not worth a bishop
and 3 pawns is not worth a knight
it's not a linear relationship
they mean make a loop, from 1 to 6, and then do something like total+=worth[i]*count(i);
for each iteration of the loop
no i mean
loop costs more tokens
then use it?
how
wait yes its useless you just replace "piece name" with counter then its 1 to 1
smh
my loop always starts at 0
i cant make loops that start at 1
that was one of the sacrifices made for tokens

can we see the loop that sucks
#define popdiff(P) 0xff & 0x010303050900 << P * (__builtin_popcountll(chess_get_bitboard(board, WHITE, P)) - __builtin_popcountll(chess_get_bitboard(board, BLACK, P)))
#define eval_score popdiff(QUEEN) + popdiff(ROOK) + popdiff(BISHOP) + popdiff(KNIGHT) + popdiff(PAWN)
this is my entire eval fun
you're telling me a loop, with all the associated definitions, is fewer tokens?
i dont believe it
i'm telling you to replace popdiff(QUEEN) + popdiff(ROOK) + popdiff(BISHOP) + popdiff(KNIGHT) + popdiff(PAWN) with a loop
im telling you its not fewer tokens
how.
because then i need worth and total defined
and i need to initialize worth
and then the loop itself
ngl it seems like way less tokens than all this
token counter says this is 67 tokens
ye 2hz
for (int piece : pieces) popdiff(piece) if rook and queen are in a pieces array
how do you know

just:
worth[7]={0,1,3,3,5,9};
total=0;
for(i=64;--i;){total+=worth[get_piece_at_index(i)];}
done
is it not a thing in c
shiro
that's it!
???
im not using c++
or anything like it
C or nothing

no more of whatever evaluation function you have, that's (almost) all you need to replace it
i have standards
sadly no
i still have stdbool
you heard them shiro, java isn't real programming
so stubborn about this, and for what
i want tokens but im not a monster
LOL
loop slow
you know you can just write c with a c++ compiler right 
LOOP WORK
SLOW 
LESS TOKEN
this is why you'll fail the contest
smh having standards only means you're limiting the things you can do
compilers gonna optimize it away
^^^
dont believe
compiler dum
also pass -O3 to gcc
wont unroll my 64 loop
compiler fast
is "#define" one token or two
very fast
preprocessor tags in macros are undefined behaviour by the standard
what does that even mean
#define define 42
this?
#define define_short #define
yeah nah
define_short whatever
no, it says it doesn't expect a # at the start of the definition
implementation defined or undefined?
you'd have to write a preprocessor for the preprocessor
or you could preprocess multiple times 
how many tokens is this anyway
if you removed it entirely would it be huge
#define define_myvar #define my_var 2
define_myvar
int var = my_var;
// gcc -E
#define my_var 2
int var = my_var;
// gcc -E
int var = 2;
67
optimising some unique thing to get 5 tokens sounds unworth
im at 1038 tokens
define global array of ints then access them with macrosed counter
i only need to shave 14 more
i will not preprocess people's submissions multiple times
submissions are gonna be compiled with the same commands lol
anywhere
should be called in correct order
removes need to write "int" every time
is it nonsense

how to access them later tho
i was this close to reusing argc as a free pointer
if i do like
#define a_var int my_int
then somewhere do
a_var
can i access it later with my_int?
sure
but you can also just do
int my_int
and make a global
so the macro isnt doing much
but i also can int my_int[500]
?
i assume you mean argv?
argc is a char * but you can just set that to anything
all pointers are the same size

would be great for storing my tree struct
what
sadly my macros all have tree built into them already for that
argc is not a pointer
it is
int main(int argc, char *argv[] bclose
OH
i do mean argv

im not reusing the contents of the array
im reusing the pointer itself
argv as a pointer is just a value on the stack
yeah that's what i meant
do you think changing the value in argc is gonna break things after i return?
take a pointer to argc and use that for whatever you want
seems like it'd be a const * if so
idk
where can i even save tokens anymore
yeet stdbool
and either target c23 or use a c++ compiler
i will target c23 
could break if you rely on things being implicitly ints thanks to c89
my_int vs int my_int

i dont see why you wouldnt just
#define my_int int x ## __COUNTER__ = 0;
why the array
i'd also recommend looking into replacing things with things from the c++ stl but i guess i know how you feel about that shiro 

death before dishonor
where "death" is "too many tokens"
and "dishonor" is "c++"
the biggest annoyance for me is rand 
it requires stdlib
only dependency on it that i have left
and making my own rand is too many tokens
oh that's easy
here's how i replaced it:
that doesnt exist
does it not?
aw
you should try it though
are you using clang t
i'm using nothing because i can't actually test this because shiro won't ever send me the api
once chayleaf finishes haskell bindings, contest starts
i did test rand in an online c compiler though

haskell bindings for no one to use them
cool
i don't think the "list of builtins" shows everything
this is better
it didn't show __builtin_pow, yet that exists and works
i forgot why do i need array
i would love to know what weird compiler you were using
neither gcc nor clang have __builtin_rand for me
Library Builtins (Using the GNU Compiler Collection (GCC))
you will notice that rand is absent from this page
my compiler is gcc so you should expect these builtins to exist (i'll add this info to the github readme)
aw man
am i correct that each my_int replaces int my_int? which is accessed later with random_local_int locally
yeah idk why rand isnt a builtin

















"argc is pointer"