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 2018-03-19 00:00:00Z and 2018-03-20 00:00:00Z
[quakenet] <deen> Learath2: The idea is that by restrictring your own power you have fewer things to think about and thus make fewer bugs. If you see a value is immutable you don't have to reason about how it will change during the function execution
05:04
[quakenet] <deen> And of course, like heinrich5911 said, the compiler can make use of it for optimizations
05:06
[quakenet] <deen> 5991*
05:09
[quakenet] <deen> See also: "Using control structures instead of goto", "Using scope instead of globals", "Static instead of dynamic typing", DSLs, etc
In programming, the rule of least power is a design principle that "suggests choosing the least powerful [computer] language suitable for a given purpose". Stated alternatively, given a choice among computer languages, classes of which range from...
[quakenet] <Learath2> or you can just pay attention? The optimization gains are nice which is why it'd be a nice language feature like in javascript
13:57
[quakenet] <Learath2> but having it by default or forcing it on all variables is just overkill, been using redux for the last month and everyone keeps shouting at you to not mutate the state but mutating the state is much quicker then making a new copy of the entire app state and modifying that
14:02
[quakenet] <deen> Well, if you have to modify the entire state all the time, then it sounds like you still want to do imperative programming. I guess redux is trying to enforce functional style. You have some example?
14:05
[quakenet] <Learath2> I want the language to let me do whatever I want without fancy keywords. If I want safety features or to mark something immutable I should be the one to decide that
14:05
[quakenet] <deen> So you also want to type check by default?
14:06
[quakenet] <Learath2> I guess you mean "(disable) type check..."
14:07
[quakenet] <deen> yes
14:07
[quakenet] <deen> And in my experience people keep forgetting to mark values as immutable
14:07
[quakenet] <Learath2> As long as it doesn't hurt the language's structure I don't mind, if you are going to make it a mess like js you better keep the type checking
14:10
[quakenet] <Learath2> I feel a strongly typed language helps very much in reducing bugs, but ask many people who use js, py, ruby and they might feel it slows them down
14:13
[quakenet] <deen> Yeah, and you sound similar about immutability :D
14:14
[quakenet] <Learath2> I kinda enjoyed the fact that javascript had all the tools needed to write in a functional way but also let's you write in an imperative way
14:14
[quakenet] <Learath2> What's wrong with freedom? Opionated languages and frameworks make us boring and predictable.
14:15
[quakenet] <deen> What's wrong with freedom? Building codes and fire exists make us boring and predictable.
14:16
[quakenet] <deen> So the idea is that you want your code to be boring and predictable in order to work together in big teams and easily read and understand each other's code
14:16
[quakenet] <deen> Preferring a simple solution over an interesting but harder to understand one
14:17
[quakenet] <Learath2> off-topic: deen: where did we mount the test server maps? servers/test/maps or servers/test/data/maps?
14:17
[quakenet] <deen> Go language tries very hard to do that
14:17
[quakenet] <deen> dunno :D
14:17
[quakenet] <deen> run-all.sh says test/data/maps
14:18
[quakenet] <deen> Nim is quite the opposite, you can write fully imperative code, do unsafe stuff everywhere, have macros that change the language in some places to something totally different. So that's a whole lot of fun, but I wouldn't recommend it to a large team for mission critical software
14:20
[quakenet] <Learath2> mission critical software has been written for decades, standards and coding simply not fancily already solve these issues
14:20
[freenode] <nemo> heh. there was a dude on hedgewars server the other day who was scoffing at rust, 'cause it wasn't coq
14:20
[freenode] <nemo> "How can you trust any code that hasn't been formally verified"
14:21
[freenode] <nemo> at some point, gotta actually just get stuff done
14:21
[freenode] <nemo> (this was because we were discussing the rust port in that room)
14:21
[quakenet] <Learath2> functional programming surely makes it easier, which is why it's a nice paradigm, shoving it down peoples throats is just, meh
14:21
[quakenet] <deen> yeah, I tried running a SAT solver on some of our code at work, ran out of memory after 48 hours :D
14:21
[quakenet] <deen> not much success with proving for me
In computer science, Coq is an interactive theorem prover. It allows the expression of mathematical assertions, mechanically checks proofs of these assertions, helps to find formal proofs, and extracts a certified program from the constructive pr...
14:23
[freenode] <nemo> did you guys see how Sir Robin was discovered using a SAT? (the conway knightship)
14:23
[quakenet] <deen> yeah
14:24
[freenode] <nemo> also... apparently some dude out there is busy formally verifying fundamental rust libs, so at least there's that, if it makes dude-on-our-gameserver-feel better.
14:24
[freenode] <nemo> 'course he misunderstood me at time and thought I was suggesting this was a normal thing to do in rust. but then, he also thought rust only had memory bounds checks, nothing more
14:25
[quakenet] <deen> Unit testing would already be a step in the right direction :D
14:25
[quakenet] <deen> At least prove that your code works for one case, not for all
14:25
[quakenet] <Learath2> currently learning rust, it is pretty different
14:26
[quakenet] <Learath2> as in I've never quite seen anything like it
14:28
[quakenet] <deen> anything in specific?
14:30
[quakenet] <Learath2> the syntax is really new, i keep finding myself thinking in if/else if/else where I should probably be thinking in terms of match blocks
[quakenet] <heinrich5991> deen: coq is different, it's not an automatic prover but a proof assistent – it won't run out of memory, it'll tell you to specify the proof ^^
[quakenet] <heinrich5991> laxadedi: it's no longer deprecated, it's removed
23:11
[quakenet] <heinrich5991> there's something in the readme about mysql support:
23:11
[quakenet] <heinrich5991> laxadedi: MySQL (or MariaDB) support in the server is not included in the binary releases but it can be built by specifying -DMYSQL=ON, like cmake -DMYSQL=ON ... It requires libmariadbclient-dev, libmysqlcppconn-dev and libboost-dev, which are also bundled for the common platforms.
23:12
[quakenet] <laxadedi> I hate cmake, cannot find my local libs...
23:13
[quakenet] <heinrich5991> what do you mean by "local"? self-compiled? in the package manager? in the repository?
23:13
[quakenet] <laxadedi> package manager
23:14
[quakenet] <heinrich5991> mh. should be able to find these
23:14
[quakenet] <heinrich5991> mind sharing the output of the initial cmake run?
23:14
[quakenet] <laxadedi> -- * MySQL not found (using bundled version)
[quakenet] <heinrich5991> and also libmariadbclient-dev (or the equivalent for mysql, if that exists)? I guess you previously compiled with bam and it worked?
23:16
[quakenet] <laxadedi> cmake 3.10.3
23:16
[quakenet] <laxadedi> yes, I had no issue with bam, libmariadblcient-dev does not exist on debian
23:17
[quakenet] <heinrich5991> libmysqlclient-dev then I guess?
[quakenet] <laxadedi> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/libmysqlcppconn-static.a(mysql_client_api.cpp.o): In function ql::mysql::NativeAPI::LibmysqlStaticProxy::get_server_version(st_mysql*)':
23:40
[quakenet] <laxadedi> trying a fresh build after cleaning cmake + objs files
23:40
[quakenet] <heinrich5991> I hope that doesn't fix it
23:40
[quakenet] <heinrich5991> cmake/make should be able to track that
23:41
[quakenet] <laxadedi> Well, I have no idea, I never liked CMake, too much "magic"
23:41
[quakenet] <laxadedi> A giant pain in the ass to debug that
23:42
[quakenet] <heinrich5991> mh. I just recently learned it and I don't think it's that bad