Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 08 Aug 2000
Online Last Active Today, 01:40 AM

Posts I've Made

In Topic: USC Canceled Video Game Panel For Too Many Men

25 May 2016 - 05:52 AM

Well, all those political statements I have seen from him were right. Not just right, extremely right. Obviously, if you are that far right, a lot of things seem left to you, even those a more normal person considers well right of center.

While I cannot really bring myself to disagree with your replacement rule for the string 'patriot' I'd like to propose 'jingoist' instead.

In Topic: I doubt I understand RAII just yet

24 May 2016 - 04:17 AM

While I did not downvote you nor do I know the mind of the person who did, I kinda agree with the vote.

Your advise feels like bad advise. RAII is so fundamental to working in C++, if you do not have a solid grasp on it you should strive to remedy that situation as soon as possible. The reason for not using RAII should be <well-reasoned rationale> not 'nah, never had to use it before'.

In Topic: Wrapper Function for lua_register?

24 May 2016 - 12:47 AM

Certainly true, but it is usually distributed and often used as a dynamic library.

Sure, if you link it statically as part of your customized build, a lot of things go (same goes for a lot of other projects), but not right out of the box (teaching Lua to deal with member function pointers feels like a decidedly non-trivial change and still leaves the whole 'who deals with this and lifetime and ownership?'-issue floating around). And any change you do there could become very annoying when you need to upgrade to a new Lua version. I would not do that myself, least of all advise someone markedly newer to try it.

Also, "capable of building in C++" sounds a bit grander in my mind than it really is. It has a very basic support to avoid C++ name mangling and some macro hackery to switch between exceptions and setjmp/longjmp.

There is a lot of "you could of course also..." in that whole area but considering the OP was confused by the member function/free function issue already I did not consider it useful to open those can of worms. They are best left for after you gained a few skill points.

In Topic: How to round 2 Straight lines

23 May 2016 - 02:59 AM

The concept you are looking for is subdivision (on lines). Have a look at this slide and the following for example.

In Topic: c++: sprintf but return chars. Possible?

23 May 2016 - 01:57 AM

The iostream classes are often very annoying to work with when you have to deal with more complex substitutions. It can become very hard to read, very fast.

Something like boost::format is often a better idea because it combines a familiar, easier to read syntax with all the type safety C++ can offer you.