« first day (200 days earlier)      last day (4731 days later) » 

12:02 AM
I actually wonder how it's possible in BrainFuck to know how much input you get
you only have one pointer, so I wonder how you can count anything that is not under the pointer..?
 
12:24 AM
it's surprisingly edifying to try to find an answer to this: I've already learned a few things I didn't know - like the existence of rosettacode.org, for example
 
 
2 hours later…
1:57 AM
0
A: Access c++ queue elements like an array

Fred Nurk Can queue elements be accessed like an array? Sure! Though you might call the code bad names... template<class T, class C=std::deque<T> > struct pubqueue : std::queue<T, C> { static C& get_c(std::queue<T, C> &s) { return s.*&pubqueue::c; } stat...

 
@FredNurk It doesn't work for std::queue<T, std::list<T> > ;-)
 
@JamesMcNellis fixed
 
I was just kidding; I already +1ed. I like it.
 
it's a nifty trick, one of those worthwhile to understand that you should never use in designing your own code
 
Tek
2:12 AM
Quick question. After using min_element to find the lowest and highest value in a vector. How can I delete the section that is lowest automatically from the vector and then return what's left of the vector afterwards?

I just wanted to check, is this correct?

float findLowest (vector<float> &scores)
{
float *lowestScore;

lowestScore = *min_element ( scores.begin(), scores.end() );

scores.erase ( lowestScore );

return &lowestScore;
}
I'm not sure if .erase() accepts pointers though...
 
min_element returns an iterator and vector.erase takes an iterator
float remove_lowest(vector<float> &scores) { float *x = min_element(scores.begin(), scores.end()); float lowest = *x; scores.erase(x); return lowest; }
 
Tek
Ah, I was somewhat close. Thank you very much
 
2:34 AM
25
Q: When will C++0x be finished?

Howard HinnantOk, this is the first question I've asked and I didn't know you couldn't answer your own question. Answer: March 25, 2011. :-) I'm not kidding, it's official. Well, at least as far as the committee is concerned.

anyone else agree those are duplicates?
 
2:49 AM
Sure looks like it
 
flag/vote-to-close as duplicates if you agree
 
Tek
@FredNurk I tried googling before asking but I wasn't able to find anything for this particular error: codepad.org/tvfbDqQ3
 
@Tek technically you should use vector<float>::iterator instead of float*
you also can't initialize the vector like that; codepad.org/pDuDMe7q
 
Tek
@FredNurk Thanks again, the specifics can be quite daunting for a novice sometimes :)
 
indeed
 
3:01 AM
@FredNurk I think "When will C++0x be finished?" is the best of the three, though: it has the most up-to-date information, at least.
 
we can always edit or add answers to the other
I didn't flag for merging because there's too much context for merged answers to make sense
 
 
3 hours later…
@FredNurk Not (at least) until Herbert Schildt does! (Okay, I'm not really sure of that -- his recent books might have been updated beyond that...)
 
6:32 AM
QThreadPool doesn't emit a signal when it finishes all jobs in the jobQueue. but I need to know it
e.g. I need to know when QThreadPool's jobQueue is empty
is it possible ?
QThreadPool::readyQueueSize() is It possible ?
0
Q: QThreadPool::jobQueueSize() ? QThreadPool::finishedJobCount()

Neel BasuIs there any way to know how many jobs it has finished executing ? e.g. why there is no method like QThreadPool::jobQueueSize() or QThreadPool::finishedJobCount() or QThreadPool::waitingJobCount()

 
Als
6:53 AM
@sbi: Morning GOM :)
 
sbi
@Als Good afternoon. Or is it Good Evening for you?
 
Als
@sbi: Still afternoon, Europe time is like 3.5 hrs behind Asia time
 
sbi
@Als Now you're pulling my leg. "Asia time". Your continent is the widest from east to west, and I'd be surprised if it has less that half a dozen time zones!
Where are you?
 
Als
@sbi: True that...I am in India
 
