Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories β€” IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2023-02-22 00:00:00Z and 2023-02-23 00:00:00Z
01:25
discord changed the video player
01:25
ah no just the video in #showroom that looks bigger (matricks related)
Avatar
Avatar
GitHub
Click to see attachment πŸ–ΌοΈ
troll
Avatar
chillerdragon BOT 2023-02-22 06:29:39Z
What’s that (@newlesstee)
How to change the Activity.assets.large_image?
Avatar
Today, we permanently banned over 40,000 accounts that were using third-party software to cheat in Dota over the last few weeks. This software was able to access information used internally by the Dota client that wasn't visible during normal gameplay, giving the cheater an unfair advantage. While fixing the underlying issues that made these che...
07:33
Interesting
Avatar
Is it about knowing if you are visible to the enemy or not? @Ryozuki
08:51
Yea that was or still is a thing
08:53
Obv they wont tell
Avatar
I mean they tell something
08:56
That they reserved memory space for the process that doesn't get read. And detected something reading from that memory region. (edited)
πŸ’‘ 1
🀩 1
08:57
Which implies AoB scanning. (looping through the whole process to find a byte pattern) Because I see no other reason to read from memory addresses that you didn't explicitly hardcoded. (edited)
09:00
Another thing that should be common sense if you are familiar with how they detect stuff is that it must be an usermode application
Avatar
So I did my research based on my amazing detective skills and found this project that is using a pattern scanner aka. AoB scanner https://github.com/SK68-ph/Overlay/tree/3.0/Dota2Overlay-3.0 one reply posted today https://www.unknowncheats.me/forum/3686236-post615.html seems to confirm it (though you never know what else the cheaters used claiming something is detected)
Avatar
what does AoB stand for?
Avatar
Avatar
default
Is it about knowing if you are visible to the enemy or not? @Ryozuki
So yes. Players that used the tool that tells you if you are visible to enemy or not got banned for a long time.
09:30
array of bytes
Avatar
3cd2943 Fix text rendering over maximum line width with newline - Robyt3 b9a2f62 Merge #6353 - bors[bot]
Avatar
@Patiga 1. Step | I download the zip and unzip it on my desktop. (edited)
10:39
Avatar
have you ever worked with a terminal/console?
Avatar
Avatar
Patiga
have you ever worked with a terminal/console?
Not really
Avatar
for what do you want to use the bot btw?
Avatar
2. Step | I click on the https://discord.com/developers/applications link and create an app.
Integrate your service with Discord β€” whether it's a bot or a game or whatever your wildest imagination can come up with.
Avatar
Avatar
Patiga
for what do you want to use the bot btw?
For my own custom ddnet server
10:42
πŸ˜„
Avatar
but what should the bot do in that channel?
10:42
ist it about the $profile command?
Avatar
No, like submit maps etc...
10:43
$ready
10:43
$release
Avatar
oh okay
Avatar
and automatically put in my server
10:43
Is that what it does right?
Avatar
that will require setup way beyond what I did with the discordbot
Avatar
damn currently checking spf and dmarc records over 228449808 domain names giga_chad I think ddnet is in
Avatar
I'm not sure if it is realistic for you to set it up, but I can go through the steps with you note that in the steps, we explicitly turn off that functionality ^^
10:45
step 2 looks good tho, got the token?
Avatar
If i share the token what will happen?
Avatar
that person can control the bot in any way they like
10:45
dont share it
Avatar
Avatar
Patiga
I'm not sure if it is realistic for you to set it up, but I can go through the steps with you note that in the steps, we explicitly turn off that functionality ^^
that would require some knowledge yea. he wants to have his own ddnet it seems like.
Avatar
ddnet.shop
10:47
some asian parked site
Avatar
I have those and also Client ID at other page
Avatar
Avatar
default
some asian parked site
lmao
Avatar
the one that starts with a ! or #
10:49
Bot Tab
Avatar
oh my bad i didnt add the bot yet but i did now. 🫒
10:50
you should have a generate token button
Avatar
Yes i have the token now
Avatar
but I phrase it like that. even if we guide you through the instructions. you want something completely different.
Avatar
still step 2 | turn on this two
10:52
and copy the token
Avatar
yes that needs to be emphasized, of the entire infrastructure you casually mentioned that you want to set up, the discordbot might be the easiest
Avatar
3. Step | Go back to the source file see on the 1. picture, and create a copy of the file on the 2. picture and name it as "config.ini" (edited)
Avatar
if you don't mind sharing, for what purpose do you want to replicate the ddnet infrastructure? I don't have anything against a new server group, but if that is your goal, be warned that this is a big undertaking
Avatar
deen got depressed and nearly gave up ^^
Avatar
Well this server just should be for my little community
10:56
Friends and random invited peoples
Avatar
then I suggest you approve the maps manually
10:56
i think you can config your own server to only pick maps from your own map pool
Avatar
I don't think you need a map testing setup if its just for a small group of people you mostly trust
Avatar
Thats way too long :/
Avatar
yea but what do you think the bot does
Avatar
This bot would make it more easly
Avatar
not really
10:57
the map testers get pinged (maybe) and get the map file
10:57
they still have to manually approve it
Avatar
i would get tired of editing the channels and download and delete the maps always
Avatar
then figure out a concept that fits your needs and doesn't require you to be somewhat talented with computers
Avatar
you could automate that small part of the process. I think the ddnet setup is very much overkill for your purpose
10:59
you probably only need a script that takes a map, copies it to the server
10:59
and maybe another one that copies it from the testing server to the 'actual' server
Avatar
something like that
10:59
the discord bot is filled with so much more functionality
11:00
and the things you want from it get disabled with the provided instructions
Avatar
So that what you all mean like its ain't possible?
11:01
but I don't think you can make the bot do what you want it to do without help
11:01
also would be better to just make your own discord bot at that point
11:01
the one in the ddnet org is outdated (deprecated packages) and gets updated atm (edited)
Avatar
So what would i get if i go through on the steps?
Avatar
the commands that rely on the website api
11:02
#bot-cmds
Avatar
it is beyond our knowledge how to set up the infrastructure you mentioned. what you actually need is a tiny portion of that infrastructure. your use-case sounds like it would be easier manually or with some minor scripts (or maybe a small own discord bot)
Avatar
trust the stone
πŸͺ¨ 1
Avatar
Avatar
Raks
So what would i get if i go through on the steps?
you will actually get the testing commands, but only the discord portion of it. the thing you actually need of it, $ready, $release and the initial upload to the testing servers, will require much more steup
Avatar
just do a small discord bot that listens to a channel & wait for any file, then just download it using requests (if u like python cuz javascript sucks) lib and done
Avatar
And how can i make a bot like that or i really have to learn that?
11:06
ez
11:06
giga_chad
Avatar
Programming experience would be beneficial
11:07
but you can paste something together with whatever the internet throws at you
Avatar
Avatar
ReiTW
chatgpt
Is that thing will help me automatically edit the channels?
11:08
by commands
Avatar
that thing will help u to make some code, with a probability that it throws you some garbage code also
Avatar
And care with auto uploading to the test-servers, people will abuse it & upload a ton of bs. So let your testers react with an emoji to any file & then upload it to the server πŸ™‚
Avatar
Avatar
ReiTW
that thing will help u to make some code, with a probability that it throws you some garbage code also
like this, for example
Avatar
nodejs sux
Avatar
@Raks maybe just do some simple python script like that: import discord from discord.ext import commands bot = commands.Bot(command_prefix= '!', intents=discord.Intents.all()) save_path = 'Desktop/server/data/maps' @bot.command() async def save_file(ctx, *, file: discord.Attachment): try: await file.save(save_path + file.filename) except Execption as e: #print error message print(e) await ctx.send('An error occurred while saving the file..') else: await ctx.send(f'File saved') client.run(BOT_TOKEN)
Avatar
Avatar
ReiTW
nodejs sux
that's C#
Avatar
Avatar
default
that's C#
is it lol? C# has var keyword?
Avatar
@Raks if there is only ur friends in the server its safe to use
Avatar
but its not like javascripts var
Avatar
looks ugly
Avatar
once a type was assigned to it (it takes any for the first time)
11:14
you can only assign the same type after that
Avatar
Avatar
itube
@Raks maybe just do some simple python script like that: import discord from discord.ext import commands bot = commands.Bot(command_prefix= '!', intents=discord.Intents.all()) save_path = 'Desktop/server/data/maps' @bot.command() async def save_file(ctx, *, file: discord.Attachment): try: await file.save(save_path + file.filename) except Execption as e: #print error message print(e) await ctx.send('An error occurred while saving the file..') else: await ctx.send(f'File saved') client.run(BOT_TOKEN)
i dont even know where to make this ahh
Avatar
for "any type" you have to use generics
Avatar
I downloaded python but (edited)
Avatar
also known as that <T>
Avatar
Avatar
Raks
i dont even know where to make this ahh
create a file called "maps.py" and paste that script in, change it to ur bot token and put the right 'maps' path
Avatar
Avatar
ReiTW
looks ugly
you hate it, you love it
Avatar
Avatar
Raks
i dont even know where to make this ahh
Best way to start is setting up your development environment. Use any editor as you like, Visual Studio, Visual Studio Code, Notepad etc etc etc. personally i'd recommend using a code editor with proper syntax highlighting, this will help you so much πŸ™‚
Avatar
Avatar
itube
create a file called "maps.py" and paste that script in, change it to ur bot token and put the right 'maps' path
?
Avatar
Avatar
Avolicious
Best way to start is setting up your development environment. Use any editor as you like, Visual Studio, Visual Studio Code, Notepad etc etc etc. personally i'd recommend using a code editor with proper syntax highlighting, this will help you so much πŸ™‚
i have notepad++ and Visual studios either
Avatar
Avatar
Raks
i have notepad++ and Visual studios either
Fair enough, do you wanna run it 24/7 or just when you're online?
Avatar
if u want to do a discord bot its better to learn the basics of python or javascript @Raks
Avatar
Avatar
Avolicious
Fair enough, do you wanna run it 24/7 or just when you're online?
When im online
Avatar
i need to go now.
Avatar
Itube bot
Avatar
fokkonut
Avatar
known botter
Avatar
Avatar
itube
if u want to do a discord bot its better to learn the basics of python or javascript @Raks
Well i can learn it time after time with some help at the first
Avatar
Avatar
Raks
When im online
Then your local computer is fine πŸ™‚ Create a folder on your desktop or <insert path you like> to keep things clean
Avatar
yes best bots))
Avatar
Avatar
Avolicious
Then your local computer is fine πŸ™‚ Create a folder on your desktop or <insert path you like> to keep things clean
Yes?
Avatar
Now you've added the maps.py inside, no?
11:19
Avatar
uh i didnt test the script, maybe its not working i just write it really quick. well need to go now gl @Raks
Avatar
Awesome! You can start using your IDE/Editor with "Open folder" ( most editors do have such an option )
Avatar
Avatar
itube
uh i didnt test the script, maybe its not working i just write it really quick. well need to go now gl @Raks
Thanks i hope i can make something working
Avatar
Avatar
Avolicious
Awesome! You can start using your IDE/Editor with "Open folder" ( most editors do have such an option )
huh
11:21
OH
11:21
open visual studios right?
Avatar
Yeah, if you like the editor, go for it πŸ™‚
11:21
11:21
that one doesnt have python support by default
Avatar
Thats my next question πŸ™‚
Avatar
it would treat it like a text file
Avatar
You can install python support in VS
11:22
?
Avatar
Yes
Avatar
i have that
11:22
^^
11:23
Open thy python then?
Avatar
You can open the "maps.py" now
Avatar
Not the console πŸ˜„
Avatar
When i double click on the maps.py it just flash up and gone
Avatar
Yep, thats why you need to open the folder/file with "Open with Visual Studio"
Avatar
After you installed python, it automatically has set that all *.py files should run within the python executeable
Avatar
Yes
Avatar
Learn programming
11:25
The command line
11:25
Uninstall windows
Avatar
Avatar
Ryozuki
Learn programming
justatest
Avatar
Free urself from the chains
11:26
Programming gives freedom
Avatar
Avatar
Avolicious
Yes
Im here
Avatar
Avatar
Ryozuki
Uninstall windows
Windows is the best office/gaming solution
Avatar
Dont talk to me after saying that
Avatar
Dont wanna start talking about nvidia drivers on linux
11:27
They are made out of cr**
Avatar
Maybe gaming
11:27
But office
11:27
Ur joking xdd
Avatar
In the enterprise sector, only windows is being used
11:27
I wanna poke
11:27
Bye
Avatar
Ryozuki is like linux tech tips who thought no one uses Outlook/365
11:28
but everyone uses that crap
Avatar
And I am not talking about those tiny lil' fancy startups you might think of
Avatar
Before y'all start argue about linux or win please help 😦
Avatar
learn to code kid
pepeH 1
11:28
jk
Avatar
Its hilarious companies rely on windows and give em so much control, valve realizes that
Avatar
Nothing to argue about, windows just better troll
Avatar
Ur fooling urself if u think its better
Avatar
more convenient
Avatar
Its convenient cuz the feedback loop
Avatar
Avatar
Raks
Before y'all start argue about linux or win please help 😦
After you setup everything you need, give google a try & see how it works to use python and discord.py https://www.freecodecamp.org/news/create-a-discord-bot-with-python/ And before people starting arguing about the tutorial decision: Its just a tutorial from thousands of tutorials (edited)
Avatar
Linux is actually better
Avatar
Avatar
Avolicious
After you setup everything you need, give google a try & see how it works to use python and discord.py https://www.freecodecamp.org/news/create-a-discord-bot-with-python/ And before people starting arguing about the tutorial decision: Its just a tutorial from thousands of tutorials (edited)
What setup
Avatar
Avatar
Avolicious
In the enterprise sector, only windows is being used
depends if u talk about servers or clients
Avatar
Avatar
ReiTW
depends if u talk about servers or clients
Even windows servers are being used
11:31
xddd
Avatar
windows servers 🀑
Avatar
windows servers are only used because Active Directory is powerful af even if it's a big hole full of vulnerabilities
Avatar
Avatar
Raks
What setup
Your development setup
Avatar
Avatar
fokkonaut
windows servers 🀑
They are glitchy
Avatar
Even azure uses linux
11:31
I wish more did like valve
Avatar
Avatar
Ryozuki
Even azure uses linux
No, azure is just their whole cloud name
11:32
On azure you can get linux and windows
Avatar
Its better to make softare for a os not owned by another company
11:32
But the feedback loop is hard to break
Avatar
Avatar
Avolicious
Your development setup
Wdym by that?
Avatar
feedback loop! feedback loop! feedback loop!
Avatar
loopback feed
Avatar
Avatar
Raks
Wdym by that?
In order to update/edit and enhance your bot, you need a development environment.
Avatar
I actually dont wanna get into the windows/linux thing
Avatar
Avatar
Ewan
I actually dont wanna get into the windows/linux thing
-> πŸšͺ
Avatar
@Raks ok here i give u just my script i use for my test server xd import discord from discord.ext import commands bot = commands.Bot(command_prefix='!', intents=discord.Intents.all())

