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 2018-03-19 00:00:00Z and 2018-03-20 00:00:00Z
Avatar
[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
05:10
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...
Avatar
Interesting
Avatar
[freenode] <nemo> immutability is used for reliability/performance too
12:36
[freenode] <nemo> like Java (and others) making strings immutable
Avatar
[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
14:22
[quakenet] <Learath2> what is a coq even?
14:22
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
Avatar
[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 ^^
Avatar
[quakenet] <deen> heinrich5991: I know, I've used it a bit. Wanted to try out something new though
Avatar
[quakenet] <heinrich5991> o_be_one / o_tee_one: I understand your name now. it hit me in the shower :D
Avatar
justabutterflier 2018-03-19 18:06:54Z
pituh?
Avatar
[quakenet] <jxsl13> xD "It hit me in the shower"
21:33
[quakenet] <jxsl13> anyone online :D?
Avatar
[quakenet] <laxadedi> bam support deprecated for ddnet ?
22:06
[quakenet] <laxadedi> Is there still different build for server / server-sql / clients ? If yes, I think it should be added to the README.md
Avatar
[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)
23:14
[quakenet] <laxadedi> # dpkg-query -L libmysqlcppconn-dev
23:14
[quakenet] <laxadedi> /usr/lib/libmysqlcppconn-static.a
23:15
[quakenet] <heinrich5991> do you have the tool mysql_config? which mysql_config
23:15
[quakenet] <laxadedi> I do
23:15
[quakenet] <laxadedi> /usr/bin/mysql_config
23:16
[quakenet] <laxadedi> It's up-to-date debian 8.10
23:16
[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?
23:17
[quakenet] <laxadedi> already installed :)
23:18
[quakenet] <heinrich5991> good
23:18
[quakenet] <laxadedi> /usr/lib/x86_64-linux-gnu/libmysqlclient.a
23:19
[quakenet] <heinrich5991> can you pastebin the CMakeCache.txt?
23:20
[quakenet] <laxadedi> pmed the link
23:21
[quakenet] <heinrich5991> output of mysql_config --libs_r
23:21
[quakenet] <laxadedi> -L/usr/lib/x86_64-linux-gnu -lmysqlclient_r -lpthread -lz -lm -ldl
23:21
[quakenet] <heinrich5991> hmmm
23:24
[quakenet] <laxadedi> Is there a way to say to cmake where to get the library ?
23:24
[quakenet] <heinrich5991> yes
23:25
[quakenet] <laxadedi> I guess it's not a proper fix, but I'd take it for now
23:25
[quakenet] <heinrich5991> -DMYSQL_LIBRARY=/usr/lib/x86_64-linux-gnu/libmysqlclient.a
23:25
[quakenet] <laxadedi> ok building, going to take 2 minutes at least, crappy server :D
23:25
[quakenet] <heinrich5991> but you also need MYSQL_INCLUDEDIR, MYSQL_CPPCONN_LIBRARY and MYSQL_CPPCONN_INCLUDEDIR then
23:26
[quakenet] <heinrich5991> you could apply this patch and tell me what it outputs
23:26
[quakenet] <laxadedi> according to CMAkeCache, the include dirs are good
23:26
[quakenet] <heinrich5991> ok
23:26
[quakenet] <laxadedi> only the libs are wrong, which could explain the "undefined ref" when compiling
23:26
[quakenet] <heinrich5991> yes
23:30
[quakenet] <laxadedi> So slow :(, 65%
23:31
[quakenet] <laxadedi> And I am stupid, compiling everything instead of just the DDNet-Server
23:31
[quakenet] <heinrich5991> make DDNet-Server
23:31
[quakenet] <heinrich5991> you can safely ctrl-c
23:31
[quakenet] <heinrich5991> progress is kept
23:31
[quakenet] <laxadedi> Now building the server x)
Avatar
[quakenet] <laxadedi> beh, failed
23:34
[quakenet] <laxadedi> tons of undefined reference
23:35
[quakenet] <heinrich5991> grep 'MYSQL.*_LIBRARY' CMakeCache.txt
23:36
[quakenet] <laxadedi> MYSQL_CPPCONN_LIBRARY:FILEPATH=/usr/lib/libmysqlcppconn-static.a
23:36
[quakenet] <laxadedi> MYSQL_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libmysqlclient.a
23:37
[quakenet] <heinrich5991> hm
23:37
[quakenet] <heinrich5991> what kind of undefined references do you see?
Avatar
[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
23:42
[quakenet] <laxadedi> it worked
23:42
[quakenet] <heinrich5991> ahh :(
Avatar
[quakenet] <heinrich5991> laxadedi: could you try the patch and check what it outputs?
23:43
[quakenet] <laxadedi> I guess it's because the only difference was the includes, afaik, make/cmake dont check timestamps on those files
23:44
[quakenet] <heinrich5991> for our own includes, it certainly does
23:44
[quakenet] <heinrich5991> (and otherwise you'd get serious miscompiles)
23:45
[quakenet] <laxadedi> What steps exactly you want me to do ? I tried to apply your patch but I had no different output when doing cmake .
23:47
[quakenet] <heinrich5991> mhmhmhmh
23:47
[quakenet] <heinrich5991> there isn't an extra line on top of Checking for …?
23:49
[quakenet] <laxadedi> No
23:49
[quakenet] <heinrich5991> mhhmhmmh
23:50
[quakenet] <heinrich5991> → will go to sleep now :(
23:50
[quakenet] <heinrich5991> good night
23:50
[quakenet] <laxadedi> Will do the same, thanks for the hlpe
23:50
[quakenet] <laxadedi> you can pm me later if you want me to help you toubleshot this
Avatar
yep, thank you
Exported 136 message(s)