Minetest logo

IRC log for #minetest-dev, 2014-02-12

| Channels | #minetest-dev index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
01:13 Yepoleb joined #minetest-dev
01:48 zat joined #minetest-dev
02:16 OldCoder joined #minetest-dev
02:17 us|0gb joined #minetest-dev
03:05 zat joined #minetest-dev
03:06 zat joined #minetest-dev
04:51 khonkhortisan joined #minetest-dev
04:53 khonkhortisan joined #minetest-dev
07:00 OldCoder joined #minetest-dev
07:12 OldCoder joined #minetest-dev
07:22 tomreyn joined #minetest-dev
07:27 OldCoder joined #minetest-dev
07:37 Miner_48er joined #minetest-dev
07:51 darkrose joined #minetest-dev
09:38 troller ShadowNinja,
09:38 troller 13:37:43: ACTION[main]: Server for gameid="minetest" listening on 0.0.0.0:62801.
09:38 troller 13:37:43: ERROR[main]: ServerError: Failed to bind socket (port already in use?)
09:38 troller freebsd
09:38 troller singleplayer fail
09:40 Yepoleb joined #minetest-dev
10:04 Megaf Have you seen thos folks? https://forum.minetest.net/viewtopic.php?id=8552
10:35 tomreyn hi, is using -DCMAKE_BUILD_TYPE=RelWithDebInfo a bad idea?
10:37 grrk-bzzt joined #minetest-dev
11:11 kahrl joined #minetest-dev
11:50 Megaf folks, that minetest 0.4.9 thing at the top left corner, where is it defined?
11:59 PilzAdam joined #minetest-dev
12:01 Gethiox joined #minetest-dev
12:04 Megaf PilzAdam: Hi there
12:04 Megaf I think you can help me with that
12:04 Megaf 09:50:53         Megaf | folks, that minetest 0.4.9 thing at the top left corner, where is it defined?
12:05 PilzAdam why do you want to know that?
12:18 Megaf PilzAdam: I forked minetest
12:18 Megaf Im not changing much code, or any at al
12:18 Megaf just twicking conf files and applying patches
12:19 PilzAdam why fork it then?
12:21 Megaf nevermind
12:25 Megaf VanessaE:
12:31 proller joined #minetest-dev
13:12 MrElmux joined #minetest-dev
13:27 ImQ009 joined #minetest-dev
13:45 OWNSyouAll joined #minetest-dev
13:49 werwerwer_ joined #minetest-dev
13:51 zat joined #minetest-dev
14:03 hmmmm joined #minetest-dev
14:11 salamanderrake joined #minetest-dev
14:13 Megaf sfan5: your tab player list thing, only shoe players nearby, is that what tis expected?
14:15 sfan5 Megaf: yes, it shows all players you can see in the world
14:15 Megaf ok
14:15 sfan5 but some servers have unlimited_player_transfer_distance = false, so the server only sends some
14:17 Megaf ShadowNinja: wow, a lot of particles
14:30 proller joined #minetest-dev
14:42 Megaf How to build minetest for windows without windows?
14:43 Exio4 with mingw
14:45 MichaelRpdx Among people running minetest on Linux hosts, what the the common distributions used?
14:48 rubenwardy joined #minetest-dev
14:50 Yepoleb joined #minetest-dev
14:59 Megaf MichaelRpdx: you mean, the distro people use to play minetest?
14:59 Megaf I mean, distros used
14:59 MichaelRpdx More interested in people hosting games
15:00 MichaelRpdx The issue I have open seems to be Arch Linux specific and I need to compare the build dependencies on Arch with Distro_Other.
15:00 MichaelRpdx I'll be spinning up a VM and installing minetest there.
15:06 Megaf MichaelRpdx: as Client, I have some problems with Debian, and its IRRLICHT related stuff
15:06 Megaf I need to get IRRLICH source from its website and compile it
15:07 Megaf If I use Debian's packages of irrlich, minetest will crash when sending a long message
15:13 Megaf MichaelRpdx: Debian is a pretty popular hosting for minetest I think
15:16 MichaelRpdx Good, I was hoping for !Redhat
15:17 MichaelRpdx I also have a couple of cloud servers and can get installed on one of those quickly.
15:20 MichaelRpdx What about libcurl4? gnutls vs openssl?
15:21 NakedFury joined #minetest-dev
15:28 sfan5 MichaelRpdx: both work
15:37 MichaelRpdx Thank you sfan5
15:38 Megaf sfan5: do you play on windows?
15:38 sfan5 ofc not
15:43 Megaf sfan5: but you do make windows builds
15:43 Megaf do you use windows for that?
15:44 sfan5 no
15:45 Megaf sfan5: cool, I just found this http://dev.minetest.net/Compiling_Minetest#Cross_compile
15:48 hmmmmm joined #minetest-dev
16:00 Calinou joined #minetest-dev
16:02 proller joined #minetest-dev
16:05 Megaf doesnt work xP
16:05 Megaf but its a good place to start
16:09 tomreyn MichaelRpdx: i guess your VM will be setup by now, but if it helps, building on ubuntu 13.10 x86_64 worked fine
16:10 MichaelRpdx tomreyn - it's not. I had to go to work. (read: move from couch to desk and switch computers)  it won't happen until tonight,
16:11 tomreyn http://pastebin.com/raw.php?i=5sWqRCCP
16:11 tomreyn ldd, maybe it helps with your search for dependencies
16:12 MichaelRpdx Oh yeah! Thank you
16:12 tomreyn + server http://pastebin.com/TP8bSi2v
16:23 ShadowNinja ~tell proller I can't debug that without --info or --debug.
16:23 ShadowBot ShadowNinja: O.K.
16:32 rubenwardy joined #minetest-dev
16:34 proller joined #minetest-dev
16:52 pitriss joined #minetest-dev
17:06 e1z0 joined #minetest-dev
17:07 e1z0 joined #minetest-dev
17:10 VanessaE MichaelRpdx: bit late to answer I guess, but Ubuntu at one end, and Debian at the other end, for me.
17:10 VanessaE (so I guess that's two votes for Debian ;) )
17:13 Megaf Hi VanessaE =)
17:13 VanessaE hi.
17:27 Megaf VanessaE: whats that skin mod you use?
17:28 VanessaE megaf -> #minetest
17:28 Megaf sorry
17:37 rubenwardy joined #minetest-dev
17:45 MichaelRpdx Hi VanessaE not too late at all. I've a full work day ahead.  I'm leaning to Debian because Ubunutu's constant niggly upgrades drove me to Arch in the first place.
17:56 sapier joined #minetest-dev
18:03 VanessaE heh
18:03 VanessaE could be worse I suppose
18:07 sapier https://github.com/minetest/minetest/pull/1143  this was tested on vanessaE's server for some days now, it should fix connect of old clients (at cost of some minor glitches for our official clients) ... there's a controversial change in it too. It does make client version number and string available to mods. We explicitly do not want minetest server version number  access in modapi. Does this apply to client versions too? Comments are w
18:10 VanessaE s/some days/two days/
18:11 VanessaE the only major side effect it has is that Buildcraft and its variants often can't see other players' models, presumably because those clients don't cache the player models or some of the received media.
18:12 VanessaE with 0.4.9 and prior, the second and subsequent connect (once all media has been cached) always works
18:12 VanessaE with git, it always works, period.
18:12 VanessaE so only tablet clients are negatively affected.
18:12 VanessaE to the Buildcraft vendor:  if you're reading this?  FIX YOUR BUSTED-ASS CLIENT. :)
18:13 VanessaE (assuming one of the previously-discussed official builds isn't released first)
18:14 Zeitgeist_ joined #minetest-dev
18:14 Zeitgeist_ joined #minetest-dev
18:22 sapier https://github.com/minetest/minetest/issues/1146 seems like someone didn't free the env lock, but according to the mentioned irc conversation the one reporting it had trace level logging enabled. As we know logging to be horribly broken I'm not sure if this is really what's going on.
18:26 sapier never mind I guess I found it
18:26 VanessaE sfan5: what say you about the /data/data vs SwitchMe thing I mentioned ?
18:27 sfan5 VanessaE: what is this SwitchMe thing (what does it do) ?
18:30 proller joined #minetest-dev
18:33 VanessaE sfan5:  multiple user accounts for 4.1
18:34 sfan5 ??
18:34 sfan5 ah
18:35 VanessaE 4.1 has the functionality for it but no user-facing facilities to actually USE it
18:35 VanessaE switchme provides a hacky way to wedge that in
18:35 VanessaE it works more or less.
18:35 VanessaE though at this point I might just wipe the tablet and reset it to a non-rooted, stock configuration and just get a second so Abe and I each have one.
18:36 proller joined #minetest-dev
18:38 sapier well that's (one of the reasons) why apple and google didn't add a user management in first place :-)
18:38 sapier to sell more devices
18:39 VanessaE sapier:  4.2 and up have multi-user support out of the box I guess
18:40 sapier well user management and google ... what's user mgt good for if all your data is mirrored to nsa servers?
18:41 VanessaE heh
18:42 sapier do we need a new menu for android devices? I suggest creating a lightweight menu not supporting running a server on android and maybe only a single singleplayer world
18:43 VanessaE well running a server is less CPU-intensive than running the client, so why not?
18:44 VanessaE others have proven that on even less-powerful devices like RPi
18:44 VanessaE didn't someone around here get the server running on a BeagleBoard?
18:45 proller rpi slower than current mobiles in 10-20x
18:48 proller i want to try run server on 10x slower device than pi, but not it need reinstall debian, maybe in ~month
18:48 sapier well it's not about fact of mobile beeing able to run a server but do we really want to support it?
18:48 sapier it's most likely gonna run very slow and will cause a lot of disapointment
18:48 VanessaE sapier: well probably not
18:48 VanessaE but at least make sure the server binary is there
18:49 VanessaE experienced users who know wtf they're doing can run one of course
18:49 VanessaE so yeah I guess get rid of the Server tab
18:49 VanessaE but for G*d sakes!
18:49 VanessaE MAKE SURE the WHOLE settings tab is there!
18:50 sapier why?
18:50 sapier on andorid devices?
18:50 VanessaE nothing pisses me off more than for some stripped down "light weight" version of a program to come along and prevent me from turning OFF (or on) some feature I DON'T WANT
18:50 VanessaE like for example, buildcraft?  YOU CAN'T DISABLE the G*d damn shaders
18:50 sapier lots of those features don't work at all?
18:50 VanessaE nonononono
18:50 VanessaE you're not listening
18:50 VanessaE I said turn OFF
18:50 VanessaE as in disable shit that *doesn't* work
18:51 sapier well things that don't work should be disabled on android by default ;-)
18:52 VanessaE the latest BC client, for example, has those wavy leaves shaders (probably water and plants too but I haven't been able to see).  I want to turn those and all other shaders OFF on Android because they cost FPS and on a tablet, you can't afford the eye candy
18:52 VanessaE you can't turn preload item visuals off either
18:52 sapier well I'd suggest adding some predefined performance levels
18:52 VanessaE shit like that costs fps and memory
18:54 VanessaE no, none of that crap.  just turn everything (except smooth lighting, 3d clouds, and fancy trees) off by default, let the user turn the extra things on if they want to.
18:54 VanessaE 99.99% of users will never touch the settings tab anyway
18:55 sapier well I'd make a quite simple limited menu for android
19:05 Gethiox joined #minetest-dev
19:07 khonkhortisan I go through settings once when I try a new game
19:16 Miner_48er joined #minetest-dev
19:20 MichaelRpdx sapier - that patch did not resolve the issue.
19:20 sapier ok do you have time for more investigations?
19:21 sapier please disable trace error level prior testing
19:21 MichaelRpdx I do
19:21 MichaelRpdx Lunch time at work
19:22 sapier ok
19:22 MichaelRpdx My test was without trace, just wanted a quick check
19:22 MichaelRpdx However - I suspect this is due to diffs in the Arch environment.
19:23 MichaelRpdx I can pretty reliably get it to start having problems after a bit of single person attached play.
19:23 sapier well that might cause the timing to change to run into that deadlock but there shouldn't be a deadlock at all
19:23 init joined #minetest-dev
19:23 MichaelRpdx And once it starts for a particular world, the kill is always there.
19:24 sapier for what I see someone captured env lock and didn't release it, it shouldn't be to difficult to find out which thread dit it
19:24 MichaelRpdx Want a trace from the current instance?
19:24 MichaelRpdx or a different type of trace?
19:25 sapier trace wont help with this lock but the lock itself has a property telling which tread owns it
19:25 MichaelRpdx OK what to do on my end?
19:26 init joined #minetest-dev
19:26 sapier you need to get that situation again and attach gdb. how much experience do you have with gdb?
19:27 nore joined #minetest-dev
19:28 MichaelRpdx enough to /help and fumble around
19:29 sapier ok I prefere to use gui but I guess I can guide you to the information we need
19:36 MichaelRpdx going to be doing something like looking for __data.__owner for a pthread_mutex?
19:36 sapier exactly
19:36 * MichaelRpdx can search stack overflow too.
19:37 * MichaelRpdx emerged from cave and sees the light
19:37 sapier and of course the backtrace to see number of the thread holding the lock
19:39 MichaelRpdx http://pastebin.com/kw8dv1Xy
19:40 sapier :-) ok I need a backtrace of all threads
19:40 sapier thread apply all bt
19:40 sapier and the matching mutex owner info
19:44 MichaelRpdx http://pastebin.com/GJjcCwZE
19:44 MichaelRpdx the mutex owner for the first one is 8321
19:45 sapier 8321????
19:45 MichaelRpdx as in
19:45 MichaelRpdx (gdb) print mutex.__data.__owner
19:45 MichaelRpdx $1 = 8321
19:45 sapier that'd be the one completely messed up thread
19:46 MichaelRpdx Hey, I don't belive in bringing people easy problems.
19:46 sapier :-)
19:46 sapier well that's a really interesting one
19:47 sapier lock hold by someone obviously beeing completely broken
19:50 sapier and I don't have any idea what thread this might have been
19:50 sapier could you do again create a treadlist prior error occurs and then one after it happened?
19:50 sapier +h
19:51 MichaelRpdx Well, based on other problems, the treading goes wrong early on.
19:52 MichaelRpdx meaning my world view shrinks and walking to the edge of shown world the view out does not populate.
19:52 sapier well that may indicate emerge thread is involved but that one isn't broken
19:56 MichaelRpdx I'm strongly suspecting unless minetest wants to make supporting Arch Linux as a host platform a goal, or use Arch as a ferret out different bug sets,
19:57 MichaelRpdx That it (Arch) should be listed as non supported and I'll just bring up a VM with Debian to run my local server.
19:58 MichaelRpdx it's back to work time.
19:58 sapier well issues with arch may occur on other platforms too, so while arch isn't our primary target arch we still try to find bugs which only occur there (unless they're caused by some broken lib)
20:02 Calinou joined #minetest-dev
20:08 Calinou_ joined #minetest-dev
20:08 MichaelRpdx (boring meeting)
20:09 sapier :-)
20:09 MichaelRpdx Assuming the thread problem occurs earlier in execution - how should I check thread health as the program runs?
20:10 MichaelRpdx boring == I'm just there to jump and shout if someone says something silly
20:10 sapier hmm I'd try stopping with gdb and just do a backtrace of all threads every now and then
20:12 PilzAdam joined #minetest-dev
20:16 MichaelRpdx And for the gdb just out of the cave guys, is there a quick manner to tell if all is healthy or hosed?
20:16 sapier well if you still see sane backtraces it may be correct, if you see only adresses something went wrong ;-)
20:17 sapier yeah I know that's not that helpfull :-)
20:17 MichaelRpdx more helpful than "gee what's this screen of stuff?"
20:18 MichaelRpdx Can you show me a sane backtrace?
20:19 sapier lines like this 0x00007f3899329fd5 in ?? () or even this #4  0x000000000000000b in ?? () are not sane, It's quite unlikely any function is at address b
20:19 ShadowBot https://github.com/minetest/minetest/issues/4 -- cppcheck warnings
20:20 sapier argh sometimes shadowbot is quite annoying
20:21 MichaelRpdx and looking at my own output, I see one of the threads is very different from the rest.
20:21 sapier exactly that's the messed up one ... and the one holding the lock too
20:22 MichaelRpdx does LWP <number>  mean anything to you?
20:22 VanessaE I thought shadowbot wasn't supposed to answer to numbers below a like 500 or something?
20:22 sapier the number is the threadid, it's the same as in mutex owner
20:22 VanessaE -a
20:24 EvergreenTree joined #minetest-dev
20:24 EvergreenTree joined #minetest-dev
20:24 MichaelRpdx sapier - which gui db do you use?
20:25 sapier usually eclipse but it's not quite lightweight if you just wanna debugg
20:27 ShadowNinja I'll have ShadowBot ignore numbers below 50 or so.
20:28 sapier thanks ShadowNinja
20:30 ShadowNinja #1 #123
20:31 ShadowNinja Hmmm...
20:31 ShadowNinja #1 #123
20:31 ShadowBot https://github.com/minetest/minetest/issues/123 -- crashes after about 10 seconds on game start
20:31 ShadowNinja There.
20:35 sapier ShadowNinja:  what's your opinion to adding scriptapi access to CLIENT version?
20:38 ShadowNinja sapier: That sounds good.  It would be especially good if you can access the name, to, eg, ban BuildCraft or Freeminer clients.
20:39 ShadowNinja Of course I want access to the srerv ser version too, for statistical and informational purposes.
20:39 sapier you can only access client version if it's sent by client, only versions post my patch may send it. But they're not required to send it as this information is used for information only
20:39 ShadowNinja server*
20:40 sapier we have discussed quite often about server version and decided not to tell it on scriptapi
20:41 ShadowNinja Yes, because apparently moders can't read two sentences...
20:42 sapier well I know modders wont read ... they will abuse the information. maybe the will abuse client info too
20:43 sapier celeron55 as you've been the one most critical about server version number what's your opinion on client version number?
20:46 ShadowNinja sapier: Is the protocol version available?  Because that's the main *usefull* number, the version hash is mostly informational.
20:47 sapier yes I made protocol as well as serialization available too
20:47 ShadowNinja Alsight, seems fine then.  I'll check the API...
20:48 ShadowNinja Showing 1 unique commit by 1 author.
20:48 ImQ009 joined #minetest-dev
20:48 ShadowNinja You merged them.  :-(
20:48 sapier accidentaly yes ... but I'll split them if necessary
20:49 ShadowNinja ip_vers can be changed to ip_version.
20:49 proller joined #minetest-dev
20:49 ShadowNinja And ser_vers in confusing.  Use you can use serialization_version.
20:50 ShadowNinja Same with other vers fields.
20:50 sapier ok it's just names
20:51 ShadowNinja A client name field would be good too.  As in "Minetest" or "Freeminer".
20:51 sapier there's no name for a client
20:52 sapier and that information isn't good for anything except information as there's no way to stop clients from faking it
20:52 ShadowNinja sapier: Oh, and if you use a enum with Active and similar state values it should be changed to CLIENT_STATE_ACTIVE or similar, as Active is far too general.
20:52 ShadowNinja sapier: Of course, but it's still usefull.
20:52 sapier no it isn't usefull at all
20:52 sapier noone can rely on this information
20:53 ShadowNinja sapier: Will this be available at on_prejoinplayer time?
20:53 sapier no
20:53 ShadowNinja sapier: Stats.
20:53 ShadowNinja sapier: Can you fix that?
20:53 sapier no way
20:54 sapier prejoin is client init only I'd have to change the initial connect packet, but I can't deny clients without it for compatibility reasons so no benefit at all
20:54 ShadowNinja Alright.
20:55 sapier case you tried to use this information for blocking specific clients those will just send no information at all
20:55 ShadowNinja sapier: I think you should pass connect_time instead of uptime, as that way you can save the value and it's still valid later.
20:55 sapier btw that's exactly what celeron was afraid about ... guess I'll remove the scriptapi access to this information in total
20:58 ShadowNinja https://github.com/minetest/minetest/pull/1143/files#diff-2543b17841165757ac531ffedd0b5fddR176 Rather than having the whole thing i the conditional, move push_string and settable out of it as they're the same for both versions.
20:59 ShadowNinja And theer may be a shortcut function to those three calls.  (if not maybe we should add one)
20:59 ShadowNinja there*
21:00 sapier are you sure AF_INET6 is always and for any os defined as 6? ;-)
21:00 ShadowNinja What? No.  I mean this...
21:00 sapier well I tried it and it didn't work so I switched back to the variant that worked
21:01 PilzAdam joined #minetest-dev
21:01 sapier didn't want to debug lua stack ;-)
21:01 sapier especialy as this fct is just a spinoff
21:02 ShadowNinja sapier: http://pastebin.ubuntu.com/6922187/
21:03 sapier oh this way .. ok I guess this works
21:07 ShadowNinja You could also add Address::getIPVersion().
21:08 sapier I could but why?
21:08 sapier family already tells everything
21:09 sapier ok I removed all version information for non debug builds. they're not supposed to be used in mods at all
21:09 proller ShadowNinja, will you fix bind ipv6?
21:09 sapier I'll fix it next proller
21:10 proller NOOOOOO ;)
21:10 sapier as well as ipv6 unit tests ;-P
21:10 proller less than 1000 lines? ;)
21:10 sapier maybe ... if you use INT16 for counting ;-P
21:11 ShadowNinja sapier: Over-indentation: https://github.com/minetest/minetest/pull/1143/files#diff-2543b17841165757ac531ffedd0b5fddR165
21:13 sapier nope your editor is broken
21:13 sapier fix it's tab width
21:15 proller .. in github...
21:17 sapier I don't wanna discuss this again there'll never be a conclusion as noone dares to do the work of writing a complete coding style reference
21:18 VanessaE there used to be one
21:19 VanessaE but the general rule is, code like you're writing it for the Linux kernel.
21:19 proller a complete coding style reference:    astyle --style=attach --indent=tab --keep-one-line-blocks --keep-one-line-statements --indent-classes --pad-oper *.cpp *.h
21:19 sapier well that's crap as linux kernel doesn't use c++
21:19 sapier and there's written tab width is 4 in minetest too
21:20 sapier and next astyle version will use other defaults so we switch coding style back and forward once different developers use different versions
21:22 sapier as I said that discussion is woth nothin lets stick back to real relevant topic
21:22 proller wat
21:23 sapier I'll disable all version access for release builds to stop modders from abusing it
21:23 sapier what do you think shall I mention those debug parameters in lua_api.txt or delete them there too?
21:23 MichaelRpdx Where in the wiki are the server hw requirements listed?
21:23 * MichaelRpdx feels blind
21:24 sapier there are none
21:24 MichaelRpdx meaning they're not documented or they don't exist?
21:24 sapier noone ever tried slowest possible machine
21:25 sapier I heared rumors some ppl tried it on beagle board working for a few players but not sure about it
21:25 MichaelRpdx I've found a vps provider with current Arch and was going to get the vps so we could have a shared spot to work on my problem
21:26 sapier could help yes
21:26 MichaelRpdx And dump one of the current vps providers I currently have for DNS and mail secondaries.
21:26 sapier hopefully it does occur there too
21:26 MichaelRpdx I'll be able to find out quickly enough. ;)
21:27 sapier shadow I merged your comments https://github.com/minetest/minetest/pull/1143
21:30 Calinou I would say, 1GB of RAM as minimum, 2GB as recommended
21:31 Calinou for a medium-sized MT server
21:48 ShadowNinja sapier: The tab width is officially 8 spaces, but that's only relevant for converting old code.  Function arguments should always be indented two tabs.
21:48 sapier no it isn't
21:48 sapier it's still 4 unless you recently modified wiki without asking someone ;-P
21:51 ShadowNinja sapier: Chapter 1: Indentation --  Tabs are 8 characters, and thus indentations are also 8 characters. There are heretic movements that try to make indentations 4 (or even 2!) characters deep, and that is akin to trying to define the value of PI to be 3.
21:52 sapier well that change originated of one of the heretic guys claiming tabs to be 8 spaces
21:53 sapier btw what guideline do you refer to I don't even find this sentence in the guideline I see ;-)
21:53 ShadowNinja Rationale: The whole idea behind indentation is to clearly define where a block of control starts and ends.  Especially when you've been looking at your screen for 20 straight hours, you'll find it a lot easier to see how the indentation works if you have large indentations. -- Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character termina
21:53 ShadowNinja screen.  The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program.
21:53 sapier I wont change it if you don't like it change it I'll change it back next time ;-P
21:54 ShadowNinja http://dev.minetest.net/Code_style_guidelines -- For everybody else's sanity, please just use something that resembles the Linux Kernel code style, with the exception that cases in switch statements are indented a level.
21:54 ShadowNinja https://www.kernel.org/doc/Documentation/CodingStyle
21:54 sapier As I said I don't accept kernel coding style for a c++ application find a better style
21:55 sapier kernel coding style is not meant to be used with c++ notation function names
21:56 ShadowNinja Tab indentation is tirectly translatable to C.  That page contains elaborations on the style to fill in the blanks.
21:56 ShadowNinja directly*
21:57 Calinou joined #minetest-dev
21:57 sapier did you ever see some function called VeryLongClassnameReturnValuePointer SomeSameWayLongClassName::EvenLongerFunctionName(param1,param2) in C?
21:58 sapier but enough about this
22:02 Calinou joined #minetest-dev
22:02 sapier what editor does use 8 space tabs anyway?
22:03 sapier guess noone is writing code at a mechanic typing machine (which is origin of this size ;-)
22:08 ShadowNinja vim, gedit, most editors I've used.
22:08 ShadowNinja And the rest have settings.
22:08 sapier yes and most of our code wont be editable with tab size 8 so is there any sane reason to change?
22:09 sapier despite of the obvious one I don't have room to waste on my screen
22:11 ShadowNinja I've edited Minetest's code.  But it doesn't matter if you use a tab width of 0.001, you just can't use tabs for alignment, you have to use two tabs.
22:12 sapier well have a look at new touchcontrol code it's unusable with 8
22:13 sapier I don't switch to 8 because of some missfit coding style
22:14 sapier find a sane astyleable c++ coding style, write it down to wiki and I'll make astyle run on any file I edit ... guess lot of ppl will complain about breaking any commit but I prefere this to discussing this topic all 3 days
22:17 proller use astyle only on new files or new code blocks
22:17 sapier nope I'll use it on any file as this is the only way to get rid of this sort of discussion in reasonable time ... and yes I know it's a painfull way
22:18 ShadowNinja Or just write it correctly and don't use it.  Function arguments shouldn't be aligned.
22:18 sapier imho it is correct and you'll find as many different opinions of what is correct as coders are out there
22:21 ShadowNinja If it doesn't look right on any tab width it's done wrong.  It should be indented by two tabs, as the rest of the code does.
22:24 sapier if you'd be that eager on hunting down bugs as on fighting for some insane coding style we'd have way more benefit about it
22:27 sapier ShadowNinja: define a astyle config as well as a version make it commonly accepted and I will use it. Until that happens I will ignore all of your "tab with" doesn't match comments. I've better things to do
22:28 sapier style fixes are to be done by tools, it's not something to waste developer time to
22:28 AllegedlyDead joined #minetest-dev
22:30 sapier proller your astyle command line isn't even accepted by debians astyle version
22:31 proller debian use 3-5 years old software?
22:32 sapier debian uses stable software ;-P
22:33 sapier not bleeding edge like ubuntu where only mainline applications work or arch where sometimes everything is broken
22:36 sapier hmm debian uses 2.01 astyle are you sure about style beeing "attach"?
22:37 sapier obviously not
22:42 hmmmmm sapier:  for biglongclassnamehere::biglongfunctionnamehere() what I do is avoid making the function name + class name be greater than 78 characters :)
22:42 hmmmmm rather 77
22:42 hmmmmm parameters that are too long can go on separate lines, indented with a *single*! tab
22:43 hmmmmm none of that "as many tabs as you need + spaces to get it lining up with the rest of the parameters" nonsense
22:43 sapier well that's till gonna cause indention issues ... but I really don't care about style as long as there's a tool which fixes it and the style is defined
22:43 proller Artistic Style Version 2.04
22:43 hmmmmm and the opening brace goes on the line after the end of the parameter list
22:43 sapier e.g. astyle --style=linux --indent=tab --keep-one-line-blocks --keep-one-line-statements --indent-classes --pad-oper ASTYLE 2.01
22:43 hmmmmm bog standard K&R style
22:43 proller sapier, debian still use stable minetest 0.2 ?
22:43 hmmmmm well actually it's closer to BSD KNF
22:43 sapier K&R != linux
22:44 hmmmmm there are subtle differences
22:44 sapier well those "subtle differences" will cause us change back and forward anytime someone uses astyle on code
22:44 sapier And I keep refusing to fix single spaces manualy in future
22:44 hmmmmm I'm not 100% sure what linux kernel style qualifies as but it looks very close to BSD KNF.. I just saw that document and I said, "yeah, that makes sense.  i really like this style.  it's clean."
22:44 sapier that's waste of time and quite anoying
22:44 hmmmmm oh yeah nobody use astyle please
22:45 hmmmmm celeron will personally rip your head off if you do
22:45 sapier then everyone stop bugging me about some tabs and spaces
22:45 hmmmmm yeah stop bugging sapier about tabs and spacing
22:45 sapier just fix them without telling me
22:45 sapier I usually don't care about work I don't have to do ;-)
22:45 hmmmmm lol
22:46 hmmmmm so your code output at works sucks intentionally? :p
22:46 hmmmmm s/works/work/
22:47 sapier well I've got a coworker beeing quite similar to Shadow ... but that one just uses astyle every now and then
22:48 hmmmmm apparently some places have an automated tool that rates your commit and takes off points for not styling it the precise way they want it
22:48 sapier and it's even more annoying to have two of those pedantic persons demanding different styles ;-P
22:49 sapier well as those places already have the tools I guess you can just run them to your commit prior issuing a pull request ;-)
22:49 sapier As I said I'd have no problem with running astyle on any file I change more then a single line ;-)
22:49 hmmmmm I don't really think the formatting is that big of an issue to begin with
22:50 hmmmmm it's nice to at least attempt to be consistent and follow some sort of standardized style but it's not like the worst thing ever
22:50 sapier well we discuss it at least once a week and that's a quite huge waste of time
22:50 hmmmmm by we you mean shadowninja
22:50 sapier not only
23:00 sapier I just had a look at celerons sailfish addons ... guess it's going to be quite some work to translate prototype to clean implementation
23:02 sapier well actually I compared stu's version of his changes
23:03 hmmmmm one of these days I have to write a real code style guideline
23:03 hmmmmm ugh
23:04 hmmmmm it's just something that's so useless I can't be arsed unless i were totally bored
23:04 hmmmmm i have better things to do with my time like actually write code
23:05 sapier :-) noone wants to write this guideline so everyone believes his interpretation is the correct one ;-)
23:05 hmmmmm like i said... just as long as it's not ridiculous...
23:05 sapier most easy option would be using a tool like astyle but this will break a lot of code
23:05 sapier ok "break" is wrong word
23:08 ShadowNinja I'll push a doors protection check and whitespace strip in a few minutes...
23:12 sapier what does it check?
23:21 ShadowNinja sapier: Protection.
23:22 sapier I don't say what I first wanted to say now
23:22 ShadowNinja sapier: Could you restate that?
23:23 sapier what exactly ? does it stop other players from digging doors? opening doors? painting doors?, stop doors from killing kittens?
23:23 ShadowNinja Placing doors in protected areas.
23:23 sapier ok so dig and place?
23:24 ShadowNinja No, diging is already handled properly.
23:24 sapier I see.. that's all I wanted to know ;-)
23:29 ShadowNinja sapier: Does this seem good? http://ix.io/atr
23:30 sapier I'd not use std::cout in there
23:30 sapier those have been mapped to streams on purpose
23:31 sapier if you piped cout somewhere or started server on windows that information is completely lost
23:31 sapier the max lenght is fine
23:32 ShadowNinja sapier: cerr then?  actionstream and the like interpret \r the same as \n.
23:32 sapier I'd suggest not using cerr cout and things like that directly ... will save us quite some time on porting
23:33 sapier and I guess we're gonna do some porting work soon
23:33 ShadowNinja sapier: cout and cerr aren't available on windows?
23:33 sapier they are but usually you don't see them
23:34 ShadowNinja Minetest spawns a window to show them.
23:34 sapier well that's a bug
23:34 sapier a windows application isn't meant to spawn in a window
23:34 ShadowNinja (Or at least it did last I checked.  And it's intentional)
23:34 sapier +console
23:34 ShadowNinja -in
23:34 sapier no it's not it's just lazyness
23:34 sapier noone did care to write the code to start it without console
23:35 ShadowNinja It starts a console, which is good because errors are dumped there.
23:35 sapier of course but that's not the way a windows application is meant to run ;-)
23:35 ShadowNinja No, there's actually code to *make* the console appear.
23:35 MichaelRpdx sapier - assuming I can get a core dump would that be useful?
23:36 sapier MichaelRpdx: could help yes but it'd be interesting to see thread information before everything is messed up
23:36 sapier not sure who added that code but I'd not be surprised if it was a copy of some tutorial ;-)
23:37 sapier windows programs are not meant to have a console window I even wrote wrappers to get rid of those damn console windows for some apps because in taskbar they are a pain in the as
23:38 sapier and android for example doesn't even have a console window ;-)
23:38 ShadowNinja sapier: Removing the console means that you have to teach every Windows user how to start Minetest in a command prompt when they have an error.
23:39 sapier no just means adding a startmenuentry "show debug log"
23:40 sapier noone will do the work removing the windows console so this wont happen anytime soon
23:40 sapier especially as focus switched to android recently
23:41 kahrl what work? just add -mwindows to CMAKE_EXE_LINKER_FLAGS
23:41 kahrl or whatever the MSVC equivalent is
23:41 sapier I don't know but I don't even care enough to have a look at it ;-)
23:43 sapier "have a look at it" meaning not looking at your change but "trying if this could work on windows"
23:45 kahrl yeah to be fair I don't know if the MSVC equivalent wouldn't introduce other problems
23:45 ShadowNinja Anyways, *stream point to the console too, so I don't see why it has too use those.
23:45 kahrl such as needing WinMain instead of main maybe
23:46 sapier Shadow if you want to see it on console too just add a second output, guess that's the most easy way ... btw what's wrong about action?
23:47 ShadowNinja hmmmmm: IMO flag strings should use a different inversion prefix, like !, as many english words start with "no".
23:48 MichaelRpdx nothing comes to mind to support that assertion. ;)
23:48 ShadowNinja sapier: So, what's wrong with the first commit?  And nothing's wrong with actionstream as far as I know.  (although the code looks a little ugly)
23:49 sapier "first commit" beeing exchange of actionstream by stc::cout?
23:50 sapier as I said noone uses std::cout anywhere within minetest. this'd be the first usage ... I don't think this is correct
23:50 kahrl pathfinder does ;)
23:50 ShadowNinja sapier: The rollback converter uses it, for the same reason.  And that's not it's main purpose, but a side-effect.
23:51 sapier as far as I know in debug mode only kahrl
23:51 hmmmmm shadowninja, 'no' is pretty standard.
23:51 hmmmmm i think in GNU utilities anyway
23:52 MichaelRpdx sapier - to do my stack tracing, is there a preferred breakpoint location you'd like me to monitor?
23:52 sapier well I don't think it's correct to use it directly as we have a system abstraction for it standard in/out are not shown to user on all os so we might loose that information
23:52 ShadowNinja hmmmmm: Really?  I've only seen ! used.  (php.ini comes to mind)
23:52 ShadowNinja hmmmmm: Oh, and ~ (Charybdis/Atheme)
23:53 sapier MichaelRpdx: no just interrupt it once after entering world, I assume stacks are correct that early
23:53 deltib joined #minetest-dev

| Channels | #minetest-dev index | Today | | Google Search | Plaintext