Set the path where you want to save the file

save_path = '/home/itube/ddnet/build/data/maps/' def has_mapper_role(ctx): return discord.utils.get(ctx.guild.roles, name='Mapper') in ctx.author.roles @bot.command() @commands.check(has_mapper_role) async def save_file(ctx, *, file: discord.Attachment): try: await file.save(save_path + file.filename) except Exception as e: print(e) await ctx.send('An error occurred while saving the file.') else: await ctx.send(f'File saved to {save_path}')

Run the bot

bot.run('your-token')
(edited)
12:00
create role "Mapper". change bot token and set the correct path
Avatar
i think you also have to explain to him how to get the discord package using npm before you just give him the code that crashed before for him already (edited)
Avatar
its avo's job
Avatar
its your code
12:01
excuse me?
12:02
but not my job how to download the pachages
12:02
also im using linux
12:02
idk how its on win xd
Avatar
the same way
12:02
npm install
12:02
nice
12:02
u told him now
12:02
not me
Avatar
no i did not
12:02
edit message
Avatar
if you want them to run your code
Avatar
complete it
Avatar
go explain it to them
12:03
your behavior rn is just lazy
Avatar
should i create a repo
12:03
and put a readme
Avatar
do whatever you want
12:03
but if you won't even give them the proper instructions on how to use your code
12:03
then don't bother sending in your code
12:03
sorry boss
12:03
i understand
Avatar
Avatar
itube
@Raks ok here i give u just my script i use for my test server xd import discord from discord.ext import commands bot = commands.Bot(command_prefix='!', intents=discord.Intents.all())

