« first day (669 days earlier)      last day (4279 days later) » 

2:00 PM
@sbi why would you define ?. That seems silly.
 
sbi
@SamDeHaan Look again at the formatting. (And as a programmer you should learn to pay attention to such details.)
 
@sbi I know, you didn't have the space there. But I'm a 'merkin, can't I make jokes based on poor interpretation and defend them until death?
 
You know, being a merkin is supposed to be a disadvantage. You're doing it wrong.
3
 
sbi
@SamDeHaan As a C++ programmer, I wouldn't call a missing space a mere "detail". That's a major blunder. The formatting detail was that #define was formatted as code, while the question mark wasn't.
 
Defend until death!
 
2:05 PM
@sbi that's just silly
 
@R.MartinhoFernandes I'm doing it completely wrong. Isn't that the point? My disadvantage is still viewed by me as an advantage, cause merkin?
 
2:20 PM
@sbi you have much experience with doing cross platform code?
or know much about it in theory?
 
sbi
@thecoshman I have done cross-platform development for almost a decade.
 
@sbi oh good. could you share some high level ideas on how 'best' to do it?
AFAIK it boils down to either PPM or build system switching what code is built/included for each paltform
 
sbi
@thecoshman 1) Identify all the code that's platform-dependent (UI, file system access etc) and put that code strictly away from the platform-independent bits 2) Put a platform-independent API over it, and platform-specifc implementation. 3) Get rich.
 
¬_¬
 
sbi
Of course, that leaves out lots of the hard bits. Like coming up with universal headers defining stuff for platform-specific workarounds, endianess etc., or (gasp!) coming up with a build-system.
 
2:25 PM
can we take down a few levels?
zoom in on part two
 
enhance!
 
The hard bits are creating an fucking OS X bundle and having to deal with the weird plist stuff and all.
 
sbi
@StackedCrooked The good thing about cross-platform development is that for every common platform you always have some aficionado at hand to do that stuff. (You cannot port some application to the Mac without having at least one Mac programmer aboard, although it might be different for mostly platform-independent libraries.)
 
Yeah, that's right.
 
2:28 PM
would you recommend using PPM to do things like if windows, include windows implementation, else if linux include linux implementation or let the build system handle which implementation is used
 
"Get the others to do it" sounds like a nice plan.
 
sbi
@thecoshman What more do you want to hear? That's really all there is to that. Such a set of cross-platform libraries takes time to grow yourself. You might want to look into existing solutions (boost).
@thecoshman What the hell is "PPM"?
 
Pre-processor macros. He just made that up.
 
@sbi Pre-processor Macros
 
@sbi I used to be one of the Mac programmers on board. I had no experience with Mac programming before that and it was a rather painful experience. However, there were a few guys there that were quite informed.
 
sbi
2:29 PM
@R.MartinhoFernandes Ah. I only knew it couldn't have been "parts per million".
 
@R.MartinhoFernandes 'just'? I've always used it
@sbi I was thinking more about windowing, and how to handle the logic behind which implementation is used
 
sbi
@thecoshman In one company we just put all the implementations into the same .cpp file surrounded by #ifdefs. That has the advantage that the main rule you have to remember about building something is that you just need to compile every source file, which makes it easier to hack together a build system when you port to some new platform. Another company had ..._osx.cpp and ..._linux.cpp file suffixes, which were picked up by their own build system. A PITA, IYAM.
 
@sbi Btw the circumstances you describe remind me very strongly about my first job in the graphics industry. Platforms were Mac, Windows, Linux, AIX etc.. There was team that worked on cross-platform tools and there were teams that developed the end applications, each team having developers for the targeted platforms.
 
@sbi I'd probably make it a .cpp with #ifdef blah #include thingy_blah.inl and keep the implementations separate.
 
@sbi would you care to shed light on what you think is a better way of doing it?
 
sbi
2:34 PM
@thecoshman One company I worked for used wxWindows (now renamed to I dunno what). Another had their own OpenGL GUI lib.
@thecoshman Do you know what a "PITA" is?
 
@sbi indeed... you implying I am one?
 
I remember that one of the senior developers had developed his own cross-platform GUI library (Windows/MacOSX). For some reason there was the obsession that everything had to be built in-house. He only developed it up to the point that he could give a fancy demo and then a junior had to take over the project.
 
