Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.org/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 2024-03-13 00:00:00Z and 2024-03-14 00:00:00Z
Avatar
ws-client BOT 2024-03-13 00:55:10Z
<ChillerDragon> @Ryozuki are you saying edlang has a release, a web page, a project creation tool and a debugger but it can not do hello world?
Avatar
why i cant use prediction margin 0?
01:35
only 1 or higher
Avatar
29fe4b5 M Caverns, M The Floor is Lava - ddnet-maps
Avatar
Avatar
ws-client
<ChillerDragon> @Ryozuki are you saying edlang has a release, a web page, a project creation tool and a debugger but it can not do hello world?
yes xd
06:54
OBS Studio 30.1 Released With AV1 Support For VA-API & @PipewireP Video Capture https://t.co/F3m5BK651m
06:54
with this obs is better on linux now than on windows
06:54
legit
06:54
u cant do pipewire stuff in windows
Avatar
Avatar
Matodor
@TsFreddie ddnet-pvp has any config option for disable room settings changes for spectators?
no, but i think you can just lock the room/team to prevent spectator joining in
07:41
and they can still spectate using /spec player
Avatar
edlang now supports having both lib.ed and main.ed
13:11
and builds a shared library and a binary pog
13:12
it also doesnt require a top level module
13:13
pub exported fn hello_world(a: i32) -> i32 { return a; } what do u think about the exported keyword? it disables name mangling and makes it externally visible
13:13
the pub is only within edlang
13:13
or maybe i should just copy rust? pub extern "C" fn
13:13
but i doubt ill support other than extern "C" itself
13:14
13:14
owo
Avatar
Avatar
Ryozuki
pub exported fn hello_world(a: i32) -> i32 { return a; } what do u think about the exported keyword? it disables name mangling and makes it externally visible
Why do you do mangling at all?
Avatar
@Learath2 because i have modules
13:15
namespaces if u will
13:15
my mangling is rly dumb tho rn
13:16
if i mark it not exported
13:16
the name will be
13:16
define private i32 @"hello_world@0@3"(i32 %0) !dbg !2 {
13:16
0 is like the file id
13:16
3 is the definition id
13:16
which increases when it finds definitions like functions etc
13:16
2 = distinct !DISubprogram(name: "hello_world", linkageName: "hello_world@0@3", scope: !3, file: !1, line: 4, type: !4, scopeLine: 4, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !7)
13:16
good debug info kek
Avatar
Do you have overloads?
Avatar
@Learath2 i will have generics
13:17
no overloads for now
Avatar
If no overloads, why do you need the definition id?
13:17
but definition id could help in generics
13:17
xd
13:18
cuz multiple definitions
13:18
with diferent types
Avatar
Yeah, but I think you should move to a more deterministic mangling scheme
13:18
it was just smth quick for now
13:18
to not get symbol conflicts
Avatar
Understandable
Avatar
@Learath2 any known algorithm?
13:19
also i think the linker doesnt support the @ symbol
Avatar
Avatar
Ryozuki
or maybe i should just copy rust? pub extern "C" fn
I don't think rust disables "name mangling" for extern "C"
Avatar
you need to add the #[no_mangle] attribute IIRC
Avatar
well then my exported keyword is the same as extern "C" and no_mangle
13:21
ill change @ to $
Avatar
Avatar
Ryozuki
@Learath2 any known algorithm?
You could draw inspiration from rust or c++
13:24
You want the return type, the function name (including module maybe), and argument types in order
Avatar
oh @ actually is valid
Avatar
for whatever reason, the gdb demangler can segfault
13:26
and it's kinda known that it's bad code
Avatar
In the stdcall and fastcall mangling schemes, the function is encoded as _name@X and @name@X respectively, where X is the number of bytes, in decimal, of the argument(s) in the parameter list (including those passed in registers, for fastcall). In the case of cdecl, the function name is merely prefixed by an underscore.
Avatar
Avatar
heinrich5991
for whatever reason, the gdb demangler can segfault
Huh
Avatar
All mangled symbols begin with _Z (note that an identifier beginning with an underscore followed by a capital letter is a reserved identifier in C, so conflict with user identifiers is avoided
13:27
TIL
Avatar
island is also a reserved name
Avatar
All mangled symbols begin with _Z (note that an identifier beginning with an underscore followed by a capital letter is a reserved identifier in C, so conflict with user identifiers is avoided); for nested names (including both namespaces and classes), this is followed by N, then a series of <length, id> pairs (the length being the length of the next identifier), and finally E. For example, wikipedia::article::format becomes: _ZN9wikipedia7article6formatE
Avatar
Avatar
heinrich5991
island is also a reserved name
xd
13:28
the full text
13:28
ok shouldnt be hard to copy this mangling
Avatar
i keep setting aside implementing strings and arrays with other stuff
13:54
i need to focus
13:54
justatest
Avatar
Avatar
Ryozuki
i keep setting aside implementing strings and arrays with other stuff
Are you doing utf8 strings?
Avatar
Avatar
Learath2
Are you doing utf8 strings?
justatest
13:58
for now ill do just "strings"
13:58
and not zero terminated
13:58
but ill probs do utf8
13:58
actually i wanna do CStr and String
13:58
like rust
13:59
i think ill end up doing rust2
13:59
justatest
13:59
i have 0 originality
Avatar
thats why i ask for ideas
13:59
but nobody here has
Avatar
Rust is just perfect as it is
13:59
indeed
Avatar
Do unsafe by default rust
13:59
zig comptime is interesting
14:00
i just need to think a feature that makes edlang different
14:00
but for now im happy to have a working language
Avatar
Avatar
Ryozuki
i just need to think a feature that makes edlang different
fearful concurrency
Avatar
i wanna know if there are cutting edge papers
14:01
on borrow checkers
Avatar
Cutting edge borrow checkers are probably so much graph theory that your brain will melt out of your ears
Avatar
rust with good async
Avatar
garbage collected rust
Avatar
Avatar
Learath2
garbage collected rust
hey thats going too far
Avatar
Mark and Sweep gc isn't too hard to implement
Avatar
we dont do that here
Avatar
I'm about to learn some go btw
14:02
u only need 1 day
14:02
literally
14:02
its the only pro of the language XD
Avatar
i hate how it handles errors
Avatar
Why? Is it similar to some language I already know?
Avatar
makes it all so ugly
14:03
@Learath2 google made it for interns
14:03
to learn how to code
14:03
and have people working fast in something
Avatar
Avatar
Learath2
Why? Is it similar to some language I already know?
hmm u return a tuple with the error and the result
14:03
if the error is not null u use the result
14:04
u have to check the error on all ur function invocations
14:04
an entire if block
14:04
every time
14:04
there is no sugar
14:04
u can use the result without checking the error
14:04
no safety
14:04
also it has nulls
14:04
so its already a bad lang
14:04
justatest
Avatar
Rust honestly has it mostly right, I see no point to inventing new languages anymore. If I were making my own flavor of rust, I'd have it unsafe by default, find some way to allow self referential structs and maybe try to improve on the async
Avatar
f, err := Sqrt(-1) if err != nil { fmt.Println(err) }
14:05
im sry but i find it rly ugly
14:05
u have to do this
14:06
func Sqrt(f float64) (float64, error) { if f < 0 { return 0, errors.New("math: square root of negative number") } // implementation }
Avatar
Avatar
Ryozuki
f, err := Sqrt(-1) if err != nil { fmt.Println(err) }
Hm, it's just lacking some sugar, isn't this the same approach as rust Results?
Avatar
having no algebraic data types is a no go too
14:06
u have to use a default value
14:06
when returning a result
14:06
bad bad bad
Avatar
Avatar
Ryozuki
u have to use a default value
I guess it doesn't guard as well as Results against you accidentally forgetting to check that there were no errors
Avatar
Avatar
Learath2
Rust honestly has it mostly right, I see no point to inventing new languages anymore. If I were making my own flavor of rust, I'd have it unsafe by default, find some way to allow self referential structs and maybe try to improve on the async
the yoke crate is a nice way of doing self-referential structs, even though it has weird terminology
Avatar
@Ryozuki do fractional number representations
Avatar
Experimental statically-typed compiled programming language made with LLVM and Rust
14:21
new design
14:21
actually i just changed the classless css framework i use
Avatar
Avatar
louis
@Ryozuki do fractional number representations
xd
Avatar
Avatar
louis
@Ryozuki do fractional number representations
you mean as fractions?
Avatar
yes @heinrich5991
Avatar
infinite precision arithmetic
Avatar
btw why is no language doing that?
14:26
a = 3/5 b = a * 14/2990 print(b)
Avatar
Avatar
Teero
btw why is no language doing that?
it seems not particularly useful as a standard representation to me because sooner or later you're going to pass the value to a non-polynomial function
14:29
and then your result can't be precise anymore
Avatar
store the expression as a tree then evaluate it when it needs to be😩
Avatar
my android calculator has arbitrary precision (edited)
14:33
I like that
14:34
Source code: Lib/fractions.py The fractions module provides support for rational number arithmetic. A Fraction instance can be constructed from a pair of integers, from another rational number, or ...
Avatar
Avatar
Teero
btw why is no language doing that?
Fractional representations of numbers are less performant to work with, at the end of the day when you do need the actual final value of your operation it'll incur an expensive DIV to get it and multiplying fractions together is two MULs instead of one, adding fractions with different bases is variable cost, incurs atleast 2 muls and an add
👍 1
Avatar
why is this not added in new update? https://github.com/ddnet/ddnet/pull/7521
Maybe more of a concept? Not sure if this is too hacky and can't guarantee this doesn't break things. Adds /mode that can enable teams to behave like team 0 with the added benefit of being ...
16:18
am I right that for 2 month a name can't be chosen and it is the only problem?
Avatar
Avatar
pisisik
why is this not added in new update? https://github.com/ddnet/ddnet/pull/7521
Why would you add something like this to the game? I don't really get whats the use case for this
Avatar
Avatar
Stepfunn
Why would you add something like this to the game? I don't really get whats the use case for this
Some players enjoy doing t0 speedruns. That would be the new kind of private servers.
Avatar
Avatar
Stepfunn
Why would you add something like this to the game? I don't really get whats the use case for this
as written there by Robyt3 "We should better support t0 runs without having to manually set a password on servers." but I can also add that it might be helpful if you still want that t0 gameplay but not with everyone so you can go in team with this t0 mode and kick annoying people from it without it being funvote
Avatar
Avatar
Stepfunn
Why would you add something like this to the game? I don't really get whats the use case for this
people getting mad about t0 runs cuz they're not allowed to ban everyone who joins the server
16:28
and no one will set a password for them since t0 runs are unsupported
Avatar
i mean sometimes admins do and it has happened a few times, but its a hassle for both the runners and the admins (edited)
Avatar
Avatar
bencie
i mean sometimes admins do and it has happened a few times, but its a hassle for both the runners and the admins (edited)
yes, and it looks like the only thing that left is to decide on a name and to add it in current update cause I guess there is still time
Avatar
ah alright that makes a lot of sense now
brownbear 1
Avatar
The engine graphics do not need to be involved with freeing image data. The Free function now also ensures that all other member variables are cleared when freeing the image data.

Checklist

  • [X] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of ...
Avatar
@murpi skindb bot is down
21:07
do you know why it's down so often?
Avatar
watfk this button means
Avatar
Avatar
cyberFighter
watfk this button means
reloading
Avatar
its reloading way too long then
Avatar
i cant play guys (edited)
Avatar
Avatar
cyberFighter
its reloading way too long then
is it just the button not changing? 🤔
Avatar
Avatar
cyberFighter
its reloading way too long then
you cant reach the master server im guessing
🐴 1
Avatar
masters messed up? (edited)
Avatar
Avatar
Ewan
masters messed up? (edited)
works for me. what do you see?
Avatar
2024-03-13 16:26:36 E http: https://master2.ddnet.org/ddnet/15/servers.json failed. libcurl error (28): Failed to connect to master2.ddnet.org port 443 after 10000 ms: Timeout was reached 2024-03-13 16:26:36 E http: https://master3.ddnet.org/ddnet/15/servers.json failed. libcurl error (6): Could not resolve host: master3.ddnet.org 2024-03-13 16:26:36 E http: https://master1.ddnet.org/ddnet/15/servers.json failed. libcurl error (22): The requested URL returned error: 525 2024-03-13 16:26:37 E http: https://master4.ddnet.org/ddnet/15/servers.json failed. libcurl error (22): The requested URL returned error: 404
Avatar
Sometimes master1 works after refreshing for me
Avatar
Avatar
Ewan
2024-03-13 16:26:36 E http: https://master2.ddnet.org/ddnet/15/servers.json failed. libcurl error (28): Failed to connect to master2.ddnet.org port 443 after 10000 ms: Timeout was reached 2024-03-13 16:26:36 E http: https://master3.ddnet.org/ddnet/15/servers.json failed. libcurl error (6): Could not resolve host: master3.ddnet.org 2024-03-13 16:26:36 E http: https://master1.ddnet.org/ddnet/15/servers.json failed. libcurl error (22): The requested URL returned error: 525 2024-03-13 16:26:37 E http: https://master4.ddnet.org/ddnet/15/servers.json failed. libcurl error (22): The requested URL returned error: 404
does it work again for you?
Avatar
btw https://ddnet.org now also intermittently returns 525 errors. curl -I https://ddnet.org
Avatar
yea, but that isn't as vital
Avatar
Avatar
heinrich5991
does it work again for you?
Yes
22:45
😃
Avatar
ah yes it did die
Exported 191 message(s)