« first day (1251 days earlier)      last day (3688 days later) » 

7:00 AM
@MarkGarcia: I feel the same contradiction, I will explain,
"Tactics is how you use what you have in battle, not having to bring a different rulebook for different scenarios." -> No approach exists for a single issue. "Different terrain (problems) would bring you different things (tools, paradigms)" -> There exists an approach for each different issue.
 
Interface design and implementation details depend on the language. but how you split a program into modules and the general interaction of the modules (aka the architecture) is not language dependent.
 
I need to admit, that I am confused also what point you are trying to make. Are you trying to write that it is nice to mix C and C++ mentalities in a C++ software architecture?
@ArneMertz: it is highly influenced by the language and its capabilities.
 
room topic changed to Lounge<C++>: Now with 100% more boring mornings loungecpp.net [i-better-rewrite-it] [my-code-is-compiling] [no-stalking]
 
Still no stalking huh? I see ... @_@
 
@LaszloPapp Ah, I see your point. What I mean by "different tactics" is how you approach the problem, given different tools, etc. I do not mean there are some classification of tactics or what-not. So I mean, tactics "compensates" for the different scenarios, not this tactic for this scenario and that.
 
7:06 AM
@Mark: try to mix C and C++ stuff, and as far as I can tell, many people will tell you that is a bad idea (IMHO rightfully). They will say this should be the last resort for a few reasons, especially if the mentality is mixed even within the same library or executable.
It is a bit like mixing the cold and hot water in the UK in the bathroom.... It is a mess, and does not feel right.
 
@LaszloPapp I am trying to write that it is nice to not to draw hard borders between "C mentality" and "C++ mentality" but to know different approaches to solve aproblem and come up with the right approach for the problem at hand. Soemone once called this the difference of "programming in a lagnuage" vs "programming into a language". Of course I don't propose to use C stuff when C++ stuff is better suited and available.
But for example there are problems that are best solved with a mainly procedural approach. In that case, stuffing everything into classes just "because C++ and procedural is C mindset" ist just plain wrong and narrow-minded.
 
what is plain wrong and narrow-minded if you think the C++ mindset is about classes, only.
it might be that the example was improper, in which case feel free to provide a better example, but C++ is not only about classes, and I think most people will agree about that.
 
@LaszloPapp it's not. It's wrong to think about a fixed "<language X> mindset" in general.
 
@StackedCrooked first time I hear of those terms, good to know
 
My example is that, it does not make sense IMHO to use raw pointers, just for one, when you have a "managed" solution for that in C++. If you start doing that as a C developer in a C++ software codebase, well I will not be happy if I need to participate to it.
 
7:13 AM
@LaszloPapp C++ using C libraries, stuff, is okay. Even much better if you abstract them. However, abstracting and hiding all the C stuff may not be that practical. Take HWNDs where you need to interoperate with different C++/C libraries. To abstract HWND would mean you would abstract ALL of the libraries who use them. Mixing C and C++ is hard, but that doesn't mean it's really a bad thing.
 
@MarkGarcia: Have you read carefully what I wrote? I wrote it should be the last resort. You seem to be agreeing rather than disagreeing.
and no, I will not agree that it is good to use the "C libraries" when there are much better alternatives in the std.
 
@LaszloPapp we agree on that. That's what I mean by not using C tools if a better C++ tool is available.
 
a typical example is the whole str* mess.
 
@LaszloPapp lol. I misread (and I can't catch up with your edits!). I state what I believe in, and whether or not that agrees or disagrees with you, I care less. :)
 
that would be C thinking, and I would be very sad to see them coming into a C++ codebase.
when you can use std::string with better safety, etc.
 
7:21 AM
Yes. Do it in the C++ way, but provide something so that those who encounter C libraries can use them, e.g. std::string::c_str().
 
that is why I meant a good "C developer" can learn C++ quickly - because he has to adapt the things that are in C++. The only thing is I don't think one has to forget about C, because there are some things in C that can be used in C++ some times. iow, the C and C++ toolset have a certain overlap, and a good developer just knows to pick the right tool for the task.
 
@ArneMertz Just don't use the .hs that are in the standard library! ;)
 
Good "C developer" can learn C++ quickly because they already possess a lot of general programming skills
Learning C++ when you know one or more languages well is not the same as learning C++ when you only know what your shitty uni told you
(Unless they're bad programmer, but that's not specific to any language)
 
meaning, in the "classic" way to learn C++ you learn some things very late (or maybe never) that can be of use and that you already have learned in C.
 
Damn.
You guys are still talking about this eh?
 
7:24 AM
@CatPlusPlus good programmer isn't specific either. That's why I put "C developer" in quotes.
 
@Rapptz Yes, and it's still boring and stupid
@ArneMertz Yes
 
You're part of it.
Just saying
Good morning
 
Approaching critical boredom threshold
 
@Rapptz No. What we've said are incantations for Denis Ritchie.
 
Slow approach under threshold velocity
 
7:26 AM
Well bring up something else :P
 
Play Crawl
 
keep-alive
 
why so many novels treat dragon heart so divinely ... and none does dragon butt? surely a dragon needs both a heart and a butt to survive ... if there is such a creature as a dragon?
 
Dragons are buttless
 
So its asshole. I don't know how to cut-out an asshole.
 
7:31 AM
"Adopting" -> Rethinking your basic philosophy about the programming world and forgetting what you had in your mind before.
 
And I will not imagine of doing it.
 
@MarkGarcia Play Space Station 13 and you will learn everything there is to know about stealing butts and making hats and robots out of them
 
and no, c_str() is not a C thing, it is a C++ thing. It is not available in C, and it is only kept for compatibility... hence the original saying of "C++ sucks at inheriting stuff from C, hence rust and other attempts to start from scratch".
 
Forgetting knowledge makes you worse, not better
Also butts
 
now, now ... imagine a buttless dragon, where does the food go, surely there would be some waste ~_~
 
7:32 AM
Never forget.
 
Fire won't fuel itself
 
@MarkGarcia: you are free to mix up C "ideas" with C++ in a C++ software as long as we do not need to work together, if you really want to keep it in mind and use. :-)
 