It's a pain in the mikta.
 
@StackedCrooked what a douche
 
sbi
@R.MartinhoFernandes Sometimes this was done, IIRC. Although the included files still were .cpp files, and were protected by #if OURLIB_OS == OURLIB_OS_XXX, too, so you still could throw all the cpp files at the compiler.
 
2:35 PM
@sbi A pity?
 
sbi
@thecoshman "Another company had ..._osx.cpp and ..._linux.cpp file suffixes, which were picked up by their own build system. A PITA, IYAM."
 
@sbi Separating platform glue into separate files is better than ifdefs all over the place.
 
@StackedCrooked If everything is in-house you don't have to bother with everyone else's bugs!
 
Also if you use OpenGL there's little choice but to do your own GUI.
 
@R.MartinhoFernandes Yeah, only with your own! Oh, wait..
 
2:37 PM
You write bugs?
 
All existing libraries suck even more than those for software desktop UIs.
 
@R.MartinhoFernandes Even standard library was rewritten in-house.
 
sbi
@CatPlusPlus If you have small implementation files (a few dozen lines per implementation), that's not necessary so. For bigger files, I agree. As I wrote, ISTR something like that being done, although everybody still stuck to the "you can just compile all .cpp files rule.
 
@CatPlusPlus meh GUI's, I care not for worrying about those :P
 
sbi
@StackedCrooked What a waste of resources! If they could afford that, they definitely charged too much for their software.
@CatPlusPlus To be fair, all that company did was 2D and 3D animations plus audio and video streaming, and all the GUIs were custom-specific ones with the requirement to look "sexy" anyway, so doing their own GUI stuff in OpenGL wasn't that far-fetched.
 
2:40 PM
@sbi The product that i was working on was called Pitstop Pro, it was the cheapest (I think 250 EUR) and targeted at broader market. Then there were applications targeted at big companies Pitstop Server and probably the profits were there.
 
sbi
@StackedCrooked You worked for Pitstop?
 
Yeah.
 
sbi
@StackedCrooked Are you looking for a job as a C++ programmer?
 
@sbi Lol, why?
 
2:41 PM
Lol.
 
I'm looking a little bit.
 
sbi
@StackedCrooked You might guess, but please guess in private.
@StackedCrooked Give me a means to contact you.
 
@StackedCrooked He either thinks you're the dog's bollocks, or wants to kill you :P
 
That would be exciting.
 
2:42 PM
@thecoshman Oh god, my parser just segfaulted.
 
@R.MartinhoFernandes :(
¬_¬ I think I got it all :S
 
sbi
@StackedCrooked I sent you a mail.
 
@sbi So this wasn't a coincidence.
 
@sbi Do you have any C++ jobs that would not be tied to... the larger Berlin area?
I'm starting to decide I should be looking for a job that better matches my ambitions/affinities.
 
sbi
2:47 PM
@sehe Nope, unfortunately not.
 
In fact, I started to decide such around 2001 :)
 
sbi
@StackedCrooked I dunno. I never did anything with graphics.
 
// invalid id, skip that filth
That's a nice comment.
 
@sbi Okay. I'm just on the lookout for blatant opportunities
@EtiennedeMartel Especially after preprocessing
 
I have a strange feeling if I want to find a new job in Michigan, this chat is not going to get that for me :P
 
sbi
2:49 PM
Just in case: I also know a company in Berlin who needs a C# developer. On site, but English should be fine.
 
@sbi what about a very poor grasp of English?
 
Mmm. That would be ... about 8hrs. commute.
One way.
@thecoshman You?
 
@sehe :P
@sehe not too far for living during the week
 
sbi
@thecoshman Well, the applicant should be able to write a spec.
@sehe You'd need extremely good commuting to work 8hrs/day under those circumstances. And a mere 1hr overtime would wreck it all. :)
 
@sbi and presumably fairly competent with C# and willing to live in Berlin
 
sbi
2:52 PM
@thecoshman A C# job. On site. I already wrote that.
 
@sbi I know I know
 
> For the documentation writer position, you should be both familiar with programming and API design and be able to type at least 70 wpms
 
Wow, a typing speed requirement. That's... something.
 
