« first day (283 days earlier)      last day (4891 days later) » 

20:00
oh it works, genius
@hexa what did you just say?
even tho int and long int are the same in this platform (ARM) i think it is right to bitch about it, thanks :)
@hexa It's usually the same size, but not necessarily.
long might be bigger than int.
one is 16 bit, unsigned long int is 32 bit
I am pretty sure int is 32bits
If not I will have to revise all this code here hahaha
ARM Cortex-M3
20:02
AFAIK, int is made to be the most native word size. Dunno what the standard says.
depends on the platform hexa
But it's at least 16-bit, and long is at least 32-bit.
IIRC.
on my particular platform, that I am working now its all good. sizeof(int) == sizeof(long)
In C++,

> There are five standard signed integer types : signed char, short int, int, long int, and long long int. In this list, each type provides at least as much storage as those preceding it in the list.

For each of the standard signed integer types, there exists a corresponding (but different) standard unsigned integer type: unsigned char, unsigned short int, unsigned int, unsigned long int, and unsigned long long int, each of which occupies the same amount of storage and has the same alignment requirements.
(see full text)
and
signed char: -127 to 127
unsigned char: 0 to 255
"plain" char: -127 to 127 or 0 to 255 (depends on default char signedness)
signed short: -32767 to 32767
unsigned short: 0 to 65535
signed int: -32767 to 32767
unsigned int: 0 to 65535
signed long: -2147483647 to 2147483647
unsigned long: 0 to 4294967295
signed long long: -9223372036854775807 to 9223372036854775807
unsigned long long: 0 to 18446744073709551615
I tend to use the stdints whenever possible when I need 32 bits for example, but I've always assumed since I started using this chip that long = int, If this wasn't true, it would be prolly best to revise this 15k+ LOC :P
20:06
@0A0D I thought the standard did not specify sizes?
actually scratch that, I assumed that int = 32bits
anyone having some cool sparetime projects ?
@ManofOneWay yeah, its called wife
:D
Note that there were machines (Crays) where CHAR_BIT was much larger than 8. That meant, IIRC, that sizeof(int) was also 1, because both char and int were 32-bit.
30
Q: size of int, long, etc...

JérômeI'm looking for detailed informations regarding the size of basic C++ types. I know that it depends on the architecture (16 bits, 32 bits, 64 bits) and the compiler. But are there any standards ? I'm using Visual Studio 2008 on a 32 bit achitecture. Here is what I get : char : 1 byte short ...

that is so gay hahaha
20:07
Standard specifies the minimum sizes, and the size relationships.
@hexa You're not spending your whole spare time with your wife I hope! :)
I was just kidding ;)
Atm I not working on nothing on my spare time
The minimum and maximum values are encoded into std::numeric_limits.
@hexa don't you have any ideas then? =)
anyway I have to fix this interrupt race condition volatile crap faggotry
20:09
@ManofOneWay I'm tearing apart my arcade machine in my spare time.
@0A0D why? just to put it together again? ;)
@ManofOneWay wife complains about the room it takes up in the garage :) So I am going to cut it down to just the controller portion and buy a really small form factor PC.
There are five standard signed integer types : “signed char”, “short int”, “int”, “long int”, and “long long int”. In this list, each type provides at least as much storage as those preceding it in the list. There may also be implementation-defined extended signed integer types. The standard and extended signed
integer types are collectively called signed integer types. Plain ints have the natural size suggested by the architecture of the execution environment44; the other signed integer types are provided to meet special needs.
(see full text)
@0A0D haha you and your wifes! =)
@ManofOneWay some day you too will feel the pain
20:12
@0A0D I guess. I'm moving together with my girlfriend this fall.
@0A0D A bit scary!
@ManofOneWay downhill from here buddy.. my advice, at my ripe age of almost 30 years old, is to do as much now before you have kids
Kids are overrated anyway.
@0A0D haha, you already got kids?
@ManofOneWay Yes, 6 y/o
@0A0D Well, it still must be great, even though I hope it will wait for a while!
20:15
@ManofOneWay Kids are awesome, just take up a lot of your time
@0A0D I guess you don't have to worry about filling your spare time then =)
@ManofOneWay what spare time
@0A0D hah
I hear you man, im almost 30 too, trying to get done as much as I can...
@0A0D Now that I'm a summer worker, I hardly manage write any code when I get home. It's not as fun when you have been coding for 8 hours..
20:17
@ManofOneWay I spend 10.5 hrs of my day at work. Luckily I have every other friday off
@0A0D where do you live? US?
@ManofOneWay Yes
1.5 hrs is roundtrip driving
I tried commuting programs, but there are no good bus systems here or commuter vans
@0A0D I'm hopefully doing my master thesis in the US
@ManofOneWay Hopefully somewhere exciting
@0A0D well, the gas is cheap over there
20:19
@ManofOneWay $3.62 / gal
I just spent $20 getting half a tank this morning
@0A0D I have a contact at IBM, but I'm a bit scared working at a big company.. Right now I'm working at GE. It's so many policies and rules, it very often restricts you in your work.
@0A0D gal, that's a crazy ass measurement. How many litres is a gal?
@ManofOneWay 1 US gallon = 3.78541178 liters
per google
so basically I got 21.5768472 liters for $20
So, one litre here (which is 0.26417 gallon) costs around 1.91754 U.S. dollars
here = Sweden
anyway, at which company do you work?
@ManofOneWay so it would have cost me twice as much to fill up in Sweden
@ManofOneWay Can't say :)
@0A0D secret? =)
20:23
It's a big one
@0A0D I'm a bit curious about the salaries over there. How much does a software engineer usually make from start? And also, after a few years?
@ManofOneWay It really depends...
I started at $30K
with a 4 yr degree and no experience
@0A0D you are talking salary / year now?
I make over twice that now
@ManofOneWay yes, annual salary
but that's for my area, other parts of the US make more, but the cost of living is higher
@0A0D How long have you been working?
20:26
@ManofOneWay 7 years as a Sw Engineer
@0A0D I saw a job posting at career.stack.. It was 95k$ and "only" required masters and 1 year experience
@0A0D It was in California
California has a high cost of living
especially LA
@0A0D I see
@0A0D Still, is it that much difference? Where do you live?
1
A: Why is the size of make_shared two pointers?