Yay spaghetti!
 
hey anyone mind helping me with a quick legacy C question?
 
7:34 AM
excellent
 
As in, no
 
ah well then that is a bummer
 
Time to go to work
 
and you should read questions more carefully to avoid confusion
 
And by that I mean fire up Toggl and start working without moving anywhere
 
7:35 AM
Benjamin, do not ask to ask; just ask.
 
Work at home reasons
 
@LaszloPapp I just mean C++ doesn't have to abandon the works made in C.
 
ah well I didn't want to interrupt the conversation about a buttless dragon without permission.
 
I always thought dragons were pretty buttful
gotta recheck that
 
@MarkGarcia: can you please clarify? I do not understand what you mean by that statement.
 
7:37 AM
Oh. And, don't play with bazooka's in kindergarten. If you can't spot a return statement/don't know what it means, it's certainly not the right time to try multithreading. In C++ no less. — sehe 5 secs ago
 
basically I'm just trying to figure out how to parse this array: char *data[] = { "12", "34", "", 0 }; and turn it into a vector of strings
 
what do you mean by "works" in that context?
 
A whole new level of stupid?
0
Q: Problems troubleshooting parallel_reduce with Intel TBB in C++

OllyI'm trying to calculate the sum of an array using parallel_reduce (part of Intel's TBB), but it stops the program in its tracks and doesn't throw up any errors to let me know why that is. I have a feeling it might be that I've used a pointer wrongly or fed in the wrong number somewhere, this is o...

 
no wonder ... never thought the fire from a buttless dragon's mouth was fueled by the ammonium gas and dragon dung. so maybe some people were not really burned to death from the dragon's fire but instead they are stunk to death
 
@BenjaminDangerJohnson [a] it must be const char* [b] std::vector<std::string>(std::begin(data), std::end(data)); done
 
7:38 AM
It's like really bad fart, except it's also napalm
 
some people say another brainfart inheritage from C is the switch statement.
 
Ignore these people. At least, for the construct. Switch has tooo many weird features, but the construct is fine
 
Poor man's pattern matching. Incredibly primitive and nigh useless
 
@LaszloPapp inheritage? o.o
 
In most languages
 
7:39 AM
that word exists?
 
oh, wow that makes me feel kind of dumb, I was trying to use legacy C to read it
I'll give this a shot
 
There's nothing to read
 
@Borgleader: yes.
 
It's already read as much as it can be
archaic
: inheritance
 
@CatPlusPlus Oh its an old person word
 
7:40 AM
@LaszloPapp I mean, c_str() is clearly made with C-compatibility in mind. It would never help C though, because it can never use std::string! Again, help ease the use of C libraries within a C++ project.
 
@BenjaminDangerJohnson a rimshot ba-dum-tshhh
 
@sehe wait, what library is plain "std::begin" in?
 
@BenjaminDangerJohnson (I used c++11, you might want/need (data, data+3) or write a simple copy_until algorithm)
 
@BenjaminDangerJohnson in <iterator>
 
Here's an example of an important programming skill, searching the internet
 
7:42 AM
@LaszloPapp And I meant that to my original c_str statement.
 
@Borgleader cool, thanks for the help.
 
@MarkGarcia: yes, and as discussed, that should be the last resort.
and in an ideal language, there would be no such stuff for something inherited from somewhere.
 
Ideal language without FFI would not be ideal at all
 