wpms is "words per minutes" or "wordses per minute"?
 
wordses, of course.
The position is for a ---technical--- nerd writer
 
2:55 PM
@SamDeHaan I don't think 70 wpm is too high.
 
it's the plural of words per minute. So, it's similar to the department of redundancy department.
 
lulz
 
@R.MartinhoFernandes I don't think it's high, I think it's slightly ludicrous to have that requirement.
 
Some hunt-and-peckers can get 70 wpm (rare, but not unheard of).
 
But I suppose you need a good reason to reject people who look good on paper but just don't work well.
 
2:56 PM
@R.MartinhoFernandes difference?
 
whats is everyone's wpm?
 
@SamDeHaan It's a way to reject people that just aren't a good fit. If you're a non-exceptional hunt-and-pecker, you're not productive enough for that job, I guess.
@ITNinja Dunno. I think I'm average, so I can probably do 60-70 wpm.
 
@R.MartinhoFernandes typingtest.com :)
 
If I'm copying a document? Probably around 100 wpm. If I'm generating content the brain speed is usually slower than the hand speed.
 
@R.MartinhoFernandes I just took it and got 82 wpm, but i wasnt really trying :)
the highest ive ever gotten was 96 wpm :)
 
3:01 PM
@ITNinja I got 71, with 98% accuracy (1 error).
 
Just tried out your typingtest wobsite, 89 wpm, 1 error. Also not seeeeriously trying, that's more obvious than my usual not-working at work.
 
If you're trying to get a higher result you're skewing the results.
 
@R.MartinhoFernandes I do that just for fun though ;)
 
You can probably sustain a faster speed for a single minute than you can in "normal" conditions.
 
yeah
 
Xeo
3:03 PM
meh, 73 with 3 errors
Let's see if I can type faster in English, where there is no äöüß
 
You got something in German?
Oh, there's a dropdown at the start.
 
I don't think I should try that typing test. I doubt there software is built to handle overflows
 
bad one :P
 
@thecoshman 1 error already, shameful.
 
Xeo
Meh, seems I'm not the fastest typer
Might be that I just make too many mistakes that cause me to hit the backspace :(
 
3:07 PM
I make mistakes too.
I get 62 in Portguese, but it's not fair because the text contained the word Watzlawick, which is totally not Portuguese.
Paul Watzlawick (July 25, 1921 – March 31, 2007) was an Austrian-American psychologist and philosopher. A theoretician in communication theory and radical constructivism, he has commented in the fields of family therapy and general psychotherapy. He was one of the most influential figures at the Mental Research Institute and lived and worked in Palo Alto, California, until his death at the age of 85. Life After he graduated from high school in 1939 in his hometown of Villach, Austria, Watzlawick studied philosophy and philology at the Università Ca' Foscari Venice and earned a doctor of ...
 
@SamDeHaan oh, wrong their :P
 
Any time I see touch typing "tutorials" that say "Q" should be pressed with my pinky, I get the feeling my pinkies are shorter than average.
There's no way my pinky can do that without moving my hand.
 
Xeo
Aye
 
Yeah, I hit Q with my ring finger. It just feels more natural. Then again, I don't really type using my pinkies at all.
 
Xeo
Or without having the hand way too high up on the keyboard
I use my pinky for ctrl and shift
 
3:14 PM
I pretty much type primarily with two fingers per hand, plus thumb for space, and ring finger for the letter q. I never noticed this before. Weird.
/tolunch!
 
@Xeo I use it for A, <, Ctrl, Shift, and Esc (which is on the spot of that Caps Lock abomination).
 
Xeo
I use my ring finger for everything but ctrl/shift
 
@R.MartinhoFernandes did you lose half of it in an accident or something?
 
Xeo
And I just noticed I only use my index finger on my right hand for typing, and the ring finger for backspace
 
sbi
@R.MartinhoFernandes amazon.com/dp/0393310213
A great book.
 
Xeo
3:15 PM
and enter, apparently
 
@Xeo Oh. You guys are quite unorthodox. I learned to type in a completely ad-hoc manner, but it ended up quite similar to that thing they sell as "touch typing".
 
Xeo
What do you mean?
 
The fingers on the home row, and using all ten fingers, etc.
 
Xeo
ew, could never brind myself to use all ten fingers
the right hand pinky is pretty much unused
 
sbi
@R.MartinhoFernandes In the 80s I learned from TV that good typists (world champions) usually usually have short, fat (wurst-like) fingers.
 
3:18 PM
@Xeo I use it for Shift and some accents.
 
Xeo
the right hand middle and ring finger I use for the numpad
Well, German keyboard layout makes accents quite accessible with the index fingers
 
@sbi wurst.... sausage?
 
@sbi My fingers are quite thin though.
@Paranaix I know about all of those. I don't want to warp my class with <> and name before it. I love the Go grammar ,I need it to library. — MessyCode 35 secs ago
 
sbi
@thecoshman Typists' fingers‌​.
@R.MartinhoFernandes Then that might be your problem. :)
 