Set the path where you want to save the file

save_path = '/home/itube/ddnet/build/data/maps/' def has_mapper_role(ctx): return discord.utils.get(ctx.guild.roles, name='Mapper') in ctx.author.roles @bot.command() @commands.check(has_mapper_role) async def save_file(ctx, *, file: discord.Attachment): try: await file.save(save_path + file.filename) except Exception as e: print(e) await ctx.send('An error occurred while saving the file.') else: await ctx.send(f'File saved to {save_path}')

Run the bot

bot.run('your-token')
(edited)
When i watch the video of coding tutorial there should be secret the token bc anyone can steal it idk how tho
Avatar
Avatar
Raks
When i watch the video of coding tutorial there should be secret the token bc anyone can steal it idk how tho
do u know how/where u get the token?
12:04
The bot token right? (edited)
Avatar
Yes i know
Avatar
change "your-token" to ur token
12:05
dont delete the ' '
12:13
Avatar
thats not my script
12:13
xd
12:13
i tryed by myself
Avatar
i can only help you with my script
12:13
:))
Avatar
U dont know whats wrong with that?
12:14
its happens when i run it
12:15
Okay i just copy yours
Avatar
Avatar
itube
i can only help you with my script
12:18
12:18
The token already typed in
Avatar
do what it tells you to do
12:21
you could have fixed that one yourself if you would read
Avatar
Oh yeah i got it my bad
Avatar
Avatar
itube
i can only help you with my script
What should it do
12:22
?
12:22
I mean how is it works
Avatar
its running?
12:24
if yes do !save_file and put ur map in the same message
Avatar
oh thats all?
Avatar
then the file will be saved in ur folder
Avatar
the path u sayed
12:24
very simple script
Avatar
lemme test it (edited)
Avatar
and also the uploader need the role 'Mapper' (edited)
Avatar
Not really
12:25
u know my script better then me
12:25
i guess
12:27
nope
12:27
12:28
aint works
Avatar
My new favorite thing - Bing's new ChatGPT bot argues with a user, gaslights them about the current year being 2022, says their phone might have a virus, and says "You have not been a good user" Why? Because the person asked where Avatar 2 is showing nearby
Likes
57668
Retweets
11901
12:28
quite interesting how bin'g's ai is developping kek
Avatar
Avatar
itube
yes
I put the script into Visual Studios currently, where can i run the bot with it? (edited)
12:35
Avatar
Avatar
Raks
I put the script into Visual Studios currently, where can i run the bot with it? (edited)
open the terminal in visual studio
12:41
and use for example python main.py
12:41
or python3 main.py
Avatar
there’s no terminal in visual studio
12:53
the closest thing is the developer powershell/cmd instances
12:53
neither of which have python installed by default
Avatar
Avatar
Ewan
there’s no terminal in visual studio
there is
12:57
its vscode
12:57
mb
Avatar
im using vscode im used to deal with the options idk xd
Avatar
Avatar
Ewan
there’s no terminal in visual studio
there is, it's called terminal (edited)
13:02
i use it to compile c# natively
13:03
because it doesn't have the build option for nativeaot yet
Avatar
so where do i have to click now?
Avatar
Avatar
itube
im using vscode im used to deal with the options idk xd
?
Avatar
that's just the dev ps instance
13:16
but you're right it is a terminal lol
Avatar
Avatar
Raks
?
what
Avatar
Avatar
Ewan
that's just the dev ps instance
No i mean the one tab at the bottom
Avatar
Avatar
Ewan
but you're right it is a terminal lol
see randomly im right
Avatar
when I am @ home I will make a screenshot for you @Ewan
Avatar
i don't need a screenshot
13:20
i went and looked for it and it's there
13:20
but it's really out of the way lol i never would have known it was there
Avatar
also it wasn't part of visual studio before it seems like since I wasn't able to find it in the local installation at my workspace
Avatar
Avatar
itube
what
How to run it
Avatar
Avatar
default
also it wasn't part of visual studio before it seems like since I wasn't able to find it in the local installation at my workspace
nevermind I looked at the wrong spot
13:27
to anyone else: View > Terminal or View > Other Windows > Command Prompt
13:30
to show a command prompt inside visual studio ide instead of opening an external command prompt using Extras > Command Line > Developer...
Avatar
Avatar
Raks
How to run it
i told u??
13:36
i dont get it
13:39
13:39
how to add the folder for save?
Avatar
@Jupstar βœͺ maybe u know this
15:05
u know how to declare a _ExtInt(N) literal that has more than the max literal value allowed?
15:05
_ExtInt(300) prime = 999999999999999999999999999999999;
15:06
_ExtInt is a clang extension, it does the same that _BitInt(N) does (standarized in c++23, but the extension from clang is available before)
15:06
i know u can get it doing bit shift and cast shenaningans but thats godly awful
15:07
error: integer literal is too large to be represented in any integer type
15:07
stupid
Avatar
i mean that number is obviously bigger than the upper limit
Avatar
its not bigger than a 300bit integer lol
15:07
u dont understand the issue here
Avatar
-2,147,483,648 to 2,147,483,647
15:08
oh 300bit
Avatar
_ExtInt (_BitInt in c++23) allows declaring ints of n bits
Avatar
doesn't seem to work as intended
15:09
im sure i need to add some suffix to the literal
15:09
but idk which
15:09
i tried 999999999999999999999999999999999_ExtInt300
15:09
but no
Avatar
I mean this is convincing: The error message you are seeing is because the integer literal "999999999999999999999999999999999" is too large to be represented by any integer type. In C++, the largest integer type is typically "long long int", which can represent integers up to 9,223,372,036,854,775,807.
15:10
it suggested a library
15:10
but thats not what you want
Avatar
Future Directions > Adding literal suffixes to form integer constants with a bit-precise type.
15:11
from the paper
15:11
F
Avatar
This does what you want. Maybe you can hibbity hoppity, take some code snippet and make it your property. https://github.com/boostorg/multiprecision/blob/develop/include/boost/multiprecision/cpp_int.hpp
Boost.Multiprecision. Contribute to boostorg/multiprecision development by creating an account on GitHub.
Avatar
nah i wanted it natively
15:13
and in clang cuz llvm
15:13
wanted to know if there is a bug with big int division
Avatar
is GMP part of the windows api?
15:15
c++ #include <gmpxx.h> using namespace std; int main() { mpz_class prime = "999999999999999999999999999999999"; cout << prime << endl; return 0; }
15:15
ah no
15:17
__int128 is a thing but that isn't supported everywhere and requires you to compile using MSVC c++ #include <iostream> using namespace std; int main() { __int128 prime = 999999999999999999999999999999999; cout << prime << endl; return 0; } (edited)
15:22
Yea I only find libraries that implement a big int datatype, no clue what your original plan was using bitshift. The problem with n-bit integers is that you have to assign the value to it. And that arbitrary value can't be represented by C++ itself. Even if the bits could logically speaking properly store that value. (edited)
Avatar
Avatar
Ryozuki
_ExtInt(300) prime = 999999999999999999999999999999999;
Jupstar βœͺ 2023-02-22 15:41:40Z
I'd say u need a postfix literal
15:41
Smth like 9999_extint
15:44
Or create it from a string
15:47
Or find a multiplication that results in Ur value and multiple them: 99999LL * 111111111LL
Avatar
yeah i mean this isn’t impossible by any means
Avatar
Avatar
Jupstar βœͺ
Smth like 9999_extint
ye but i dont know which
Avatar
Avatar
Ryozuki
ye but i dont know which
Jupstar βœͺ 2023-02-22 16:14:27Z
U can create an literal operator yourself if clang doesn't provide one
Avatar
cant you initialize it from string translated at compile time, or directly byte array?
Avatar
Jupstar βœͺ 2023-02-22 17:17:45Z
r u creating the next cookie clicker, or what do u even need 300bits for xd
Avatar
Avatar
Jupstar βœͺ
r u creating the next cookie clicker, or what do u even need 300bits for xd
nah
17:29
finite field arithmetic
17:29
was just testing something
Avatar
Jupstar βœͺ 2023-02-22 17:29:50Z
its ok its just more combinations than atoms in the universe
17:30
and my target fps for ddnet
Avatar
hey so I'm using the OnWindowResize member of the CComponent class to update my width & height values that are used in the rendering function
18:05
refactoring some stuff
18:05
and this is happening for some reason but only when i'm pressing tab
18:05
it's like cropped but keeping the same aspect ratio
18:06
this does not happen when i update the values each time it's rendered
18:06
if you can't see it's messing up the map/transformation and the bar is really small in the corner
18:07
oh it's Graphics()->MapScreen(0.0f, 0.0f, m_Width, m_Height); specifically that's the issue. wut?
Avatar
Jupstar βœͺ 2023-02-22 18:08:28Z
other components call that function too
Avatar
oh i didn't realize it was a global thing i guess
18:08
but that makes sense
Avatar
Avatar
Ryozuki
was just testing something
I like python for finite fields
Avatar
Avatar
heinrich5991
I like python for finite fields
yeah it works nice cuz inf integer
18:17
but im doing this with llvm ir xd
Avatar
Jupstar βœͺ 2023-02-22 18:19:13Z
0 * inf
Avatar
you can also easily get the inverse in python:
18:24
pow(2, -1, 3)
Avatar
Avatar
Ryozuki
_ExtInt(300) prime = 999999999999999999999999999999999;
I wonder if something like _ExtInt(300) prime = std::numeric_limits<decltype(prime)>::max() might work πŸ˜›
18:39
Oh you wanted sth else, I misread it as you wanting to initialize to the max
Avatar
nah xd
18:42
i want a literal
18:42
that is bigger than long long
18:43
anyway im not touching c++ more
18:43
i just wanted to confirm if division worked correctly on llvm-ir with big integers
18:43
and it does from my tests
Avatar
Yeah, I just took a quick glance at the standard and it doesn't seem really possible unless clang also added a suffix themselves
Avatar
source_filename = "root" declare i32 @printf(ptr, ...) define i32 @print(i1 %0) { entry: %prefix = alloca [4 x i8], align 1 store [4 x i8] c"%d\0A\00", ptr %prefix, align 1 %printed_characters_n = call i32 (ptr, ...) @printf(ptr %prefix, i1 %0) ret i32 %printed_characters_n } define i32 @main() { entry: %s = sdiv i500 2457975212345678912345678923456723456789, 3 %x = icmp eq i500 %s, 819325070781892970781892974485574485596 %p = call i32 @print(i1 %x) ret i32 %p }
18:44
this prints 1
18:44
so its correct the division
18:44
i got the division result with python
18:45
(i made up the first number)
Avatar
Why are you writing llvm ir btw? finally making your own language?
18:45
at work
18:45
but soon also for myself
18:45
xd
18:46
doing this at work makes me itch to do my own lang
Avatar
Do JVM bytecode instead
18:46
llvm is awesome
18:46
mlir looks promising too
Avatar
Corporations love Java, you'll get big points with your boss
Avatar
my boss hates java
18:46
and haskell
Avatar
Fake corpo
Avatar
likes erlang, rust, elixir
18:47
julia
Avatar
Are you generating the IR by hand btw? I saw a cute library to work with it a couple weeks ago
Avatar
im using inkwell
18:47
it makes u write llvm correctly
18:47
also rly useful to learn llvm
18:48
do note that big int operations like im doing are only supported from llvm 16
Avatar
How to get the log of core dump of ddnet server? Using ubuntu 22.04.1 LTS with systemd
Avatar
Avatar
Mr.Gh0s7
How to get the log of core dump of ddnet server? Using ubuntu 22.04.1 LTS with systemd
log of core dump?
Avatar
core dump sry
Avatar
But what do you want to do? Open it in gdb? send it to someone?
18:50
With systemd coredumpctl collects all the dumps
Avatar
see why the server crashed
Avatar
coredumpctl list to find the dump
Avatar
Ok thanks. I didn't have the coredumpctl installed though. If it crashed again I should be able to see the dump though, right?
Avatar
@Learath2 i can say im a level above ur C chadness by doing llvm ir
18:51
BASEDDEPT
Avatar
Avatar
Mr.Gh0s7
Ok thanks. I didn't have the coredumpctl installed though. If it crashed again I should be able to see the dump though, right?
iiii don't know what systemd does, didn't even know it was possible to have coredumpctl not installed πŸ˜›
Avatar
btw the division from that code outputs 50k instructions xD
18:53
source_filename = "root" declare i32 @printf(ptr, ...) define i32 @print(i1 %0) { entry: %prefix = alloca [4 x i8], align 1 store [4 x i8] c"%d\0A\00", ptr %prefix, align 1 %printed_characters_n = call i32 (ptr, ...) @printf(ptr %prefix, i1 %0) ret i32 %printed_characters_n } define i32 @main() { entry: %s = sdiv i500 24579752123456...
Avatar
Avatar
Mr.Gh0s7
πŸ˜‰
you can try cat /proc/sys/kernel/core_pattern to see where the cores go
Avatar
Avatar
Ryozuki
btw the division from that code outputs 50k instructions xD
50k? seriously?
Avatar
its a rly high bit count
Avatar
Avatar
Learath2
you can try cat /proc/sys/kernel/core_pattern to see where the cores go
|/lib/systemd/systemd-coredump %P %u %g %s %t <number> %h
Avatar
well thats what the t ool says
18:54
in godbolt
18:55
Iterations: 100 Instructions: 40000 Total Cycles: 18578 Total uOps: 49100 Dispatch Width: 6 uOps Per Cycle: 2.64 IPC: 2.15 Block RThroughput: 92.0
Avatar
Maybe it's 400 instructions times 100 iterations?
Avatar
I guess
Avatar
looks highly unoptimized though
Avatar
its not run through any optimizer
19:58
oh u can pass O3
Avatar
would ddnet be interested in this feature https://github.com/danielkempf/TaterClient-ddnet/pull/14
To add a status bar that allows players to see information such as current race time, fps, ping, angle, speed and position in one dense space at the bottom (as opposed to spread out across the scre...
Avatar
i know the cstring thing is probs wrong
20:07
also this is not the ddnet client
20:07
ive been fooled
Avatar
could be an env thing on my end but tbh i couldn't be bothered to play with that & it's technically right because it was erroring saying strlen wasn't a defined symbol
20:07
yeah ik
20:07
i mean
20:07
i would happily port to ddnet cuz it's a small feature. but would it be welcome? that's what i'm asking (edited)
20:07
want to ask before submitting pr and spending time on that
Avatar
i dont rly like it but u should hear others
Avatar
jao's hairy kebab 2023-02-22 20:34:16Z
looks like start of ddOS
Exported 493 message(s)