sbi
@Als Ah, I see.
That might also explain why your English is so good.
 
Als
7:01 AM
@sbi: Is it? I would say its understandable :)
 
sbi
I would suggest for c++0x to become a synonym of c++11. Please star if you approve.
Please star if you disapprove of c++0x becoming a synonym of `c++11.
7
Well, that's my vote gone. So please imagine one more star on approved. :)
 
Als
Starred...I think you are going to get lot of stars ;)
 
sbi
Dammit, you need a score of 5 in a tag to be able to suggest synonyms for it. So I can't even suggest the synonym.
@Als Wow. People actually disapprove. Why is that? Well, here's one user glad he had asked first...
 
7:17 AM
Why would people dissaprove?
Thats bloody odd
 
Als
@sbi: Grrr....I think that was me...It was a typo
You shouldnt keep approve or disapprove i believe
 
sbi
@Als What do you mean?
 
Als
I just breezed through reading and ended up thinking you made the same Q 2 times
just one word of approve and dispprove is the difference
Same has happened with others i think
Why not just keep a "Approve" Q and if people star it its done
@sbi: And WOW since it is moderated I cant change it back!
 
@hi to all
 
sbi
@Als Because you can't downvote?
@Als You can change your vote, but only for a few mins.
 
Als
7:22 AM
@sbi: Thats gone by :(
 
@any one know about appcelerator titanium
 
Als
@user652795: Hello
 
@Als hi
 
Als
Wow titanium...whats it about?
 
sbi
@user652795 I bet. If it has been created, there should be someone who knows about it.
 
7:24 AM
@Als its frmework
@sbi ya i know and i want to learn abt it
@if anyone here who help me for this
 
Als
@sbi: Check the stars...lol
 
sbi
@user652795 May I suggest you start by learning to type? Or is your keyboard broken?
@Als Yep, already saw it.
Well, let's do a small psychological experiment here...
I would suggest for c++0x to become a synonym of c++11. Please star if you approve.
20
 
Als
@sbi: I think you learned it right now ;-) My bet is its going to get more stars now :) ...wanna bet?
 
morning fellas
 
sbi
@Als Well, obviously my money is on the same horse as yours, so in order to bet we'd have to find someone insane enough to bet that the snail is gonna win. :)
@TonyTheTiger Hi.
 
7:31 AM
@sbi hi
 
Als
@TonyTheTiger: *pedantic roar ;)
2
 
@Als roar back right at ya :)
 
sbi
@TonyTheTiger Woah. I'm shaking to the bones in fear of the tiger roaring. :)
 
@sbi hehehe :P
 
Why would anyone disapprove of C++0x being synonymous of C++11?
3
 
7:37 AM
@StackedCrooked because we got used to c++0x
it just sounds cooler then c++11 I think :P
 
Oh ex.
Or how do you guys pronounce it?
 
sbi
@StackedCrooked Maybe because when I first asked it, the approve question was second on that list, and the disapprove one first. Then I reverted it (by creating the approve question anew, thereby making it lose several votes it already had). Let's see what will happen now.
 
Ok, but I'm still surprised by the current 6 votes of disapproval.
 
@StackedCrooked told you my reason...
that's one vote
 
sbi
21 mins ago, by Als
I just breezed through reading and ended up thinking you made the same Q 2 times
 
7:41 AM
do any of you guys ever spend time in another chat lounge on SO?
 
@TonyTheTiger Nope. Had a quick look in some, but that's all.
 
sbi
@TonyTheTiger What's wrong with you young people? You hang out here in the chat all day, didn't read Odysseus when you were boys, and now you can't adapt to a new term where this old fart does in a breeze?
 
@TonyTheTiger: There is anything outside this room?
 
sbi
@TonyTheTiger I've poked into a few to ask a question. Apparently some room(s) on meta (the tavern?) seemed as crowded as this one, and reading there suggested they have their memes, too.
@wilx Whoa! Another young person lost to the world...
You can come back out of your corner, folks, I'm done complaining about you. I swear I didn't want to scare you away. I won't do it again. Well, at least not today. OK?
 
When I enter a room full of strangers I usually feel like leaving quickly.
 
sbi
7:49 AM
@StackedCrooked While I can sympathize with that attitude, it makes it really hard to get to know people well enough for them to not to be strangers anymore. :)
 
Als
@sbi: Even at my best I would say I am reticent to enter a room full of strangers
 
8:02 AM
@StackedCrooked A room full of strangers is an interesting room...
@sbi yea I've poked into a few, but none are as cool as this one of course :)
gonna be out for a bit, need to reboot
 
8:18 AM
@sbi I tried to make it a synonym yesterday, actually. Turns out I didn't have the necessary 5 rep in c++11. That was pretty sad ;)
 
sbi
@jalf You are on top of that all-time user list! I think you had 14 rep when I looked this morning.
Anyway, I suppose we would just need to retag a few c++0x questions to c++11 to make a few of us having lots of rep in the c++11 tag. :)
 
@sbi :)
 
Als
8:35 AM
0
Q: project help pllzzz

samiiHi every one I have to made a project of C++ in visual basic 6.0 with GUI. The project is a examination database for student the functionality of this programme is that its add records and show records and print the clearence slip for student exams. i made some of its part but i can not able to ...

Whats up with people posting their zillion lines of code in a Question
 
@sbi wow, things have changed overnight then! Sweet :)
so as things stand atm, two people on SO are able to make it a synonym. Me and Anthony Williams ;)
 
sbi
@jalf I think that's because @FredN posted a link to your question in the night. :)
@jalf Yeah, and you're also the only two who can vote on it.
 
So, why all the "disapprove" votes for the synonym, btw? Seems pretty uncontroversial to me
 
@sbi no, it's because jalf added the c++11 tag to that question (23 hours ago) and then the cron job ran sometime later
 
I think I only got c++11 rep for the upvotes I got after the tag was added though
 
8:42 AM
@jalf: nope, it's retroactive
 
then how come I have 14 rep in that tag, but 15 upvotes + selected answer?
 
because you got one more upvote since the cron job ran
 
sbi
@jalf Aside from @Tony who admitted to being a conservative stinker :), I think it's mostly due to psychological reasons. At first I had the disapprove message at the top. When I changed that to the approve question to the top (by making a new one, thereby losing all the votes on the old one), this trend changed immediately.
 
changed immediately? approve was at 3 before, with disapprove at 5; now at 4-6 that doesn't seem so dramatic :)
 
@sbi thanks for reminding me that I'm conservative :P
 
8:45 AM
if I remember correctly anyway, no way to check timeline on that, that I know of
 
@FredNurk yeah but if it's retroactive, shouldn't I have something like 165 rep in the tag?
 
Als
Please star if you starred the disapprove of C++0x becoming synonym of c++11 by mistake.
 
sbi
@FredNurk Actually disapprove was at 5 stars and approve got reset to 0 when I changed their order. Since then. disapprove got one additional star, approve 4. I'd call that an obvious trend.
 
ah well, doesn't matter. I just don't get it :D
 
@jalf: "top users" in a tag is by votes, not rep. you have 15 upvotes (currently) in the c++11 tag, you've gotten one of those since the cron job ran, at which time you had 14 upvotes in that tag
@sbi yeah, it was at 3 right before you reset it
 
8:47 AM
ah right
Please star if you like starring things.
 
@jalf lol
 
Als
Darn I ain't getting any stars!
 
room topic changed to Lounge<C++>: My God, it's full of stars!
 
sbi
@Als You're not getting any stars since you're not a rock star (as I am). :)
 
huh, trying to star something says that its been disapproved by a moderator?
 
sbi
8:49 AM
@jalf You bastard! That was such a wonderful room topic!!
 
Als
@sbi: I hereby proclaim a star war on you!
 
sbi
@TonyTheTiger Did you try to star @jalf's message?
 
@sbi yea
who's a moderator around here?
 
you are :)
 
sbi
@TonyTheTiger Well, I clicked on "cancel stars", just to defeat @jalf's attempt to mess with starring. :) I didn't know it had that effect.
 
8:50 AM
@sbi oh lol :P darn :(
 
sbi
@FredNurk Actually, we are owners, not moderators. If that message really said moderators, it's wrong.
 
Als
@sbi: We want our stars back Uncle Faq!!
 
true enough, though owners act as moderators of the channel
 
@FredNurk oh I see
 
sbi
8:52 AM
@Als Well, @jalf's message has since got a star, so I suppose @Tony got blocked because he had already starred when I unstarred.
 
@sbi I think it must have done
 
@sbi: who knows :) I've stopped trying to figure out this chat system
 
sbi
@FredNurk No, we don't. For example, I can't remove any message here. As a moderator, I'd ought to be able to do that.
 
gimme something sane, like irc
 
@sbi yea but then you could mess with our minds even more :P
@FredNurk I concur! :)
so what does the flag for moderator do then?
 
sbi
8:53 AM
Oh bugger, someone revenged @jalf by removing all the stars from my original "star this if you approve" message.
 
is that for the meta police to see?
 
sbi
@TonyTheTiger That?
 
@sbi: that was me, figured two of them in the favorites list would be confusing
 
Als
Someone please change the rome name to Star Wars
 
sbi
@FredNurk Yeah, I got to admit you're right there.
 
8:54 AM
@sbi oh... didn't see nothing
@Als lol
 
sbi
@TonyTheTiger LOL! I was asking what you referred to!
 
Please star this if you disapprove of people disapproving of c++0x being a synonym for c++11
:P
 
Seriously, why wouldn't c++0x be a synonym for c++11.
 
@sbi :(
 
1 min ago, by Tony The Tiger
so what does the flag for moderator do then?
 
sbi
8:56 AM
@TonyTheTiger Oh, I missed that. Are you referring to the small flagging link on each message?
@jalf Changing such a wonderfully subversive room topic after only a few hours (in which the topic's victim very likely hadn't even seen it!) is much worse!
 
@sbi yes
 
sbi
@TonyTheTiger It will prompt all chat users (across all rooms) to vote whether that message should be deleted. It is this what sometimes makes this little blue number appear above your avatar to the left of the message typing pane. If you click on it, you get to vote.
 
Als
Darn I am using IE7 and I cant see starred messageges beyond the first two.
 
sbi
(This is how my picture of a dead kitten got deleted here once.)
 
@sbi that little blue number only appears for 10k users
 
Als
9:00 AM
@TonyTheTiger: We aint getting to vote for a few years then with these macho rep grandpas around lol
 
@FredNurk yea cuz I've never seen it
 
sbi
@FredNurk Ah, Ok. I didn't know that.
 
@Als heheh true, unless you get out your inner repwhore....
ok I hate things that don't make sense
 
sbi
@Als Works for me on IE9, and I'm pretty sure it worked on IE8.
 
@Als what's your window height? plenty of room?
 
9:03 AM
@sbi change it back then! ;)
 
Als
@TonyTheTiger: I did some rep whoring yesterday...almost reached rep cap and today im back to no rep whoring me :P
 
@Als hahah
 
Als
@FredNurk: I think i have a normal window size i have a 15' screen
Thanks for that link now i know whos winning the star wars!
 
@Als lol
 
room topic changed to Lounge<C++>: My God, it's full of star wars!
 
9:08 AM
who is crazy enough to even use IE?!!!
Funny Darth Vader hasn't turned up yet
 
haha, damnit
"Can not create synonym since the source tag c++0x appears more times than the target tag c++11"
 
sbi
@jalf Dammit, that's just plain stupid!
I suggest we flag the mods.
The approve message is no on par with the disapprove one, and even the most backwards conservatives (yes, I'm looking at you, @Tony!) can deny the obvious trend.
 
I wonder if anyone voted on that twice
 
@sbi lol
 
sbi
@FredNurk Huh?
 
9:16 AM
@sbi starred both approve and disapprove
 
When does abstraction become ridiculous or overused?
 
@TonyTheTiger: when you start explaining it in real-world terms
e.g. animals, shapes
 
@FredNurk I thought to some degree that was the point?
 
it was half in jest, "abstract" => "real-world" = ridiculous
but I think it fits rather well
 
sbi
1 hour ago, by Als
I just breezed through reading and ended up thinking you made the same Q 2 times
 
9:20 AM
@FredNurk lol
 
@TonyTheTiger Once its cost exceeds its benefits?
 
@StackedCrooked but how do you determine that? I mean it's a bit of a subjective thing? or am I wrong
 
I shouldn't mention I have a rather nifty rep, 5555, because then someone will upvote me
 
I used to be quite a the pattern nerd, but then I started C++ and learned there is more then just OO patterns and that sometimes they're really not needed, so where do you draw the line? Patterns are a form of abstraction, but they can be overused.
@FredNurk I almost can't resist
 
@TonyTheTiger Patterns are kind of missing language features. "This problem should be solved in that way, but since the language won't do it for us, we have to write boilerplate code that looks like this". But it's still basically copy/paste code that, ideally, shouldn't be there
 
9:25 AM
"Patterns", with a capital P, are good to give names so we can communicate
you can use them without using the exact code published in a book under some name, however
and part of that communication, including in things like books, is that we can spot common pitfalls or advantages
 
@TonyTheTiger I would think that once you eliminated (almost) all duplication from you code, then you have achieved a sufficient level of abstraction. Going beyond that may be overdoing it.
 
eliminating duplicated code isn't the end measure of readability
depending on how they're used, a = b = 0 could be more or less readable than a = 0; b = 0
 
@FredNurk I'm talking about abstraction, not readability.
 
However, what I just said is something I came up with now. Actually, I don't really know.
 
9:29 AM
when abstraction gets too much though, readability is also sacrificed at times IMHO
 
@StackedCrooked: what is "a sufficient level of abstraction"? at a glance, I'd say that's code that 1) works, 2) is readable and clear enough that it can be reasonably maintained
I think everyone (who is talking right now) here is familiar with over-engineering, i.e. sacrificing #2
 
@FredNurk That would be a definition of good code, not per se abstract code. For example boost function is very generic (thus abstract), but the code isn't very readable.
 
@StackedCrooked I was defining "sufficient level of abstraction" rather than "abstract code"
 
I'm just saying abstraction and readability are two different things. I don't understand why there is this discussion.
 
I quoted "sufficient level of abstraction" from you; I guess I'm confused what you meant too
 
9:47 AM
Know Qt??? in VB there is data type BYTE, what could be is equivalent in Qt4.x
 
I don't know if qt has a special type, but c++ has char for bytes
 
sbi
@FredNurk Usually, unsigned char is used, though, as char might either be signed or unsigned, depending on the platform.
 
uchar might be better, but I think char is more often used
 
sbi
May I form an invalid pointer in C++? That is, is it UB to write char* blah = static_cast<char*>(0x42), or is it only UB to then go and attempt to dereference that pointer?
 
you can't static_cast, but you can reinterpret_cast; the results are implementation-defined, but assigning it to blah isn't in itself UB
 
sbi
10:02 AM
@FredNurk Ah, thanks. I thought so, but since this is for an application, I though I'd better ask.
 
usually it will be UB to dereference the implementation-defined value, of course
 
a server program is looking to come BYTE type data at VB, could i give him char , could it work?
 
a program, as in a separate process? any form of IPC or network IO will work fine with chars
if it's a library function you're calling, instead of another program, then you have to match the signature it expects
 
ok, even if my program is in Qt, and in sending request with a char type to server, which is in VB and looking for byte????
ya, both on different machine.
 
network IO works fine with chars, you simply need to make sure you have the right values in the right order
 
10:09 AM
@FredNurk, ok, thanks
 
sbi
10:23 AM
@anjali By definition char, unsigned char, and signed char are of the smallest addressable size for the current platform. On many common platforms, including Windows on x86 and x64, that's 8bit. I don't know what BYTE in VB is defined to be, but since VB is pretty much locked into Windows, and Windows is pretty much locked to Intel hardware, I suppose it's always 8bit, too.
Urgh. Who revived @GMan's old poll?
 
@sbi not me
 
@FredNurk I think that c++ has <stdint.h>'s unit8_t for bytes.
 
sbi
@TonyTheTiger I did not ask who did not do it. :)
 
@sbi I didn't do it either! ;)
 
@sbi :P
 
10:30 AM
@ChrisBecke that's a typedef for uchar, at least on common machines; but the header is C, and is only available in C++ if your implementation makes it so
 
and what about VC++ BYTE?
 
what is VC++ BYTe?
 
strongly implies however that QT is only implemented on platforms where a char is 8bits.
 
@ChrisBecke since they use char there, I'd be surprised if they have a different byte type
 
i mean if the other program is on VC++, and lookinf for a BYTE type?
 
10:32 AM
Im pretty sure that a byte is 8bits regardless of platform
 
cpx
@anjali It is a typedef of 8-bit unsigned char.
 
and the VB BYTE is thus an 8bit quantity always.
 
sbi
@ChrisBecke That is an 8bit int type. This will likely be unsigned char for any platform with a byte size of 8bit. (It could be unsigned short, though, if that happens to be 8bit on some platform.) Since according to the C standard bytes must not be smaller than 8bit, std::uint8_t should always be of byte size.
 
@anjali what does "on VC++" mean? what is the BYTE type for that program?
@ChrisBecke a byte is not always 8 bits; however, many people, myself included, will sometimes or always use it to mean 8 bits
 
because 'octet' sounds silly
 
10:34 AM
@FredNurk Do you mean a "char", as in a c/c++ defined thing? or a "byte" - being a generally used term in computer science to refer to 8bits
 
@FredNurk written in VC++
 
I mean byte
 
@anjali Where by VC++ you mean a C++ program you want to compile with Microsofts Visual C++ compiler?
in which case there is no BYTE in C++, or even VC++.
except, I lie, if its a windows program, there is a BYTE type defined.
#include <windows.h> will define a number of types, including BYTE i'm sure.
Your question referenced Qt, which uses the c++ "char" type to refer to 8bit quantities.
 
i mean a code written in Microsoft Visual C++ code editor
 
Qt also uses a (signed) int, to represent array indexes and sizes where c++ would use a size_t
@anjali The editor that c++ code is written in is not relevant to how the c++ ultimately will be interpreted.
 
10:39 AM
so when do you use std::uint8_tand when do you use unsigned char?
 
c++ itself is a multiplatform language, and its basic types: char, int, etc. have implementation defined sizes.
 
std::uint8_t doesn't exist
@TonyTheTiger but if it did, it'd likely be completely identical to uchar, so that question wouldn't even matter
 
@TonyTheTiger You would use uint8_t if you were writing portable, c99 dependent, c++ that should only build if there was an exactly 8bit unsigned data type.
 
@FredNurk so what is @sbi talking about then?
 
@TonyTheTiger I missed that; looks like nothing more than a typo, imagine "std::uint8_t" there as "uint8_t"
 
10:44 AM
You would use "unsigned char" when you were writing portable c++ and wanted an explicitly unsigned type that was guaranteed to be greater or equal to 8bits in size.
 
@FredNurk seems like my question was already asked on SO before
6
Q: uint8_t vs unsigned char

OxinaboxWhat is the advantage of using uint8_t over unsigned char in C? I know that on almost every system uint8_t is just a typedef for unsigned char, so why use it?

 
You would use a CHAR, or UCHAR, or BYTE, when writing Windows API code, that needed an exactly 8bit signed or unsigned field.
And you would use "char" to represent an (exactly) 8 bit field when programming against the Qt framework. As Qt only builds on platforms where the c++ char type is 8bits,
 
it's tagged c however, so I guess it's more of a C construct
 
Als
Hey Guys some help needed here....
0
Q: Help needed for implementing a thread Monitoring Mechanism

AlsI am working on a multithreaded middleware enviornment. The framework is basically a capturing and streaming framework. So it involves a number of threads. To give you all a brief idea of the threading architecture: There are seprate threads for demultiplexer, receiveVideo, DecodeVideo, Displa...

 
so, your choice of type, and its meaning, all depend on how portable you want your c++ to be, and what frameworks you are programming against.
 
10:50 AM
@TonyTheTiger The difference is that in C++ you should include <cstdint> instead of <stdint.h>. I don't think it's wrong to use them in C++ because it documents your intent (as mentioned in your post).
 
@sbi The c standard also stipulates that the minimum size of a (unsigned) short int should be 16bits or larger. So I suspect that uint8_t simply will not exist at all on systems where char is greater than 8bits as <stdint.h> is requried to implement its types in terms of the underlying native types: char, short int, long int etc.
 
@StackedCrooked sure
 
sbi
@ChrisBecke Ah, I considered whether short should be at least 16bit, but didn't know. I stand corrected then: uint8_t (is it really not in the std namespace??) must then be unsigned char. (Well, it could probably be char on platforms were char is unsigned, so one shouldn't assume unsigned char.) Thanks for posting this.
 
@TonyTheTiger I might be mistaken, <cstdint> is only available for C++0x it seems. So you'd have to include <stdint.h> after all.
 
@ChrisBecke good point
 
10:57 AM
@ChrisBecke Do systems exist where char is greater than 8 bits?
 
@sbi in current C++, uint8_t is either provided by the implementation (where using the C header puts it in the global scope, and you can't rely on it being in std or, really, even existing) or a library such as boost (which isn't supposed to add declarations to std)
@StackedCrooked yes, though they're nearly irrelevant today; en.wikipedia.org/wiki/Byte#History
I remember a better wikipedia article about that, but can't find it
a bit more info, but not what I remember: en.wikipedia.org/wiki/…
The Super Harvard Architecture Single-Chip Computer (SHARC) is a high performance floating-point and fixed-point DSP from Analog Devices, not to be confused with Hitachi's SuperH (SH) microprocessor. SHARC is used in a variety of signal processing applications ranging from single-CPU guided artillery shells to 1000-CPU over-the-horizon radar processing computers. The original design dates to about January 1994. SHARC processors are or were used because they have offered good floating-point performance per watt. SHARC processors are typically intended to have a good number of serial links...
 
sbi
@FredNurk That you?
 
is that my site? no
I answer far, far more than that guy :)
 
11:54 AM
@StackedCrooked I have no personal knowledge of systems where C implemented chars > 8 bits other than the passed down knowledge of the ancients that on at least one RISC architecture, char, short int, int and long int were all implemented as 64bit machine words: as were float, double and long double. It was a 64bit machine, with a 64bit compiler :)
 
Hello
 
cpx
hello
 
I'm kinda new to C++ ( used it sometime ago ) and i still don't know any equivalent to Java's parseInt in c++? Is there any?
 
cpx
In c++, you can use std::stringstream.
 
@Robik Or boost::lexical_cast<int>(myString);
 
12:02 PM
boost::lexical_cast, though I don't know all what parseInt offers, such as different bases
 
@StackedCrooked I've heard about two kinds of machine with char greater that 8 bits. Both are word addressed machines. There is the historical one where a char was part of a word and words where non power of two and they are also the justification for the possibility of pointers of different size. Then there are more recent -- perhaps still current -- DSP and char there are the same size of a word.
 
@StackedCrooked: the other way 'round? :)
 
@FredNurk Damn.
 
Or something like this: std::istringstream iss(myString); int number; iss >> number;
 
12:04 PM
And I seem to remember that Crays had models where everything was 64 bits.
 
@AProgrammer Thanks for the info!
 
@Robik: int parse_int(std::string const &x, int base=-1) { assert(base == -1 or base == 8 or base == 10 or base == 16); std::stringstream ss (x); switch (base) { case -1: ss.unsetf(ss.basefield); break; case 8: ss << oct; break; case 16: ss << hex; break; default:; } int n; char c; if (!(ss >> n) || s.get(c)) throw std::runtime_error("could not parse int"); return n; }
I guess you might want to unset ws too
 
@FredNurk Could yo uuse Fixed font? ^^
 
the font doesn't affect the parsing functionality
 
@StackedCrooked Trying to be "native" ^^
 
12:14 PM
@Robik stringstreams, boost.lexical_cast, and strtol are all "native"
 
Boost?
 
cpx
@FredNurk maybe he meant the code format.
 
@cpx it's hard to format code on multiple lines in this chat
'sides, it's not like we're talking python :)
 
sbi
@FredNurk You might want to read the newbie hints to see how you can post code here. It's actually pretty simple.
 
1:03 PM
I don't have the energy to learn a new text input system, especially for something (chat) that's supposed to be somewhat relaxing
 
@FredNurk lulz, it's not like learning C++, you know
just put back ticks ` when you want the code font
argh, why are people not as conservative as I am? the votes to approve have gone higher then the dissaprove
 