@sbi sausage
 
3:22 PM
Hey, I like my thin fingers.
 
peace out!
 
You freaks with sausage-like fingers are disgusting.
If it weren't for all the scars, my hands might pass for woman's hands.
 
@R.MartinhoFernandes Scars? So you're really more of a cyborg than a robot?
 
Oct 31 '11 at 14:02, by R. Martinho Fernandes
I'm not very dextrous handling knives.
@JerryCoffin I won't reveal any fatal weaknesses I might have (hint: I don't have any! I swear!) in this chat!
 
Iron rusts when in contact with water...
 
3:31 PM
Jan 20 at 12:07, by R. Martinho Fernandes
@IntermediateHacker I'm made of hi-tech plastic.
 
@R.MartinhoFernandes Fire! Let's melt you.
 
May 29 at 14:41, by R. Martinho Fernandes
@EtiennedeMartel Highly durable superconducting plastic, mostly.
 
oops
 
Xeo
0
A: How to determine whether the passed array is 1-D, 2-D, OR N-D array

XeoYou can actually find out the exact number of dimensions pretty easily, with a single overload using C++11's std::rank type trait: #include <type_traits> #include <iostream> template<class T, unsigned N> void print_dimensions(T (&)[N]){ static unsigned const dims = std::...

I love <type_traits>
 
3:32 PM
@R.MartinhoFernandes That seems pretty close to a tautology. If a weakness has proved to be fatal, you're no longer in a position to do any revealing. If you're still revealing things (except perhaps to a coroner), no weakness has been fatal yet.
 
@R.MartinhoFernandes Ok, let's ..sell you.
 
is it common that this gives an error with gcc:

int some_function( int x, void* (*function_pointer)(void*) );

// then the actual function call of some_function
some_function(5,  [bla] (void* arg){
// do something
return (void*)0;
} );

Saying that there is a primary expression expected before the lambda?
 
sbi
@Papergay You cannot bind a lambda to a function pointer. A lambda is a functor of an unknown/unspecified/unutterable type.
 
@sbi Captureless lambdas can be converted to function pointers though.
 
user784668
@sbi You can if it doesn't capture.
 
sbi
3:35 PM
Oh, you can? I didn't know that.
 
you can call a lambda with a function pointer?
yeah, afaik you can
 
@Papergay Not one like yours.
 
why?
 
Only lambdas with no captures, i.e., [].
 
oww ;o
 
3:36 PM
@Papergay Because they're more than function pointers.
 
Xeo
void (*p1)() = []{}; // capture-less
 
user784668
@Papergay Your lambda captures bla, so its not bindable to a function pointer.
 
yeah okay i already understand, thx ;o
 
A lambda with a capture (aka a closure) is a function + an object.
 
Xeo
@Fanael convertible.
 
user784668
3:36 PM
@Xeo Same shit.
 
@Xeo I'm surprised at the amount of "you cannot do it like that but you can provide N overloads instead" answers. rank doesn't need compiler magic.
 
Xeo
Aye
 
cant i even parse arguments if I want to do it?
 
Xeo
I wanted to write it myself first, but then remembered that <type_traits> has it. And I'd probably have overlooked the T[] specialization at first.
 
std::smart_ptr<User> X = &Xeo;
nah nah nah.
 
3:41 PM
Ewww implicit ctors.
 
user784668
@BartekBanachewicz There's no std::smart_ptr.
 