@R.MartinhoFernandes you're still not running comments on your blog right? you seen Jeff's post today? Maybe discourse is worth a try soon (now?)...
 
Unless something drastically changed in past 3 months, no it's not
 
7:50 AM
well, I haven't had a look at it recently enough to say
 
Also it so doesn't fit a blog, esp one that's based on static generation
 
What Jeff is doing is basically linking to a discourse page where comments can be had.
 
Well he's also bad
 
Which seems not completely terrible
 
@BenjaminDangerJohnson here's a fully c++03 version that treats a NULL entry as the sentinel: coliru.stacked-crooked.com/a/e6f24869f35f9708
 
7:51 AM
I find Discourse's reply system confusing.
 
vOv I don't want to run my own comments system
 
per yesterday's coding horror you shouldn't have comments then
 
It's filled with nonsense
Also a pain to deploy
 
@ArneMertz that's a beautiful password
 
@sehe o_0
 
7:52 AM
Even worse than usual RoR shit
 
Is there any more accurate table showing state of C++11 support in various compilers than this?
 
@wilx No, also it's outdated
 
@wilx You only need VC++'s. :)
 
Visit compiler-specific pages and assume MSVC doesn't have anything
 
It seems that there are really only MSVC, GCC, Clang and Intel compilers that are of any use with C++11.
 
@sehe luckily it was only the username :-)
 
@wilx s/MSVC, GCC, Clang and Intel/GCC and Clang/
 
And MSVC is shit
 
@CatPlusPlus Even the 2013 version?
 
@ArneMertz oh, that sucks then :)
 
7:54 AM
If you want MSVC, you can use uh auto and some rvalue ref stuff
 
@wilx Yes even that
 
And nullptr
 