Howard HinnantIn all implementations I'm aware of, shared_ptr stores the owned pointer and the reference count in the same memory block. This is contrary to what other answers are saying. Additionally a copy of the pointer will be stored in the shared_ptr object. N1431 describes the typical memory layout. ...

@ManofOneWay Southern US
@ManofOneWay Salary will vary based on location normally
20:30
@0A0D Yes sure, it's the same here
especially if there are other engineering/programming related Companies around.. many places will want to be competitive
@0A0D I guess Silicon Valley is the best place to be
@ManofOneWay Depends... it is trendy and all, but I wouldn't live there. There are plenty of places all around the US where you can work and get paid well
@JohannesSchaublitb 121k? Crazy.. I've been a member now for almost 30 days and I'm having a hard time reaching 1k
20:32
@JohannesSchaublitb Crazy in a good way ;)
@ManofOneWay It took me one year to reach 1k. Then I decided to get serious about it, and here I am, a year later, with 7.5k.
@EtiennedeMartel yea, but how many badges do you have ? ;)
@0A0D Well see, maybe I won't even get into the US. I don't know how hard it is to get a working visa.
@0A0D 1g, 12s, 28b
20:34
@EtiennedeMartel me: 1g10s40b
@JohannesSchaublitb What's your secret?
I'm a Man Of One Way: Always up!
haha
you need to get some coffee on weekends and then troll all the time through the nights
@JohannesSchaublitb I guess a good thing must be to answer all kind of programming questions. Right now, I'm only answering Iphone / Objective-c ones. Even though I think I'm better at C++ and C. Usually though, there are a lot harder questions in C++ / C, and very often some crazy guy (like you) ends up answering them within 5minutes.
@ManofOneWay Stay out of those tags if you want rep
focus on obscure stuff to gain rep and look for old questions
@0A0D obscure stuff like what? =)
20:39
I went through last year and answered a bunch of activesync questions.. quickly gained rep, then answered some questions about DataGridView
@0A0D should I stay out of C and C++ you mean?
@ManofOneWay If you are not an expert, yes.. otherwise you will get downvoted if there is some nuance you don't know
i've gained 351 rep in the "secret features of C++" <- obscure!
@JohannesSchaublitb A funny thing though. If I was to ask a question like that, I would get down voted like hell..
You can cheat by waiting for someone like Johannes to come by and answer the question, then put yours with a twist.. you might get +1 rep out of it
20:40
@JohannesSchaublitb beacuse of my low rep
@0A0D That's cheating ;)
@ManofOneWay even high rep users ask stupid questions
@ManofOneWay I know. It does work, sometimes.
most of my questions are trolls
but people like the trolls
@0A0D How to find all these obscure questions?
20:41
"ah there must be something interesting here"
@ManofOneWay you just have to know... Like take web-scraping tag, there are 366 questions tagged web-scraping
@JohannesSchaublitb It's a bit sad though, if you look at for example Jon Skeet, probably a super smart guy. But his highest reps comes from obscure questions
but they don't get alot of answers
so you could be the man, go research those topics for people and get rep
@ManofOneWay It comes from C#
@0A0D I guess
@ManofOneWay Here, go answer this one before it is closed
3
Q: Uses of Java and C++

