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 2019-09-13 00:00:00Z and 2019-09-14 00:00:00Z
Avatar
0.7: Hey, I have two questions: 1. Why does my rainbow get faster with increasing server uptime (higher tick value)? 2. If I shoot in /pause, so i can spec another player, and then resume the gun shoot will come. Why? It shouldnt save the input, but it somehow does
Avatar
  • @fokkonaut is going to work on giving us a 0.7 DDNet server, he already ported DDNet server to 0.7 for his own mod so only needs to cut away a few features.
  • I will make a map converter to 0.7 today so that we will have all maps available immediately.
  • Remaining task is to take current DDNet client and apply only the network and skin related changes to have a 0.7 compatible client with the same look as current DDNet client.
Any volunteers? Or thoughts about these plans?
Avatar
@fokkonaut where can I find your ddnet 0.7?
Avatar
Currently you cant. Its in my private repo combined with my mod. I will make a pure DDNet when I get home.
Avatar
@heinrich5991 that ixy-languages thing is so interesting, I was sure some black magic would be needed for such high performance applications, yet the C is very clean and readable. I guess sometimes elegant code can also be performant
15:23
The accompanying talk at 35c3 is also pretty nice
15:24
(not that I really agree with the sentiment, drivers still benefit from being written in C as can be seen from the graphs)
Avatar
rust seems to be also fine
15:25
+ you get the benefit that you're less likely to be exploited
Avatar
Sadly rust is plagued by lifetimes and all low level code having to rely on "unsafe" stuff
Avatar
Still better than everything relying on unsafe like most other languages (other than Haskell and friends)
Avatar
For something like a kernel having to have unsafe everywhere just becomes inconvenient at some point
Avatar
C best
Avatar
Definitely not, C is too unwieldy for most things
17:29
@Learath2 i see u joined the js team
Avatar
There is a place for most languages, I don't see the niche rust fills
Avatar
im 2 lazy to learn rust
17:30
it uses kinda some diferent syntax which im lazy to learn
17:30
A language empowering everyone to build reliable and efficient software.
Avatar
I spent a bit of time learning, it's syntax (or maybe semantics) are just too different from most languages
Avatar
look they have a pretty website
17:31
so they can catch
17:31
programmers
17:31
relying on superficial stuff 😎
Avatar
Rust has a pretty strong community behind it and is well developed, it's just unwieldy in the niche it claims to fill
Avatar
what niche is it
17:32
systems lang?
Avatar
It's just not a good "systems language"
Avatar
lately i taken a like a lot for C i dont know why
17:33
but i cant stop
17:33
i look at c++ and im like uhhh
17:33
i know i explain myself so good justatest
Avatar
If I'm prototyping I'd rather use python or nim, if I'm writing a web app I'd rather use js, if I'm writing a backend I'd rather use php, if I'm writing a game I'd rather use C++, if I'm doing embedded I'd rather use C
Avatar
i see so you would use php at some point
Avatar
It just doesn't fit in anywhere in the list of things I'm currently doing 😛
Avatar
making a game in C is not that hard
Avatar
I adopted php because of it's very C-like syntax and nice frameworks
Avatar
do you think php has future?
17:35
js looks rly strong right now tbh
17:35
even for backend
17:35
nodejs
Avatar
https://github.com/exezin/exengine This is what siO has been working on for quite a while
A C99 3D game engine. Contribute to exezin/exengine development by creating an account on GitHub.
Avatar
i know
17:35
im making something in c too
Avatar
@Ryozuki I see php dying off soon enough, nodejs is getting really strong for small projects , python already has great marketshare for larger codebases, scala has great marketshare for reliable code
Avatar
what about java
17:37
i often go to twitch streams in the science section, most are using c#
17:37
btw
17:37
xd
17:37
fcking unity, its ugly af
17:37
Watch Science & Technology channels streaming live on Twitch. Sign up or login to join the community and follow your favorite Science & Technology streamers!
Avatar
java is mostly a dying breed from what I gather
17:38
Scala runs on the jvm and it's much easier to work with for backend applications
Avatar
have u heard about kotlin
Avatar
even learned a bit about it trying to help a friend debug
17:40
interesting language, but I find the syntax a little meh, tbh languages really shouldn't mess around with syntax anymore
17:40
The C-Like and Python-like syntaxes work great, adding a syntax barrier to your language just slows down adoption
17:41
its the main reason i dont learn some langs
17:41
haskell has some rly weird stuff
Avatar
[7:35 PM] Ryozuki: im making something in c too
C is nice, but it's lack of objects really shows in game engine type of projects
17:43
s#objects#classes/polymorphism
Avatar
you can work around it
17:45
its kind of fun
Avatar
ofc, you can even have vtable-like structs using some function pointers and macro black-magic
17:48
it just looks a little ugly 😛
Avatar
lol
18:04
js is future
18:04
no php
Avatar
py is future ans u su
Avatar
@Learath2 the thing is, even in a kernel, unsafe isn't everywhere
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:22:20Z
it's still in enough places that your hands would get tired of typing unsafed
19:22
and you'd start seeing the word unsafe in your dreams
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:23:30Z
yea, and then you don't end up with buffer overflows at points where you didn't expect them
19:24
isn't it a huge improvement that the typical security vulnerability goes down from "arbitrary code execution" to "denial of service through service downtime"?
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:29:04Z
Well I and apparently many others given rusts relatively very slow adoption as a systems language, prefer not writing mission critical code in an unfamiliar language and write a metric shit ton of code that won't even benefit from the safety of said language
19:29
Good practices always beats language crutches imho
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:29:49Z
statistics say something different
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:30:07Z
I can't fathom a study that's unbiased
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:30:09Z
or you say that most popular projects don't follow good practices
19:30
say you have a popular fuzzer and run it against open source projects e.g.?
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:31:09Z
for regular applications I'm sure rust will have significantly less vulnerabilities
19:32
My point is, at what cost? If writing a program now takes me 50 hours instead of 10, is it really worth it?
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:32:58Z
if you go from remote code execution to DoS in a library used by lots of programs, yes, definitely
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:33:14Z
Which library do you have in mind?
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:33:18Z
libpng
19:33
e.g.
19:33
openssl
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:34:44Z
openssl has such a huge footprint that even if it was written in SPARK it'd have bugs
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:35:00Z
yes. it'll have bugs if it's written in rust
19:35
but likely not stack overflow, etc.
19:35
logic bugs, definitely
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:35:47Z
for libraries of that size, it's just too late
19:35
they'll never get rewritten in rust or any other language
Avatar
librsvg got rewritten and retained its interface
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:36:23Z
its developer wrote about the porting experience
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:37:26Z
librsvg isn't half the size of openssl :D
Avatar
and it got rewritten by a single developer I think (not sure)
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:38:00Z
anyway, I'm not saying you should bother people to rewrite their libraries
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:38:02Z
This is beyond the point anyway, yes rust will definitely improve vulnerabilities
19:38
But it just doesn't fill any niche
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:38:30Z
the one of high performance stuff that touches untrustworthy data
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:38:45Z
It tries to be a better C, nothing will ever replace C because entire architectures are designed on supporting C
19:39
Your toaster will most likely never run rust
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:39:09Z
nah, mostly because it's the platform language of the unixes I think
19:39
and my toaster has no problems running rust
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:39:53Z
But my point is that it'll never
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:40:09Z
wanna take a long-term bet?
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:40:14Z
Sure
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:40:22Z
I bet in 20 years, there'll be iot appliances using rust code
Avatar
[quakenet] deen BOT 2019-09-13 19:40:37Z
I bet there are IOT appliances running Rust today :D
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:40:45Z
You could just go ahead and make one and I'd lose that bet lol
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:40:58Z
aside from my direct influence
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:41:09Z
Rust will never be the dominant language in the embedded world is one I'm willing to take
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:41:47Z
what about C will not be the dominant language in the embedded world?
19:42
because you said " nothing will ever replace C because entire architectures are designed on supporting C"
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:42:38Z
It seems like you are emotionally invested in rust's success :P
Avatar
analysing the psychology of one's conversation partner has always led to great discussions…
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:43:32Z
try to construct the obvious answer that I could give to completely derail this conversation
19:43
okay, even that was too far, probably "try to…". sorry
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:45:22Z
My argument just relies on how businesses work, they don't have an ideological or emotional attachment to anything
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:46:25Z
that argument isn't so simple
19:46
for now, that argument looks to me like I could disprove the existence of the free software movement with it
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:47:21Z
There are hundreds of thousands of lines on code making sure that nearly every piece of hardware capable of running code is capable of emulating the c abstract machine
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:48:00Z
what do you mean by that?
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:48:10Z
The return on investment on writing code in another language is fairly small, just the sunk cost fallacy would stop businesses from investing in a rewrite
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:48:32Z
C/Rust is not an either or
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:49:35Z
heinrich5991: there is an implementation of libc that works on most anything and there are things that the c abstract machine requires that wouldn't always be optimal
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:50:02Z
e.g.?
19:50
maybe null-terminated strings, those are a bit annoying
19:50
I don't quite get what you mean with the "c abstract machine". isn't that mostly C without the libc?
19:50
i.e. pointers, functions, etc.
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:52:25Z
e.g. while the c abstract machine doesn't really require a stack, it's the easiest way to implement C, every processor on the market has instructions that work on some form of stack
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:52:57Z
hm. isn't that what most programming languages require?
19:53
i.e. I could claim that the easiest way to implement the rust semantics is to use a stack and that all hardware apparently has been designed for rust?
Avatar
[quakenet] Learath2 BOT 2019-09-13 19:54:31Z
rust is relatively young, nothing has been designed for rust
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 19:54:48Z
yes. I was just trying to show that your argument doesn't hold
19:55
the argument has (as far as I can tell, and only so far) been reduced to "there's hardware that appeared after c emerged"
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:00:36Z
I obviously haven't worked in the 90s and can't really tell you whether it's actually the reason nearly a 100% of the cpu's out there (eventhough they have vastly different internal architectures) support a set of very similar instructions
20:01
but it's my personal opinion that the c standard very much affected the way people built their instruction setd
20:01
sets*
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:01:35Z
but in what way?
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:02:07Z
I gave you one example which you conveniently brushed away by making an absurd claim
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:02:19Z
the example is the stack?
20:02
I don't think that C affected that
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:03:10Z
It's not always convenient to have a stack, most cpus don't even have dedicated stacks anymore
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:04:13Z
I don't understand. in order to keep track of where you what your callstack is (I find that to be a pretty universal concept among programming languages), you need a stack
20:04
at least I don't know the alternatives
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:04:43Z
It's very trivial to take a look at C code and it's compiled version to see that C maps to assembly very cleanly in most any cpu
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:05:24Z
there are quite some exceptions to this claim
20:05
e.g. vectored instructions
20:05
trivial strlen code
20:05
division by a constant
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:06:03Z
There are languages that don't even have the concept of function calls
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:06:32Z
let me make this claim I'm pretty sure of: C neither innovated with the concept of function calls nor did it popularize it
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:09:04Z
Sadly, my historical knowledge of the subject is pretty incomplete so I can't continue with this line as anything I say you can dismiss with a similar argument.
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:10:08Z
do you believe that the idea of function calls has anything to do with C?
20:11
e.g. pascal, appeared before C, had no problems with having function calls
20:11
with a stack
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:11:34Z
No, ofc not
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:11:50Z
well then let's continue and dismiss this piece of information neither of us believes in
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:14:36Z
Say processor manufacturers don't give two shits about the C standard, doesn't really matter to my original argument
20:15
(which I don't believe tbh, no one would ever produce an architecture that can't possibly emulate the abstract machine)
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:15:51Z
maybe because there's not much special about most programming languages in that field, and if you'd not support them you'd have pretty much fucked up your CPU
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:16:07Z
I still maintain that reimplementing things in rust (or anyother language for that matter) just does not make any business sense
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:16:20Z
okay. then let's implement new things in rust instead
20:16
I agree that asking to reimplement stuff is a bit high of an ask
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:17:32Z
Which brings me to my second point, rust by ditching the familiar syntax and introducing an (imho) ridiculous amount of thinking overhead hindered it's adoption a lot.
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:18:30Z
is there things that it needlessly complicated (i.e. beyond the borrow checker and its thread safety, which are its value proposition)?
20:18
*are there
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:20:43Z
e.g. match statements are a completely alienating concept to most
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:21:04Z
hm. okay
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:21:22Z
e.g. string formatting is also needlessly changed
20:21
I'm not saying that string formatting is bad in rust
20:21
What I mean is that it's different for what appears to be being differents sake
20:22
Which is definitely not good for adoption
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:22:21Z
I can see how these differences can make a difference for programmers coming from C
20:22
note that they're not really different for different's sake, like e.g. C++ also introduced things like match but in a much uglier form
20:23
(i.e. you have to provide lambdas for each case instead of it being baked into the language)
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:23:26Z
It's equally unfamilar to a js/java programmer who is used to just using + or C-like formatstrings , or python user who is used to % or .format()
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:23:40Z
it's like python's .format
20:23
println!("Hello, integer {}!", 123)
20:24
println!("Hello, {}!", name); where name is a string
20:24
you can do + like in js/java if you really want (it's supported) but just don't
20:24
printf-style formatting is not available
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:24:58Z
"but just don't" is what's wrong with this
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:25:05Z
it's available
20:25
that's just my personal opinion that you shouldn't do it
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:25:27Z
There are also if/else statements and you can use them just like in other languages
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:25:28Z
because it leads to some software maintainability problems
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:25:29Z
but no one would
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:25:57Z
but .format-style formatting is availabe and is used
20:26
where's the problem with that?
20:26
you can't expect two of your examples to be the most used version for string formatting
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:27:34Z
I can and most do expect things to work atleast at some level similarly to a language they've worked with before
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:27:48Z
they do work (except for printf-style)
20:27
where's your exact problem right now, I don't quite get it
20:28
is it that printf-style isn't available?
20:28
or that .format-style is the most dominant one?
20:28
these are the two issues that I saw
20:28
is it something else?
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:29:13Z
It was just an example, seriously I have no problem with a language being different
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:29:32Z
so the issue was that "printf-style formatting is not available"?
20:29
(that's fine, I'm just having a hard time figuring out what you mean)
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:30:50Z
That was the issue for me when I was learning rust, but it's one that's easy to overcome
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:31:00Z
okay. then I at least get the problem
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:32:09Z
These things build up over time, if too many things are different, people just don't bother learning
20:32
Especially when these syntax issues have nothing to do with the main promise of the language
20:33
Look at haskell, while it has a different syntax, it's syntax is very intuitive for it's usecase
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:36:58Z
hm. I'd guess I had to learn all three separately, C, Haskell and Rust
20:37
none of it was intuitive at first
20:37
you should have seen my first C or C++ programs
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:37:39Z
C was very intuitive for me the second I started learning properly from a book
20:37
Which is a very horrible pitfall for C
20:37
Because C is anything but intuitive or convenient to use
20:41
Give it a week and there won't be any C program that you can't read (albeit not quickly)
20:41
I gave rust a month and yet still some symbols just confuse me, I need the documentation open for reading most anything
Avatar
C wasn't that quick for me I think
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:42:44Z
Which definitely could be saying that I'm just incompatible with rust or plain retarded. It's anectodal at best
Avatar
but I agree that C is simpler in terms of language semantics
20:43
in the way that go is a simple game or so 😛
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 20:43:29Z
(because it has simple rules)
Avatar
[quakenet] Learath2 BOT 2019-09-13 20:49:01Z
If I asked you what does '&' do in rust, what would your answer be?
20:50
or '!'
20:51
I guess the only other one that comes to my mind right now is ':'
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 21:01:09Z
& indicates taking the reference and is also used for the reference type
21:02
! as a return type means that the function does not return normally. println! and similar warn you that the preceding identifier is a macro. logical negation also exists
21:03
: says that a is of type b, I don't know any other meaning off the top of my head
21:03
& as bitwise and and && as logical and also exist
Avatar
[quakenet] Learath2 BOT 2019-09-13 21:04:03Z
: is also used to initialize things in a struct
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 21:04:15Z
oh true
Avatar
[quakenet] Learath2 BOT 2019-09-13 21:04:26Z
Everytime I see one of these symbols, I have to think carefully what they mean in this context
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 21:05:12Z
C has fewer operators. but e.g. * also has such double meanings, right?
Avatar
[quakenet] Learath2 BOT 2019-09-13 21:05:16Z
In C (and most other languages I've used) there is only one thing to consider is the symbol an unary operator or a binary one
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 21:06:19Z
and also whether it is in a type context or not, I guess?
Avatar
[quakenet] Learath2 BOT 2019-09-13 21:06:52Z
In C declaration follows use, you can still think about * as the unary operator
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 21:07:34Z
in rust, declaration mostly follows instantiation, I'd guess?
Avatar
[quakenet] Learath2 BOT 2019-09-13 21:08:19Z
again, not really a very important thing, but it still adds to the overhead of reading rust code
21:13
None of these would matter, if borrows, the main promise of the language didn't take so much out of you
21:15
I constantly have to think about who owns what
Avatar
I mean for non-long-lived objects in C, you also have to do that
21:15
and you even have to do that more consciously, because you don't have the compiler to help you
Avatar
[quakenet] Learath2 BOT 2019-09-13 22:42:05Z
try coding a linked list in rust or better yet a graph library
22:42
it absolutely drove me insane trying to get the references correct for a graph library
Avatar
[quakenet] heinrich5991 BOT 2019-09-13 22:43:54Z
yup, that's something rust isn't good at
22:44
writing data structures. using them is fine though
Exported 250 message(s)