(and I'm including CTP)
 
It's really bad
 
@sehe why?
 
7:54 AM
@CatPlusPlus You have to manually define the move ops. :(
 
Yes
It's really bad
 
MSVC no have nullpooter?
 
So, in reality one would have to use GCC to support systems like AIX or HP-UX or Solaris?
That is sad.
 
It does, but that's like the least useful thing
 
Well, sort of.
 
7:55 AM
@CatPlusPlus i use raw literals, variadics, nullptr, library features just fine in MSVC (VS2013RTM). It's uniform init that has (many) problems
 
Variadics are broken, too, afair
 
@thecoshman VS2010 had nullptr iirc
 
Raw literals are rarely useful, I forgot they are even a thing
 
RAGH!!!!! DAMN PLINKED HAD TO BE TURNED OFF AGAIN!!!!
 
7:56 AM
And you can't do func({construct here}, 42); without wasting yourself a day debugging.
 
@CatPlusPlus Not for my use cases, anyways. And I've not held back. But it's "production" code, not template wankery per se.
 
@CatPlusPlus I use'em all the time in tests
 
I think Robot had problems
@Abyx For what
 
@MarkGarcia or unexplained crashes in production
 
The only use-case I can think of is regexes
 
7:56 AM
@CatPlusPlus expected JSON, e.g. I do too
 
Eh, textual JSON comparisons
 
@CatPlusPlus CHECK(s = R"(some "string")");
 
Also Boost is broken in MSVC.
 
@CatPlusPlus Raw literals in MACROS are borked (it doesn't "get" character "escapes" then)
 
@MarkGarcia :lol:
 
7:57 AM
and JSON
 
@CatPlusPlus Ah, sorry, it's the other way. :P
 
I would never compare JSON textually
But still, MSVC sucks at C++ even with this
 
@CatPlusPlus hahaha. That's because you don't own the parser/serializer then.
 
@sehe Whoah. Thanks much!
 
7:58 AM
@CatPlusPlus even when you test a json parser?
 
giyf
 
@Abyx Probably. Non-stable ordering is fine for objects for example
 
@CatPlusPlus My higher level test compare JSON::Value objects, yes
 
Maybe JSON bits
 
@CatPlusPlus prezoisely
 
7:59 AM
But I don't write JSON parsers, no
 
Shame on you
 
I use stacks that come with well-tested and functional JSON parsers :v
 
You need to either write a snake clone, or write a JSON parser to be a lounger
@CatPlusPlus Lazy bum. Y U NO portable code? Y U NO efficient modern C++ library?
 
Fuck C++ libraries
 
:D
g2g
 
user3010322
8:01 AM
nighTknight
 
user3010322
@sehe Have you ever used a program called dbPoweramp?
 
8:23 AM
@CatPlusPlus read carefully
 
did you see my draft for the front page?
 
Yeah, I don't have time to think about it right now
 
I need a faster JSON parser
apparently it's the bottle neck for one of my apps
 
Try running it on a plane
 
8:33 AM
@ThePhD no. what a curious question
@telkitty.exe lol
@CatPlusPlus lol
@telkitty.exe I think Marc Gravell wrote one in C#. (I'm afraid you'r "doing" java.)
 
I wish I ran my JSON parser on the MH370 that day ... all would be different ... ~_~
@sehe worse still ... objective C
 
@telkitty.exe That's worse than Java?
 
much worse ...
 
use a C library
 
yeah right
 
8:37 AM
If you increment numeric_limits<unsigned>::max() then it becomes zero. What is the technical term for this principle? wrap-around, rollover, unsigned overflow, ...? Or should "overflow" only be used for the pathological cases?
 
pretty sure Objective-C can use C libraries so it's worth a shot
there's this: digip.org/jansson but I don't know how "fast" it is
 
@telkitty.exe I much prefer obj-c :)
 
to what?
 
java
 
8:38 AM
I can't even read Objective-C.
 
@jalf You're crazy then
 
@Rapptz I tend to read it subjectively.
 
also, I have absolutely no clue how well it performs, but I've been using picojson a bit. It's C++, so it should be fairly easy to use from obj-c
@CatPlusPlus shrug but at least I get to avoid Java :p
 
@interface classname : superclassname {
 // instance variables
}
+ classMethod1;
+ (return_type)classMethod2;
+ (return_type)classMethod3:(param1_type)param1_varName;

- (return_type)instanceMethod1With1Parameter:(param1_type)param1_varName;
- (return_type)instanceMethod2With2Parameters:(param1_type)param1_varName param2_callName:(param2_type)param2_varName;
@end
what kind of monstrosity is this
 
stringByReplacingOccurencesOfString:withString:
 
8:43 AM
@Rapptz yeah, it looks weird (kinda like a diff), but at least it isn't designed to be a better C-with-classes than C-with-classes is.
 
hey bro...
how are you>
 
user3010322
9:07 AM
Hm.
 
user3010322
Time for another major interface refactor.
 
user3010322
Why me. ;~;
 
user3010322
@R.MartinhoFernandes ^ Could help you? :D
 
user3010322
Though, he said GCC.
 
9:21 AM
@jalf oh sure, rub it in why don't you :'(
 
Java you can work with
Obj-C is on par with C, and sometimes worse
Also my code sucks and I'm sad
4
 
You can live with teeth smashed out, doesn't make it any less painful
 
Eh, go with IntelliJ and it's p workable
 
¬_¬ eclipse is the dictated tool
it's not that bad to be fair.
 
user3010322
Mmmm, eclipse.
 
9:24 AM
Use IntelliJ and don't tell anyone
 
vOv I've got used to eclipse shortcuts
 
Is everything terrible?
 
user3010322
Not when you're around, babycakes. <3
 
@thecoshman I think IDEA has Eclipse-like scheme
 
9:25 AM
@TonyTheLion some infinities terribles are more terrible
 
Though it has R#-like features, so learn to love Alt+Ins and Ctrl+N
 
oh babycakes! I love babycakes!
@CatPlusPlus what sort of masochistic key combo is that! 'alt+ins' indeed.
 
my dad told me to quit FB
 
so meta. My "unused"-bla annotation is... unused. Maybe I can add a pragma to suppress the unused annotation
 
9:32 AM
@TonyTheLion listen to him
or at least stop using it.
@sehe :'( if only this was a joke
 
@sehe yeah, as far as I can tell they just chose to allow {} for any function call, tada instant "uniform initialization"
 
@melak47 yup
 
which I found kind of hilarious but then it made me sad :(
 
it's too hard to steer cleer of trouble yes. The sanest approach is to not use it. I use it, but I definitely don't use it for classes with ctors that /potentially/ take initializer lists. It will silently fail to generate correct default ctor invocation somehow.
 
since we are talking about baby cakes ...
 
9:41 AM
1 message moved to bin
 
why, sehe try to lose weight? I know you want eat those cakes but ...
 
until we are talking about babycakes
Then you do have a conflicting version of Boost installed. Apparently the homebrew version wasn't compiled with --std=c++11. This will result in code violating the ODR. See e.g. stackoverflow.com/questions/4192170/…sehe 44 secs ago
 
@thecoshman I decided that I don't want comments.
 
@R.MartinhoFernandes can you check my claim there for a second? Am I right in thinking an ODR violation can arise when some TUs include boost headers in C++11, and some in C++03 mode?
 
@sehe I experienced something like that once, and it was some kind of ODR.
 
9:54 AM
@R.MartinhoFernandes why not?
 
@sehe That is possible, yes.
 
@R.MartinhoFernandes Thanks. I don't realize this often enough myself. Perfect reason to have building boost parts integrated with build server. And preferrably in a single project
I get away with things because I'm master of my build options and have a rather fixed set of preferences
 

« first day (1251 days earlier)      last day (3688 days later) »