I removed the argument inside "[ ]" but it gives me the same error, do i need to remove the arguments in the parenthesis, too, in order to make it captureless? actually not, right?
 
@Xeo and it's such an obvious implementation, as well! Can't believe the number of incorrect answers there.
 
Are you compiling with -std=c++11.
 
yes i am
hmm maybe i should check my gcc version xD
 
3:47 PM
Seems to work fine: ideone.com/lZpVB
 
yes it does, i will check my compiler
okay its quite old... 4.4.5 xD
 
:4947008 You know that even removed messages have a "history", right? :)
 
@FredOverflow the history can only be viewed by owners, right?
 
user784668
@Papergay Wrong.
 
but i cant view it at least :o
 
3:52 PM
I think if you don't want to disclose your e-mail it's better to use something like mailinator for the handshake.
 
@Papergay If rating high enough. I don't think I can see them.
 
@StackedCrooked You can.
 
Hey guys whats the best book for learning C++ for a beginner?
Accelerated C++ seems to be outdated
 
1444
Q: The Definitive C++ Book Guide and List

grepsedawkThis question attempts to collect the few pearls among the dozens of bad C++ books that are released every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a good C++ book...

 
3:53 PM
@Papergay I can, and I'm not an owner (any more).
 
@JosephPotts If you mean that it doesn't cover C++11, then you'll have to wait a bit more.
 
@R.MartinhoFernandes Wow, interesting.
 
@JosephPotts C++ Primer 5th Edition is brand new, it's going to be released tomorrow :) I would recommend that if you're going for C++11.
 
hmm
 
@R.Martinho I mean by the syntax, it uses old syntax
Okay Thanks :)
 
3:54 PM
Well, I don't know what you mean by that. AFAIK it just doesn't use C++11 stuffs. But I never read it, so...
 
@JosephPotts But don't buy C++ Primer Plus, that book sucks!
 
Why? =o
I thought it was supposed to be better.
 
Why would you think that? It's a completely different book by a completely different author. The similar names are a coincidence.
 
I've heard tons of good reviews about it
 
Yeah, the "Plus" is really misleading.
 
Xeo
3:55 PM
@JosephPotts You sure it was about the one with the "Plus"?
 
Yeah.
 
@JosephPotts It doesn't teach C++ the way C++ should be taught. Instead, it teaches C first, and then some horrible stuff no sane C++ programmer would ever do.
 
@FredOverflow strtok?
 
Xeo
@FredOverflow Except for fun and to enrage any sane programmer!
 
3:56 PM
You have weird definition of fun.
 
5
Q: How should I undo damage caused by reading "C++ Primer Plus"?

Jim M.Unfortunately, I failed to do the proper research prior to reading Stephen Prata's C++ Primer Plus. After reading Amazon reviews I concluded (incorrectly) that C++ Primer Plus was a great introductory book for learning the language. It wasn't until after I completed the text, a month ago, that I ...

lol @ title
 
Xeo
lol @ question
 
Lol :x
 
Are there any equivalents for Haskell's <- ?
 
3:57 PM
@kbok What do you mean?
Dammit.
 
I have a function that returns a IO Integer and I want an Integer
 
> I could go on, but there is nothing in this book that is appropriate to the needs of someone learning C++ in the twenty-first century. It is time that Pearson Educational asked itself if it should be promoting bad books that will only reduce the revenues of other parts of the company that are publishing good books. The author of this book seems unable to discriminate between relevant and irrelevant information
 
x <- foo is sugar for foo >>= \x -> ...
 
3:58 PM
D:
 
@kbok Can't get out of the IO monad, sorry.
I'm also a liar, but it's for your own good.
 
Well that's out of my list then =p
 
Man.
I just had a fucking bacon pizza.
 
@JosephPotts C++ Primer (without the Plus) is really good. Buy it. Read it. Die happy.
 
3:59 PM
@kbok x <- thatFunctionReturningIOInt; somePureFunctionTakingInt x
 
Hmm, I have two answers : "Do it that way" and "Don't do it".
 
I want to die when I stop being happy. I don't want to waste any of the potential happiness I have left.
 
Xeo
 
Or f >>= g with those two
 
Hope it's available for kindle.
 
3:59 PM
Gotta try that >>= thingie
 

« first day (669 days earlier)      last day (4279 days later) »