IRC log for #bzflag on 20160622

00:14.44the_map~blast007++
00:14.46the_map:D
00:40.00macsformekarma for introducing a bug? :P
00:40.52blast007lol
00:41.01macsformeat least I know an easy way to earn some, now
00:41.11blast007for helping him get a functional OS going :)
00:41.22macsformeoh :P
00:41.34macsforme~blast007++
00:43.31the_mapoh, didn't realize what that looked like :P
00:43.56the_mapblast007: it's a bit early to say if this is going to work :P
00:44.24blast007nah, it's Debian, it'll work ;)
00:44.36the_mapuh huh, right
00:45.04the_mapnothing against debian, of course
00:45.06blast007and if not, there's far better people than me that can help too
01:56.49*** join/#bzflag infobot (ibot@rikers.org)
01:56.50*** topic/#bzflag is http://BZFlag.org || http://ohloh.net/p/bzflag || https://wiki.bzflag.org/Getting_Help || Channel Logs: http://infobot.rikers.org/%23bzflag/ || 2.4.4 released! https://forums.bzflag.org/viewtopic.php?f=62&t=19186
01:56.50*** mode/#bzflag [+v infobot] by ChanServ
02:03.43allejoI thought it was discouraged to create your own bz_ApiString and to use std::string instead
02:06.33blast007std::string can't be passed across the DLL boundary, at least
02:07.42blast007JeffM is more familar with the quirks of that
02:08.10allejowouldn't be passed through the boundary though, you'd be creating the std::string inside the plugin to check for it
02:08.23allejoit's not like the API is returning the std::string
02:10.44blast007except when it does...     BZF_API bz_APIStringList *bz_getHelpTopic( std::string name );
02:11.40allejowhy isn't that a const char*...?
02:12.00blast007because consistency!
02:12.09blast007it's what we're all about
02:12.15allejolol
02:12.30allejoshould have logs about this somewhere
02:12.34blast007someday, maybe we'll reach at least PHP levels of consistency
02:12.36allejobut... from a long time ago
02:14.26blast007in a galaxy far, far away?
02:14.40blast007$  head -n 1 irclogs/freenode/#bzflag.log
02:14.41blast007--- Log opened Mon Dec 11 06:37:38 2006
02:26.15allejohttps://wiki.bzflag.org/Bz_APIString#Construction
02:31.12blast007hmm, fun
02:32.06*** join/#bzflag Void7 (~Void7@205.157.147.198)
02:34.56allejooriginal content of that page was by JeffM so that's why I kinda just went with it
02:41.12blast007so is it also bad to create a bz_APIStringList in a plugin?
02:42.35blast007sounds like those are okay
02:43.43allejomy understanding is that those are ok. plus, nothing in the wiki explicitly saying otherwise
02:44.34allejoand you don't actually use a constructor for those since the functions just take the pointer to it
03:05.13DTRemenakwhy would you want to create one?
03:05.35DTRemenakjust use a vector, if you're not passing it across the DLL boundary
03:09.01DTRemenakand no, do not create one in a plugin.  use bz_newStringList if you need one.  c'tor has to run on the bzfs side.
03:09.30blast007that's what I mean
03:09.56blast007I don't mean define the class for a bz_APIStringList in a plugin
03:11.36DTRemenaka plugin should never own an API container.  bzfs needs to own them.  a plugin can absolutely ask bzfs to create one and get a pointer back, that's fine.
03:13.02DTRemenak(and, due to an implementation defect, a plugin should NEVER call the bzAPIStringList functions that accept a std::string)
03:13.54allejoso what exactly is the issue with crossing the DLL boundary?
03:14.23DTRemenakthe implementation of the class with the same name may be different (and the object itself may even be a different size)
03:14.44DTRemenakso you'll get unpredictable behavior when you access the wrong vtbl
03:16.27DTRemenakyou can get the same problem on linux with shared object libraries, it's just a lot rarer to build against different STL implementations
03:16.36DTRemenakon windows that's really common
03:16.45allejooh so that's the reason for the custom bz_* objects? chances are you won
03:16.53allejowon't already have a bz_ApiString?
03:17.17DTRemenakthe header is KNOWN to be common to both components, and the implementation is wrapped
03:17.34DTRemenakso as long as one side only accesses the object through the header there will be no problems
03:18.32DTRemenakwe could break it the same way (by changing the definition of the class in the header), but we can avoid that
03:18.52DTRemenakwhereas we have no control over the STL headers
03:21.47allejothis is starting to make a lot more sense now
03:24.22blast007yeah, but does it run crysi-wait, wrong meme
03:25.21blast007DTRemenak: okay, so you meant don't 'new' your own bz_APIStringList in your plugin
03:25.27DTRemenakyes
03:25.42DTRemenakor construct them on the stack
03:26.43DTRemenakbut you CAN ask bzfs to do it for you...then everything is hunky-dory
03:27.41DTRemenaksame thing should be true for the other API objects like bz_APIString itself
03:29.11DTRemenak(although the same note regarding the member functions that accept std::string parameters probably holds true there too...)
05:13.07*** join/#bzflag DTRemenak (~DTRemenak@cpe-172-112-10-183.socal.res.rr.com)
05:13.07*** join/#bzflag DTRemenak (~DTRemenak@about/essy/CrazyCoder/DTRemenak)
05:13.07*** mode/#bzflag [+v DTRemenak] by ChanServ
05:33.56*** join/#bzflag Delusional (~Delusiona@unaffiliated/delusional)
05:45.33rodie<PROTECTED>
05:45.58rodieand that was enough.
05:47.12RoscoePColtrainbasically templates cannot cross the DLL boundary
05:47.30rodiewhy would a dll boundry matter?
05:47.54rodie^should
05:47.55RoscoePColtrainbecause it is likely that the DLL might have been compiled with a different compiler than the main
05:48.05allejoI got lost after "construct them on the stack" :(
05:48.16RoscoePColtrainif you require that the whole project is build from source, it's not a problem
05:48.33RoscoePColtrainallejo: an object that is constructed must be destructed
05:48.55RoscoePColtraindestructor is a function like anything else
05:49.00allejooh
05:49.08RoscoePColtrainsubject to vtable corruption/misinterpretation/whatever
05:49.16allejook now everything makes sense :D
05:50.04rodiei guess these fancy oo languages don't things simply like c;)
05:50.11RoscoePColtraintemplates aren't "objects" like everything else
05:50.12rodie^compilers too
05:50.20RoscoePColtrainthey are code generators :)
05:50.26rodieoh.
05:50.31RoscoePColtrainsubject to different implementations
05:50.53RoscoePColtrainone compiler may instantiate a template one way (or even use a different definition!)
05:50.57RoscoePColtrainthan another
05:51.21RoscoePColtrainit's not really the language that complicates things... DLL's are complicated
05:51.27RoscoePColtrainand not for the average schmuck
05:53.01rodiei'd bet they exhibit similar problems to 60s and 70s "main frame" os compilers.
05:53.16*** join/#bzflag a_meteorite (~a_meteori@unaffiliated/ameteorite/x-000000001)
05:53.31RoscoePColtrainwell, I wasn't coding in the (early) 70's, but I can't speak to that
05:53.38RoscoePColtrainwe did assembler :)
05:53.50rodiethat's where my heart still is;)
05:54.01rodie(assembly)
05:54.02RoscoePColtrainnot me. I'm all about the abstractions
05:54.29rodieonly when abstractions making coding more durable, sure;)
05:54.53RoscoePColtrainabstractions simplify complex concepts
05:54.57RoscoePColtrainallowing more complex concepts
05:55.05rodieyes, they can. until they hide deep flaws.
05:55.33RoscoePColtrainimplementation defects are different than abstractions
05:55.36rodiebut i can't win an argument against an idea, and am not trying,
05:55.45RoscoePColtrainalthough... most simplifying assumptions are wrong :)
05:55.59rodiejust saying "reality" has shown me too many coding projects where problems were created which didn't need to exist ;)
05:56.01rodiethat's all.
05:56.15RoscoePColtrainoh, the average programmer is incompetent
05:56.22RoscoePColtrainthat's where the flaws come from
05:56.43rodieheh. which is everything ;)
05:57.03rodieunless you can prove some class library came from the gods.
05:57.08rodie;)
05:57.24RoscoePColtrainin general, I will trust a class library
05:57.43RoscoePColtrainit's the new grad who wants to reinvent the wheel that is the main danger
05:58.14the_mapand people like me that can look at a computer and break it ;P
05:58.16rodiei find it is overuse of "off the shelf" stuff.
05:58.21RoscoePColtrainexample of absraction:
05:58.29RoscoePColtraindo you know what RAII means?
05:59.28RoscoePColtrain(did I scare you off, or are you just googling?)
05:59.34rodiewho you asking?
05:59.48RoscoePColtrainyou, mostly
06:00.13rodiei know the acronym.
06:00.28RoscoePColtrainResource Allocation Is Initialization
06:00.52RoscoePColtrainit's the idea that a resource should always be allocated in a constructor and released in a destructor
06:01.00rodieok.
06:01.15RoscoePColtrainso rather than remembering a bunch of new's and free's, you just create std::string
06:01.23RoscoePColtrainit manages memory so you don't have to
06:01.35rodiesorry, you don't need to explain it.
06:01.43RoscoePColtrainthe same concept can/should be applied to other resources, like files, or mutexes
06:02.12RoscoePColtrainpoint being, that abstraction helps deal with one of the largest perceived flaws in C++
06:02.32RoscoePColtrainpersonally, I prefer explicit resource management over garbage collection
06:02.47rodiehave cats to feed ;)
06:02.56RoscoePColtrainpeople who only deal with garbage collected languages never really understand that resources come at a cost.
06:03.11RoscoePColtrainit's ok, I can ramble without an audience :)
06:04.42rodieno, i mean they are crawling all over me
06:04.51rodiethinking i'm a giant feeding bottle;)
06:05.05RoscoePColtrainare you?
06:05.11rodieto them, it appearzs.
06:05.18rodieback later. ramble as you please.
06:05.29rodie;)
06:06.03rodiebut you can assume a few things i do know ;)
06:06.14RoscoePColtrainI assume nothing
06:06.22rodietry it ;)
06:06.28rodie& for now
06:06.32RoscoePColtrainI have. it's why I don't
06:48.55*** join/#bzflag the_map_ (~the_map@unaffiliated/the-map/x-1795707)
07:57.10*** join/#bzflag a_meteorite (~a_meteori@unaffiliated/ameteorite/x-000000001)
09:36.58*** join/#bzflag dropsy (b23e059d@gateway/web/freenode/ip.178.62.5.157)
11:08.18*** join/#bzflag zuii (~cauchy@BC06BF93.catv.pool.telekom.hu)
11:25.14rodiethen there's always the assuming a negative, as i was slightly attempting to suggest ;)
11:30.35*** join/#bzflag zuii (~cauchy@BC06BF93.catv.pool.telekom.hu)
11:32.07*** join/#bzflag zuii (~cauchy@BC06BF93.catv.pool.telekom.hu)
11:44.12*** join/#bzflag zuii (~cauchy@BC06BF93.catv.pool.telekom.hu)
14:49.26*** join/#bzflag Void7 (~Void7@205.157.147.198)
15:24.38*** join/#bzflag a_meteorite (~a_meteori@unaffiliated/ameteorite/x-000000001)
15:53.19*** join/#bzflag a_meteorite (~a_meteori@unaffiliated/ameteorite/x-000000001)
17:06.11*** join/#bzflag Shuist (~Shuist@ppp203-122-213-220.static.internode.on.net)
17:50.46*** join/#bzflag KaadmY (uid135503@gateway/web/irccloud.com/x-vhmsjrochahjpzqr)
17:54.36*** join/#bzflag a_meteorite (~a_meteori@unaffiliated/ameteorite/x-000000001)
18:15.51*** join/#bzflag Void7 (~Void7@205.157.147.198)
21:58.00*** join/#bzflag zuii (~cauchy@BC06BF93.catv.pool.telekom.hu)
22:58.05*** join/#bzflag alpha1-2 (~alpha1@181.111.69.151)
23:04.59alpha1-2can it be that compiling a new plug-in in linux is only possible compiling all BZ at once?
23:08.21blast007can you elaborate on what you're trying to do?  just trying to build a custom plugin?
23:08.41alpha1-2yes, a custom plug-in
23:09.52blast007are you trying to build it without adding it to the BZFlag build system?
23:10.55blast0072.4.4 and up make it easier to build extra plugins with the rest of the build process
23:11.03alpha1-2I get this in the plug-in script "Use "configure --enable-custom-plugins=NAME to have it built automatically along with the standard plugins."; just wondering if it is the only way
23:11.41blast007that's the way we support
23:12.03blast007if you want to do it another way you'll have to figure out the specifics
23:12.20alpha1-2ah okay; it seems for Windows there is an individual way, making DLLs, right?
23:12.45alpha1-2(read it in an kind of old thread)
23:12.52blast007DLLs are just what WIndows uses instead of .so files
23:13.43alpha1-2"On linux plugins must be built with the rest of the system, you can't build a single one and just link to export libs like you can do on windows. Our build system just isn't set up that way." https://forums.bzflag.org/viewtopic.php?f=13&t=17872&p=161014&hilit=compiling+plugins#p161009
23:13.55blast007the Windows installer does include a .lib or two and some header files, so you can build a new plugin without needing the entire source
23:13.59blast007we don't have that on Linux
23:14.10blast007or at least, not included with any binaries
23:14.48blast007and in the time this conversation took, you could have built bzfs with your custom plugins
23:15.05alpha1-2okay; yes, got some problems trying to compile individually
23:15.40alpha1-2there is only necessary the .cpp file right, noany other?
23:16.19alpha1-2ah only bzfs?
23:17.02alpha1-2is there a way to compile only bzfs?
23:17.20blast007--disable-client --disable-bzadmin
23:17.24blast007(to ./configure)
23:18.01alpha1-2nice
23:19.07alpha1-2Iused the script but also the PHP program, then I should use both methods right?
23:19.18alpha1-2(not only the .cpp)
23:20.29blast007I don't know what you are referring to
23:21.16alpha1-2allejo updated a PHP code which helps you to create a plug-in... finding it
23:22.24alpha1-2Plug-in Starter (Now for 2.4.x!) https://forums.bzflag.org/viewtopic.php?f=78&t=12301
23:22.29blast007you might need to use the ./newplug.sh script to create a new plugin and then replace the .cpp file it creates with your actual .cpp
23:22.42alpha1-2ah okay, got it, thanks!
23:45.22*** join/#bzflag [Gort] (~gort@unaffiliated/gort/x-9231432)
23:53.50kierrahey Gort
23:54.01[Gort]hey
23:54.26[Gort]I wish that other Gort in Freenode would give up the nick. ;)
23:54.37kierraoh
23:56.43[Gort]odd... that Gort hasn't been here for 39 weeks, yet still has kept the nick. I thought nicks disappeared after a few weeks non-usage
23:59.09werelizard[Gort]: They don't get automatically dropped; you can ask staff nicely if you can have the nick, though
23:59.36blast007or you can ask the owner of the nick

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.