@TonyTheTiger Because only numpties would think they shouldn't be synonyms.
 
apparently we have six numpties in our midst
 
@FredNurk I like being an numptie then
 
@FredNurk did sbi manage to unstar his implicit vote required to create the poll?
 
1:20 PM
I don't know
 
1:34 PM
hi @DavidRodríguezdribeas
 
sbi
@FredNurk Well, a few of them will have starred the first "star me" message they saw without reading correctly. (The disapprove one used to be atop at first.)
@ChrisBecke No. That's another vote to disapprove you would need to subtract.
 
@sbi so, just 5 numpties then
 
@TonyTheTiger C++0x was always a temporary name because the actual year of release was not known yet
 
@StackedCrooked I know, but I'm being part of the Resistance
 
La Resistawnce
 
1:44 PM
@TonyTheTiger Good luck resisting then.
2
:)
 
@TonyTheTiger don't they die at the end of the movie, though?
 
@StackedCrooked whoever said that "resistance is futile"?
 
@FredNurk lol, perhaps they do, but they die knowing they fought for a cause!! ahahah
 
@TonyTheTiger apparently not who I thought: The phrase is used by The Master in the 1976 Doctor Who episode "The Deadly Assassin"
 
1:47 PM
@StackedCrooked I am the borg, you will be assimilated
 
@TonyTheTiger That's also futile.
From a nihilistic pov.
 
sbi
@ChrisBecke Four at most. @Als admitted starring disapprove in error.
 
I particularly like the "nihilism" subreddit: reddit.com/r/nihilism
 
@StackedCrooked nihilism is futile.... it will be assimilated
@StackedCrooked empty page?
 
@TonyTheTiger As it should be.
 
1:50 PM
@StackedCrooked lol
 
I think the "yes" command should output "No!". that would be much funnier.
 
@StackedCrooked awful lot of code for an empty page..
 
@TonyTheTiger We are the Borg. You will be assimilated. Resistance is Voltage divided by Current.
4
is the correct quote :P
 
@ChrisBecke Oh boy.
^ Probably taking it a little too far..
 
@StackedCrooked Pity I can't read the blog. Did a similar thing by leveraging off of the Windows Fiber API
 

« first day (200 days earlier)      last day (4731 days later) »