01:55 < ws-client> @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? 02:35 < bridge> why i cant use prediction margin 0? 02:35 < bridge> only 1 or higher 07:54 < bridge> yes xd 07:54 < bridge> https://twitter.com/phoronix/status/1767695611808158035 07:54 < bridge> with this obs is better on linux now than on windows 07:54 < bridge> legit 07:54 < bridge> u cant do pipewire stuff in windows 08:41 < bridge> no, but i think you can just lock the room/team to prevent spectator joining in 08:41 < bridge> and they can still spectate using /spec player 14:11 < bridge> edlang now supports having both lib.ed and main.ed 14:11 < bridge> and builds a shared library and a binary pog 14:12 < bridge> it also doesnt require a top level module 14:13 < bridge> ```rust 14:13 < bridge> pub exported fn hello_world(a: i32) -> i32 { 14:13 < bridge> return a; 14:13 < bridge> } 14:15 < bridge> ``` 14:15 < bridge> what do u think about the exported keyword? it disables name mangling and makes it externally visible 14:15 < bridge> the pub is only within edlang 14:15 < bridge> or maybe i should just copy rust? pub extern "C" fn 14:15 < bridge> but i doubt ill support other than extern "C" itself 14:15 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1217460708892217394/image.png?ex=66041ba4&is=65f1a6a4&hm=776b07d63f9e1c2b08a4528e39d3d21494102231358a27a90e5290c309142d86& 14:15 < bridge> :owo: 14:15 < bridge> Why do you do mangling at all? 14:15 < bridge> @learath2 because i have modules 14:15 < bridge> namespaces if u will 14:15 < bridge> my mangling is rly dumb tho rn 14:16 < bridge> if i mark it not exported 14:16 < bridge> the name will be 14:16 < bridge> `define private i32 @"hello_world@0@3"(i32 %0) !dbg !2 {` 14:16 < bridge> 0 is like the file id 14:16 < bridge> 3 is the definition id 14:16 < bridge> which increases when it finds definitions like functions etc 14:16 < bridge> ```llvm 14:16 < bridge> 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) 14:16 < bridge> ``` 14:16 < bridge> good debug info kek 14:17 < bridge> Do you have overloads? 14:17 < bridge> @learath2 i will have generics 14:17 < bridge> no overloads for now 14:17 < bridge> If no overloads, why do you need the definition id? 14:17 < bridge> true 14:17 < bridge> but definition id could help in generics 14:17 < bridge> xd 14:18 < bridge> cuz multiple definitions 14:18 < bridge> with diferent types 14:18 < bridge> Yeah, but I think you should move to a more deterministic mangling scheme 14:18 < bridge> yeah 14:18 < bridge> it was just smth quick for now 14:18 < bridge> to not get symbol conflicts 14:18 < bridge> Understandable 14:18 < bridge> @learath2 any known algorithm? 14:19 < bridge> also i think the linker doesnt support the @ symbol 14:19 < bridge> I don't think rust disables "name mangling" for `extern "C"` 14:19 < bridge> oh 14:19 < bridge> you need to add the `#[no_mangle]` attribute IIRC 14:19 < bridge> well then my exported keyword is the same as extern "C" and no_mangle 14:21 < bridge> ill change @ to $ 14:24 < bridge> You could draw inspiration from rust or c++ 14:24 < bridge> You want the return type, the function name (including module maybe), and argument types in order 14:25 < bridge> oh @ actually is valid 14:25 < bridge> for whatever reason, the gdb demangler can segfault 14:26 < bridge> and it's kinda known that it's bad code 14:26 < bridge> > 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. 14:26 < bridge> Huh 14:27 < bridge> > 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 14:27 < bridge> TIL 14:28 < bridge> island is also a reserved name 14:28 < bridge> > 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 pairs (the length being the length of the next identifier), and finally E. For example, wikipedia::article::format becomes: 14:28 < bridge> > 14:28 < bridge> > _ZN9wikipedia7article6formatE 14:28 < bridge> xd 14:28 < bridge> the full text 14:29 < bridge> ok shouldnt be hard to copy this mangling 14:54 < bridge> i keep setting aside implementing strings and arrays with other stuff 14:54 < bridge> i need to focus 14:54 < bridge> :justatest: 14:58 < bridge> Are you doing utf8 strings? 14:58 < bridge> :justatest: 14:58 < bridge> for now ill do just "strings" 14:58 < bridge> and not zero terminated 14:58 < bridge> but ill probs do utf8 14:58 < bridge> actually i wanna do CStr and String 14:58 < bridge> like rust 14:59 < bridge> i think ill end up doing rust2 14:59 < bridge> :justatest: 14:59 < bridge> i have 0 originality 14:59 < bridge> :pepeW: 14:59 < bridge> thats why i ask for ideas 14:59 < bridge> but nobody here has 14:59 < bridge> Rust is just perfect as it is 14:59 < bridge> xD 14:59 < bridge> indeed 14:59 < bridge> Do unsafe by default rust 14:59 < bridge> :justatest: 14:59 < bridge> zig comptime is interesting 15:00 < bridge> i just need to think a feature that makes edlang different 15:00 < bridge> but for now im happy to have a working language 15:01 < bridge> fearful concurrency 15:01 < bridge> i wanna know if there are cutting edge papers 15:01 < bridge> on borrow checkers 15:01 < bridge> Cutting edge borrow checkers are probably so much graph theory that your brain will melt out of your ears 15:01 < bridge> rust with good async 15:02 < bridge> garbage collected rust 15:02 < bridge> hey thats going too far 15:02 < bridge> Mark and Sweep gc isn't too hard to implement 15:02 < bridge> we dont do that here 15:02 < bridge> I'm about to learn some go btw 15:02 < bridge> nice 15:02 < bridge> u only need 1 day 15:02 < bridge> literally 15:02 < bridge> its the only pro of the language XD 15:02 < bridge> 😄 15:03 < bridge> i hate how it handles errors 15:03 < bridge> Why? Is it similar to some language I already know? 15:03 < bridge> makes it all so ugly 15:03 < bridge> @learath2 google made it for interns 15:03 < bridge> to learn how to code 15:03 < bridge> and have people working fast in something 15:03 < bridge> hmm u return a tuple with the error and the result 15:03 < bridge> if the error is not null u use the result 15:04 < bridge> u have to check the error on all ur function invocations 15:04 < bridge> an entire if block 15:04 < bridge> every time 15:04 < bridge> there is no sugar 15:04 < bridge> u can use the result without checking the error 15:04 < bridge> no safety 15:04 < bridge> also it has nulls 15:04 < bridge> so its already a bad lang 15:04 < bridge> :justatest: 15:05 < bridge> https://go.dev/blog/error-handling-and-go 15:05 < bridge> 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 15:05 < bridge> ```go 15:05 < bridge> f, err := Sqrt(-1) 15:05 < bridge> if err != nil { 15:05 < bridge> fmt.Println(err) 15:05 < bridge> } 15:05 < bridge> ``` 15:05 < bridge> im sry but i find it rly ugly 15:05 < bridge> u have to do this 15:06 < bridge> ```rust 15:06 < bridge> func Sqrt(f float64) (float64, error) { 15:06 < bridge> if f < 0 { 15:06 < bridge> return 0, errors.New("math: square root of negative number") 15:06 < bridge> } 15:06 < bridge> // implementation 15:06 < bridge> } 15:06 < bridge> 15:06 < bridge> ``` 15:06 < bridge> Hm, it's just lacking some sugar, isn't this the same approach as rust Results? 15:06 < bridge> having no algebraic data types is a no go too 15:06 < bridge> u have to use a default value 15:06 < bridge> when returning a result 15:06 < bridge> bad bad bad 15:14 < bridge> I guess it doesn't guard as well as Results against you accidentally forgetting to check that there were no errors 15:20 < bridge> the yoke crate is a nice way of doing self-referential structs, even though it has weird terminology 15:21 < bridge> @ryozuki do fractional number representations 15:21 < bridge> https://ed-lang.org/ 15:21 < bridge> new design 15:21 < bridge> actually i just changed the classless css framework i use 15:21 < bridge> xd 15:22 < bridge> you mean as fractions? 15:22 < bridge> yes @heinrich5991 15:25 < bridge> infinite precision arithmetic 15:26 < bridge> btw why is no language doing that? 15:26 < bridge> https://code.pyret.org/editor 15:26 < bridge> ``` 15:26 < bridge> a = 3/5 15:26 < bridge> b = a * 14/2990 15:26 < bridge> print(b) 15:26 < bridge> ``` 15:29 < bridge> 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 15:29 < bridge> and then your result can't be precise anymore 15:32 < bridge> store the expression as a tree then evaluate it when it needs to be😩 15:32 < bridge> my android calculator has infinite precision 15:33 < bridge> I like that 15:33 < bridge> my android calculator has arbitrary precision 15:34 < bridge> python has fractions btw: https://docs.python.org/3/library/fractions.html 16:58 < bridge> 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 `MUL`s instead of one, adding fractions with different bases is variable cost, incurs atleast 2 muls and an add 17:07 < bridge> oh ok 17:17 < bridge> why is this not added in new update? https://github.com/ddnet/ddnet/pull/7521 17:18 < bridge> am I right that for 2 month a name can't be chosen and it is the only problem? 17:25 < bridge> Why would you add something like this to the game? I don't really get whats the use case for this 17:26 < bridge> Some players enjoy doing t0 speedruns. That would be the new kind of private servers. 17:27 < bridge> 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 17:28 < bridge> people getting mad about t0 runs cuz they're not allowed to ban everyone who joins the server 17:28 < bridge> and no one will set a password for them since t0 runs are unsupported 17:53 < bridge> i mean sometimes admins do has happened a few times, but its a hassle for both the runners and the admins 17:53 < bridge> i mean sometimes admins do and it has happened a few times, but its a hassle for both the runners and the admins 18:07 < bridge> 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 18:22 < bridge> ah alright that makes a lot of sense now 22:07 < bridge> @murpi skindb bot is down 22:07 < bridge> do you know why it's down so often? 23:05 < bridge> watfk this button means 23:06 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1217594379083059271/image.png?ex=66049821&is=65f22321&hm=a8ccfd6d8879eafa193f9a162d7a1e752dd381e8a37da726d8c4bab5201b32ee& 23:06 < bridge> reloading 23:06 < bridge> its reloading way too long then 23:07 < bridge> i cant play ghuy 23:07 < bridge> i cant play guys 23:08 < bridge> @bts._. bro answer me 23:11 < bridge> is it just the button not changing? 🤔 23:19 < bridge> you cant reach the master server im guessing 23:27 < bridge> masters messed i[? 23:27 < bridge> masters messed up? 23:29 < bridge> works for me. what do you see? 23:30 < bridge> ``` 23:30 < bridge> 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 23:30 < bridge> 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 23:30 < bridge> 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 23:30 < bridge> 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 23:30 < bridge> ``` 23:31 < bridge> can you visit https://master1.ddnet.org/ddnet/15/servers.json in the browser? 23:31 < bridge> Sometimes master1 works after refreshing for me 23:33 < bridge> Also saw this 525 once (and it gave this link): https://developers.cloudflare.com/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-5xx-errors/#error-525-ssl-handshake-failed 23:41 < bridge> does it work again for you? 23:42 < bridge> btw https://ddnet.org now also intermittently returns 525 errors. `curl -I https://ddnet.org` 23:42 < bridge> yea, but that isn't as vital 23:45 < bridge> Yes 23:45 < bridge> 😃 23:47 < bridge> ah yes it did die