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 2021-06-30 00:00:00Z and 2021-07-01 00:00:00Z
Avatar
@heinrich5991 found another case where a player doesn't have server list at home just like in netcafe. he has 360 installed.
Avatar
[quakenet] deen BOT 2021-06-30 06:51:54Z
Can you try opening a ticket/report at norton/360?
06:52
Probably the only way to get around antivirus software miscategorizing us
Avatar
E.g. allow it to see the messages the server sends.

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 if it works standalone, system.c especially
  • [x] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](ht...
Avatar
[quakenet] heinrich5991 BOT 2021-06-30 12:24:43Z
Free antivirus 360 Total Security is a leader in antivirus software. With a billion active internet users, 360 has earned a strong reputation for excellence.
Avatar
Oh, I thought it's Norton 360
Avatar
ChillerDragon:
15:51
chillerdragon:
Avatar
Seems outside of js no language really does async well yet
Avatar
ah, does JS do async well nowadays? no callbacks anymore?
Avatar
Well I'm yet to hit any actually gamebreaking issues and their usage is very straightforward
Avatar
they had the semantic that they always evaluate to end, unless you abort them?
Avatar
Though the problem they are solving is much easier than the problem rust and C++ try to solve. A compiled language makes it much more annoying to work with
Avatar
ZombieToad BOT 2021-06-30 16:37:18Z
image.png
16:37
who try hack me
Avatar
Avatar
heinrich5991
they had the semantic that they always evaluate to end, unless you abort them?
@heinrich5991 hm, is that really something unexpected?
Avatar
someone else also reported this, might be some manual map release script gone wrong, ZombieToad
16:38
@Learath2 I think rust futures don't have this semantic
Avatar
Rust futures don't really have any semantics of their own really, it's all kinda up to the executor
Avatar
I wasn't trying to say that either is bad, just trying to understand what they do
Avatar
I'm not quite sure what the alternative is tbf, if you don't abort them they kinda have to run to completion, no?
Avatar
you could only start running them once you await them in a way
Avatar
Aaah, I see what you mean, yeah no js promises to just start immediately
16:41
Oh actually I bet you can get this behaviour, let me check, now I'm curious aswell 😄
Avatar
i think callbacks are a think of the past, u use Promises now
16:44
u chain .then() and stuff
16:44
or just await
Avatar
Yeah callbacks are pretty dead, I wonder if promises run without being awaited though
Avatar
in rust u have to await them
16:44
or they never run
Avatar
uhm
16:48
.then()? doesn't it have something like await?
Avatar
it does
16:48
u can use both ways
Avatar
It has await and it has .then
Avatar
because with .then you suddenly lose all your normal control structures
Avatar
Avatar
Ryozuki
it does
nice 🙂
Avatar
but i found out with then its easier to transform a value
16:49
into another promise
16:49
e.g deserialization
16:50
16:50
this is typescript tho
16:51
(method) Api.list_users(query: UserQuery): Promise<ApiError | ApiListResponse<User>> (edited)
16:51
xd
16:51
then second argument handles rejection too
16:52
the throw should be a return tho
16:52
my bad
Avatar
@heinrich5991 yep js promises do execute immediately, even if you never await them, I didn't know this 🙂
Avatar
I haven't read the js spec at all so far
16:53
I can try to have a look
Avatar
thats quite the big document
Avatar
Someone made a lazy promise too btw, it just defers the creation of the actual promise until you call .then or .catch once
Avatar
other way around is probably also possible?
Avatar
Oh and there are async functions, those don't get executed immediately either
Avatar
hum?
Avatar
Avatar
heinrich5991
other way around is probably also possible?
wym by other way around?
Avatar
making a lazy promise non-lazy
16:59
by submitting it to the runtime
16:59
and just waiting for the result in the proxy future
Avatar
Avatar
heinrich5991
hum?
I mean unless you await myasyncfunction() nothing will execute yet
Avatar
what is the difference between an async function and a Future?
Avatar
Avatar
heinrich5991
making a lazy promise non-lazy
hm, as soon as you call .then it will create a real promise, which starts executing immediately
Avatar
yes
Avatar
Avatar
heinrich5991
what is the difference between an async function and a Future?
Well async functions are sort of like templates for Promises if you will, when you call them they will return a promise
Avatar
hmmm
17:04
so promises only start executing once you call then?
17:06
"then", not "them"
Avatar
As soon as you call the constructor Promise(executor) it will call executor
Avatar
but async functions also return Future(-like?) objects that only start executing once you call then?
Avatar
Ah, no async functions also return normal promises that immediately start executing. I guess it's just syntax sugar but you are calling the executor in this case, which makes it more obvious that it is indeed being run right now
Avatar
Avatar
heinrich5991
there's a discord command framework
Do you remember where you spotted this btw? Was it serenity or did you see something else?
17:12
I was making my own but it is quite a bit annoying to make it as flexible as I want at which point I might aswell use someone elses
Avatar
@Learath2 I meant the fact that discord has support for / commands
17:15
not actual support for that in any rust discord framework or so
Avatar
ah, hm, maybe I'll spend one more day on it, see if there is a way to make this pretty, if not I'll I guess just make the entire thing in js
17:19
(well ts ofc, just using js is insanity)
Avatar
I desperately need to learn some js/ts
17:19
my frontend skills suck
Avatar
eh modern frontend these days dont even use vanilla js functions
Avatar
Vue is fun to learn and it's not too pushy with it's ideology
Avatar
so u need to learn every new framework (edited)
17:20
i have fun using react, specially react hooks
17:21
way less boilerplate code than react with class compoennts
17:21
components
Avatar
There is one large advantage to react though, if you learn react, you also mostly know react-native. Which means you are a certified appdeveloper too 😄
Avatar
even css is inside js now
17:21
u dont need to leave a js file
Avatar
any app that I use that uses react-native?
17:22
so that I can evaluate whether it's garbage, performance-wise
Avatar
A bit of instagram is now react-native iirc
17:22
js will be everything
Avatar
Airbnb is react-native, (they also contribute very high quality libraries back to the community)
Avatar
Ah, this very app we are chatting on uses react-native too apparently, just checked 😄
Avatar
well, discord is garbage, I wnat to produce higher quality software
17:23
it's the first thing that starts to lag on my computer
Avatar
well idk if u can with js
Avatar
You definitely can, I honestly am very happy with the react native apps I'm using on the phone
17:25
they don't have that janky made in indian sweatshop webapp bolted into a webview feeling and they perform fairly decently
17:27
The ability to just use native UI components really hides away the js running behind the scenes
Avatar
i really like the way this is structured
18:46
no frills just one comparison after the other
18:47
this makes me really want to learn zig
18:48
i shouldn't assume zig and nim has similar goals right?
Avatar
His feelings are a bit similar to mine, rust does kinda require you to learn a lot in a very short amount of time to start writing useful things
Avatar
i think zig is more focused on safety than nim is from what i remember
Avatar
zig is also aiming to be a lower level language, it's more aimed to be like a step up from C
18:50
I like zigs approach to asynchronous programming too, the compiler can infer whether your functions can be async or not
Avatar
that's fucking wild
18:51
is it super implicit? or is there some more technical reasons for running it async vs not
Avatar
wym by super implicit?
18:55
fn send(addr: net.Address) !void { var socket = try net.tcpConnectToAddress(addr); defer socket.close(); _ = try socket.write("message"); }
18:57
This function is normally blocking, but if you set io_mode = .evented the socket will be opened non blocking
Avatar
so not as implicit i think because you have to say defer right?
Avatar
@Learath2 do u remember the guy u discussed in tokyo discord?
19:06
he was a zig fanatic
19:06
and went on rust reddit to preach it
19:06
monkalaugh
Avatar
wait i want to understand
19:07
what's the point of _ = if the return type is void
19:08
also what's ! in return type, is that like, force?
Avatar
at this point u might just learn zig
Avatar
i would learn it but im 2 lazy, ill wait to see if it becomex more widespread
Avatar
my assumption is that try requires you to assign its result
19:09
which i guess makes sense
Avatar
The Rust Language Server is usable. It works well on valid code, but struggles to deal with invalid states during editing. It can also be painfully slow in large codebases - when working on materialize it was often 3-5x slower than just running cargo check.
>
I haven't tried the intellij rust plugin or rust-analyzer.
>
I haven't yet tried the Zig Language Server but it appears to be fairly complete.
19:11
why
Avatar
Avatar
lynn
so not as implicit i think because you have to say defer right?
the defer is to cleanup at the end
Avatar
why he hasnt tried the most complete language server out there
19:11
damned it be RLS
Avatar
When the function returns in zig all the defers are executed
Avatar
ah its copied from golang
19:11
tho
19:11
i think it has some drawbacks
Avatar
or gotchas
Avatar
I still haven't internalized the full rule-set of rust enough to be able predict whether a design in my head will successfully compile. I don't remember the order in which methods are resolved during autoderefencing, or how module visibility works, or how the type system determines if one impl might overlap another or be an orphan. There are frequent moments where I know what I want the machine to do but struggle to encode it into traits and lifetimes.
Avatar
It probably does compared to RAII, RAII is usually a more robust system
Avatar
hah, I'm further than that!
19:13
On the other hand, we can't type-check zig libraries which contain generics. We can only type-check specific uses of those libraries.
hm, I considered this an error in C++ tbh
19:13
*mistake
19:13
that templates are just code substitution, plus SFINAE
19:14
of the unfortunately named release-fast mode which disables all runtime safety checks.
19:14
I like rust's way of making things longer or more annoying to type where other options should be preferred
Avatar
lol unfortunately named release-fast mode
Avatar
ah nice, it has slices, that's a major step up from C 🙂
Avatar
The way rust verifies traits makes wrapping functions with trait bounds rather annoying
Avatar
I can imagine this. do you have a concrete example anyway? 🙂
Avatar
Well I had something like fn new<F, Fut>(name: String, cb: F) where F: Fn(Arc<Context>, String) -> Fut + 'static, Fut: Future<Output = CommandResult> + 'static {} and I had another function fn register which needs to call new. Now I need to repeat my rather long traits again
Avatar
I see
Avatar
Avatar
lynn
also what's ! in return type, is that like, force?
!T means either an error or T
19:35
Same as Option<T> in rust
Avatar
Avatar
lynn
what's the point of _ = if the return type is void
If a function can return an error type, you may not ignore it
19:39
thus you assign to _ to discard
Avatar
so that avoids the implicit return
Avatar
The problem with zig is that it's fairly immature, not enough funding/userbase there, so it's slow too 😦
19:40
is nim much better? (in that sense) (edited)
Avatar
they have similar userbases, maybe nim is a tad larger
Avatar
i think nim is less famous than zig
Avatar
i thought nim was larger
Avatar
they are the same order of magnitude tho
Avatar
i dont see it mentioned anywhere
19:40
but maybe its just me
19:41
in rust lot of ppl mention zig so
Avatar
maybe this is a bad source of popularity but
19:41
19:41
slant xd
19:41
i dont trust this site
19:42
for the record
19:42
rust is at 1.53.0
19:42
xd
19:43
it says nim is a better systems programming language feelsbadman
Avatar
nim is garbage collected lmao 😄
Avatar
rust has 144k readers, nim 4.5k, zig 3.3k
19:45
on reddit
19:45
cpp 188k
19:46
but rust has most online users
19:46
xd
Avatar
rust is more hip amongst the younguns who are more online
Avatar
rust users be like "get with the lifetimes"
Avatar
nice one
Avatar
thx (edited)
20:03
ill be here all week
20:03
and the week after
20:03
and the week after that
Avatar
i just realized other countries probably dont have the idiom "ill be here all week" after telling a bad joke
20:05
ups
Avatar
oh another interesting thing about zig is its first class support for cross compiling
20:08
It can do all these targets out of the box with no messing around with
20:08
you just pick the triplet you are targetting and it will give you executables
20:08
monkalaugh
Avatar
I'm considering looking into one last language this week, Go
Avatar
u only need 1 day to learn go
20:09
its stupidly easy
20:09
trust me
Avatar
It looks amazing for async work, it definitely deserves a try
Avatar
ok but the lead dev of zig is kind of a cutie
Avatar
My honeymoon with the Go language is extremely over. This article is going to have a different tone from what I've been posting the past year - it's a proper rant. And I alw...
Avatar
i think the tortoiseshell frames carry him tho
Avatar
I already read this, it's a bit disappointing yes
Avatar
Avatar
lynn
ok but the lead dev of zig is kind of a cutie
kek
Avatar
i decided it's just the glasses
20:49
i am considerably less emotionally invested in this man
20:49
the real test is if @TsFreddie agrees
Exported 222 message(s)