ArthurI have learned a bit of Java and C++ and enjoy certain aspects of both languages a lot. Since I am only in high school though I do not have much perspective on their actually uses outside of school. My question is this: What are the main uses of Java and C++ outside of school and why is one chos...

20:44
@0A0D haha
@0A0D It's closed
200 answers minimum for Gold
@0A0D This should have been closed for "non constructive" instead of "off topic"
that's difficult -.-
@EtiennedeMartel That's how I voted
it took the highest of the two votes
it would have been sent automatically to programmers, but you need 4 of 5 votes to send it there now, used to be 3 of 5
Shouldn't that guy get down voted for such a question?
20:46
I think it's a fine question
I mean, hasn't that question been answered 1212343434 times?
but that's just me
@ManofOneWay It was a good question
And what about googling it
But, it was not constructive
There is no single right answer
there's a whole wikipedia page devoted for the subject
and I just googled C++ vs Java
that question should have been moved to programmer.SE
not closed
You need 4 of 5 votes or a mod has to move it
flag it and forget it
20:48
@hexa programmer.SE ?
programmers.stackexchange.com
1
Q: Can a compiler inline a virtual function if I use a pointer in a clear situation?

somnockI've already read Are inline virtual functions really a non-sense? *. But I still have some doubts and found no the answers there. They say that if situation isn't ambiguous, compiler should inline the virtual function. However: This can happen only when the compiler has an actual object ra...

@EtiennedeMartel "Can a compiler inline a virtual function if I use a pointer in a clear situation?" what does that mean?
@0A0D I dunno, I was hoping someone would clear it up for me.
maybe you can get something out of this answer
20:51
Looks like a dup then
@EtiennedeMartel haha, I like your presentation: I also did some Java and PHP (even though I try to forget about the whole PHP thing)
@ManofOneWay Yeah, PHP is a bunch of patches glued together.
@ManofOneWay This is why you stay out of the C++ tag if you are not an expert :)
3
A: Can a compiler inline a virtual function if I use a pointer in a clear situation?

Johannes Schaub - litbIt doesn't matter whether B has any derived classes. In that situation b points to a B object so the compiler can inline the call. And surely any decent modern compiler can and will do that in your situation. If you don't use pointers it becomes a whole lot easier. It's not really an "optimizat...

@JohannesSchaublitb U nasty boy!
0
Q: difference between way a[i] and *(a+1) are handled

sunnyif char a[4]; is declared in as.c and as.c is included in zx.c where prototype is given as char *a; When both are accessed as *(a+i) why do we get error? Also if char a[5]; then array starts at location a such that a=&a[0].So variable 'a' contains address to itself or the first character of a...

20:55
@0A0D Interesting question, but should be rewritten.
The syntax is... messy, to say the least.
@EtiennedeMartel I fixed some of the formatting....
@0A0D I'm usually sceptic when it comes to answering 1 rep people. Very often they do not accept.
@Man just found that question on my minutely crawl of the c++ tag summary page
@ManofOneWay We all had 1 rep at one point.
@ManofOneWay I don't care about accepting
20:56
Except Jon Skeet. He started with like a million or something.
@EtiennedeMartel True, but the percentage staying at 1 rep is quite high.
@ManofOneWay Yes, but then again, SO follows a power law like every collaborative site.
The top 20% of the community answers the questions of the remaining 80%.
(I'm pulling that out of my ass)
@EtiennedeMartel haha =)
(But I wouldn't be surprised if it was true)
@EtiennedeMartel and the rest are just editors and spectators :)
20:57
@EtiennedeMartel well, your right, I'm just fed up with answering questions I don't get any response on what so ever.
@ManofOneWay As long as people upvote you, you get rep.
Even if you did not help the asker
Maybe you helped someone else who came by your answer after looking on Google.
1
Q: using memset to set an array of float to max val possible

KiarashI want to set the matrix of float to the maximum value possible (in float). What is the correct way of using memset() for this job? I learned memset works with char! and int is the input value! . float *matrix=new float[N*N]; for (int i=0;i<N;i++){ for (int j=0;j<N;j++){ mat...

sbi
sbi
@0A0D I have no idea what you're trying to tell me.
@sbi I don't either.. what are you talking about?
must of been an old conversation...
@0A0D Probably.

« first day (283 days earlier)      last day (4891 days later) »