« first day (198 days earlier)      last day (4964 days later) » 
00:00 - 12:0012:00 - 00:00

12:00
So volatile can be applied to member functions, too. Didn't know that.
2
yep
@GrigoryJavadyan oh wow, nice I learned something! :)
sbi
sbi
12:18
1 hour ago, by Tony The Tiger
maybe we should change the room topic to: Where C is not a subset of C++ LOL
@TonyTheTiger I had a hard time restraining myself. But the current topic is good (it's mine, after all), and not even 24hrs old.
Well, after two hours reading a computer magazine while the screen showed various types of update progress messages, and a much needed lunch break, I'm ready to start working.
Did I mention I hate rebooting?
Oh, and FF lost its session somewhere in between, so I had to revert to a 2 months old session with no tab groups. <sigh/>
hello anybody there ?
@sbi lol, twas merely a suggestion :P
@sbi wow, crazy updates.... maybe do them more often? so you don't have to wait that long?
@sbi yes you mentioned it several times :)
@sbi ugh, the sheer frustration
@Kartik yes lots of people here :p
@TonyTheTiger : i want to compile and run c++ programs online.. can you help me ?
I have tried ideone.com
but i dont know its not running my c++ program.. alys giving me an error
Xeo
Xeo
ideone.com, codepad.org
are the most popular
link?
@Kartik what error?
12:27
Is there a channel with Windows/Win32 API help?
@Xeo @TonyTheTiger : prog.cpp:1:22: error: iostream.h: No such file or directory
prog.cpp: In function ‘int main()’:
prog.cpp:14: error: ‘cout’ was not declared in this scope
@wilx not that I know of, there is SO proper though
Ok. Thanks.
Xeo
Xeo
@Kartik <iostream.h> is outdated and deprecated, don't use it. use <iostream> instead
@Kartik should it not be std::cout?
12:28
@Xeo : what should i try ?
Xeo
Xeo
@Kartik <iostream>, without .h
Xeo
Xeo
and cout, cin etc live in namespace std, so it's std::cout
sbi
sbi
@TonyTheTiger And here I thought the standard answer to "anybody here?" would be "no!"
@Kartik Whatever book you're learning C++ from: trash it immediately and get a good one.
2
@sbi yes I concur!!! :) :)
12:31
@Xeo thanks..its working now. @TonyTheTiger
Xeo
Xeo
lol multi-fredding ...
@Kartik Don't do that with unions.
sbi
sbi
@Xeo ...and overtoning!
@CatPlusPlus : i was just trying some code from some C++ book...
m not good enf in C++
sbi
sbi
@CatPlusPlus I already said so (when I advised to trash the book). :)
@Kartik Trash the book.
12:33
@sbi Oh, sorry, missed that.
@sbi we really aren't here, just creating an illusion
2
@GrigoryJavadyan Well, I should have written POD. One pitfall when putting volatile on class type (such as the previous example where volatile was put on a block scoped variable otherwise unused) is that volatile is not taken into consideration for the constructors and destructor (just like const).
@sbi hahahah
@sbi is it the static that's wrong or what is wrong?
sbi
sbi
@Kartik Typing doesn't seem to be a strength of you either. Anyway, you won't get any better in C++ unless you get yourself a good tutorial.
@TonyTheTiger You can reliably read only the last member of the union you wrote to.
Xeo
Xeo
12:34
Wait @Piotr changed his/her name like @Tony did to accomodate his/her avatar?
sbi
sbi
@CatPlusPlus That was a joke!
@Xeo seems so
sbi
sbi
@Xeo His name is Piotr, and yes, he did.
Xeo
Xeo
@sbi That's what I wrote
life is all about creating illusions that you're doing something... lol
12:37
I went crazy with profile editing.
Because being serious is boring.
Xeo
Xeo
> I hang out in the Lounge<C++>, which is full of cool and smart people who like to discuss sestuff.
hmm, strike through doesn't seem to work here
0
Q: [Win32] Creating a process attached to a console but with redirected standard IO handles

wilxI have a command line application that executes other programs according to a user provided script. Some of the executed child processes are cmd.exe running various .cmd scripts. Some of the .cmd scripts are setting the console window title using the title Windows shell command. And here is the p...

Just in case anybody here actually does Windows. :)
there's no relation between .NET and COM, at least not directly, right?
@DeadMG no, not directly
Xeo
Xeo
@DeadMG Aren't they like, completely different?
12:42
COM is a binary interface for interprocess communication
.NET is a framework
yeah, that's what I said
@DeadMG then you were right
Xeo
Xeo
geh, I'm somehow really sleepy...
it was my understanding that .NET was basically built to replace COM for certain use cases and wasn't at all built on COM
Xeo
Xeo
hok, see you later
12:44
@DeadMG no, not necessarily, .NET is just a framework that is used by certain languages
COM is just a binary IPC mechinasm
they are not related.... MS has a specific implementation for COM
sbi
sbi
@Xeo No, it wasn't, you revisionist! :)
@DeadMG I thought that as well. They ended up being two co-existing technologies.
Like the WinAPI which is still used today. I wouldn't be surprised if it outlives .NET.
13:05
I think I would
Someone knows how to activate the /clr option on VS 2003. It throws this error when tryin to compile.

managed targeted code requires '#using <mscorlib.dll>' and '/clr' option


I've already included the using statement, but cant find where is the /clr option. Ive checked the project properties, but didnt found it.
13:23
that's because Managed C++ as it existed then sucks
and it got completely overhauled for VS 2008/10
/clr is targetting .NET framework option
@DeadMG so no options for vs 2003??
well I don't know here to find the option for 2003, but it should be in the project properties
@DeadMG cant find
just ask MSDN
To set this compiler option in the Visual Studio development environment

Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
Click the Configuration Properties folder.
Click the General property page.
Modify the Use Managed Extensions property.
@DeadMG ive modified, but cant see any diference
it has the options to change from no to yes.
just that
13:26
then change it to yes
what else are you expecting?
either you're using .NET or you're not
Managed C++ is crap. Better upgrade the compiler and use C++/CLI if you need that.
@DeadMG thats what ive done. but nothing changed.
i think im gonna migrate to vs 2008
ok, let me wait 10 billion years for building solution. AGHH!!
13:42
@DeadMG it didn't get overhauled, it got replaced with a completely different language
I never used it so
so @cyberrog you'll have to make some changes to your code, most likely
maybe this

[assembly:System::CLSCompliant(true)];
[System::CLSCompliant(false)]
 
1 hour later…
15:03
I'm not really sure how to put it, but if you go back and forth more than twice, you really need to post a question on SO and have it answered formally.
Als
Als
hmmmm
15:21
It's in good faith. That it benefits society and tips the effort.
 
1 hour later…
16:40
argh
trying to do work for uni but their servers are down :(
Today I spent four hours creating a simple table using Win32. It was a nightmare.
All these structures and weird pointers and casting and untyped messages...
yeah
I can imagine
16:58
Yes, Windows API can be painful
First Win32 lures you with a simple MessageBox example, but it goes straight downhill from there!
Do we have a chatroom specifically about Win32 ranting?
Yup, I remember trying to code a GUI with WinAPI when I was like in 7th grade. It was hell, ended up writing my small game in visual basic instead :)
@DeadMG I believe knowledge of both C and C++ is necessary for a decent programmer... And teaching C before C++ means the students will have better understanding of the reasons behind the concepts like RAII, or templates, or error handling via exceptions.
It also means they will write programs full of bugs without realising it.
everyone understands the concept of forgetting to do something
RAII stops you from forgetting to free a resource
it's just that simple
nobody needs education in C to understand that
@FredOverflow why?
17:06
Because as soon as you touch pointers, you enter a minefield of Heisenbugs.
people should be taught the best practices from the very beginning
they need a clear message
Could someone downvote me once, please.
I don't need to deal with the execution pointer at assembly level to know that functions and loops are good things
I would not necessarily say "best practices from the beginning", but more like "start high-level, write useful programs, then go low-level and understand how stuff works inside".
@CatPlusPlus: Link to one of your questions and I will do so
17:08
@FredOverflow I prefer learning how stuff works from the bottom up
teaching more error prone strategies after you learn the ones that work the best is one thing
@DeadMG stackoverflow.com/questions/5850243/… will be fine, nobody likes that anyway. :P
teaching them before is another
ok, you have been downvoted
Also, I don't see how dealing with pointers has anything to do wityh teaching C before C++ :)
@GrigoryJavadyan And that probably works very well for you, but I would guess that most beginners are better off learning top-down.
17:09
Thanks.
And now everything is right with the world.
@GrigoryJavadyan You don't need pointers in C++ nearly as much as you need them in C to write interesting, useful programs.
@Grigory: because people should be using references instead most of the time
@DeadMG Or values ;)
true, but I don't think they even vaguely serve the same use case :P
@DeadMG std::string vs. char*?
17:11
that's a unique case
std::vector<T> vs T*?
@Fred yes, that is true, but it does not mean that anyone who was taught C prior to bein taught C++ will overuse pointers in his C++ programs
only if you actually need an array
std::vector<T> is only a fine replacement for T* if you actually need, you know, a dynamically resizable array of T, instead of a single T
@Grigory: That's true- but it does increase the risk
not that I find raw pointers to have a large use case in C++, but they certainly do have some uses
17:25
0
Q: Should i use Java or C or C++ or D or Lua or just wait? For those features to have all in one language?

IamSon0fRajaWhich single language i can use for Cross platform, to write once deploy many (example: java compile and build once, deploy many platform)? Can i do those with C? or what else out there, which can allow me to do this following: Low latency audio/video framework (JMF/JavaSound have no future) J...

Is that guy serious? Waiting for a language, LOL.
"OMG, I have to write a program for a microcontroller! Should I use C or Java?! I'm in doubt!" :))
I'd use whitespace =P
17:50
even y'all
@CatPlusPlus how are you? Incrementing are we?
@TonyTheTiger Lazy, as usual.
@CatPlusPlus I've been pretty lazy lately, but I'm getting back to normal again
so going better
18:07
on being lazy... My essay on operating systems is due in two days and I haven't written anything yet :)
@GrigoryJavadyan I'd get started if I were you
18:46
@GrigoryJavadyan : Just start writing.
Eventually something will come out.
Then take that idea, and see if you can verify it or disprove it.
One of my best essays was when I was just blurting out stuff, thought I found something good, then in my research found out I was completely wrong. Then my essay was about how wrong the assumption was.

Had to do with the American-Chinese economic situation.
I had assumed that the Chinese had stopped developing because of economic reliance on American trade and artificial lowering of their money.

However, the slow-down occurred earlier.
Discovered a lot of the technology that we think Europeans came up with, was actually delayed co-inventions. The Chinese had it way earlier.
19:24
i have a question about c++ , can someone please help me?
yeah
I've heard of a bunch of people, they help people with C++ questions
you could try stackoverflow.com
Not in our best mood today, are we @DeadMG?
I think that was a perfectly reasonable response
19:46
So we don't need floats?! Never thought about it but integer division is quite a nasty thing..
Yay, I'm in the interpreter vs compiler argument on IRC!
uh
@Nils
you know that just links to a bunch of comments and not an actual article, right?
@CatPlusPlus where at?
@Nils Integer division behaves pretty much as expected for me.
yeah the top link is referring to a guy calculating that the whole universe can be represented by coordinates using 128bit ints
@StackedCrooked but slow?
19:50
@Nils not that I'm aware of.
@FredNurk Not worth mentioning. And not in English, although I tend to switch to English when I'm angry. It's not healthy, really.
I'm talking about native ints though, I'm not sure about 128-bit integers.
heh
@CatPlusPlus one thing that's good and bad about irc is how disconnected it is, so was mostly just curious; I wind up regularly on about 5 different networks
@FredNurk I sit only on Freenode these days.
yeah now that I think about it it should not be slower, unless there is special float hardware
So the price of 128bit ints would be basically twice as much mem bandwidth compared to double?
and that's it?
19:55
lulz
there is special floating-point hardware
but also special fixed-point instructions in various CPUs; x86 still has BCD instructions as a holdover from the 80s, iirc
SSE operates on 128bit values.
@Nils there is a book that has great info on how this lower level stuff works, like floating point integers and some nice other tricks
19:57
why link me to a link?
@DeadMG who linked you to anything?
nils
@Nils Basically, floating point division is integer division, with a subtraction (of the exponent) happening in parallel. There is a normalization step afterwards, but it's not terribly difficult. In some cases FP has an advantage if you only need a rough approximation of the result (you can approximate using only the exponent).
he linked me to a comment thread with a link to an article
@DeadMG lulz
19:59
@FredNurk Sort of. If you start with something in BCD, you can operate on it using normal integer instructions, then there are a couple to handle converting that result back to BCD (e.g., AAA -- ASCII Adjust after Addition).
The FPU can also convert to/from BCD, but doesn't use it internally.
@JerryCoffin thx for the comment
@TonyTheTiger thx
But you would not loose much when switching to 128bit ints except that it needs twice the memory bandwidth and the calculation would need to be done with more bits.. is that correct or are there more complications?
well, you'd have to emulate in hardware that doesn't support natively
i.e., all of it
@Nils Implementing it would be pretty easy, yes. Using it well for a lot of calculations would be an entirely different story. Floating point actually works pretty well for a lot of "stuff" that would be very difficult to handle with integers.
like..?
I think that's what I don't understand here..
I need to be working, but the university server is down :(
20:05
The fact is that for almost anything dealing with measurements, FP works out pretty well. Yes, when you get a long ways from the origin, you lose precision -- but for most purposes, that's fine. For example, when I'm dealing with wavelengths of light, I measure in very small increments because wavelengths of light are very small. When I'm measuring the distance to another star or galaxy, I use something like light-years -- measuring in wavelengths of light would be meaningless.
Either way, however, I get (for example) around 15-20 places after the decimal point, which is plenty for most measurements. Now, it's true that if (for example) you wanted to create a map of the universe, that wouldn't necessarily work out very well. It's also true that few people do such things most of the time.
ok
Interesting I solved problem 165 on projecteuler (codepad.org/R79KZ4lU) a while ago using boost's rationals maybe I should do this with float too just to see which one is faster..
or which one I could tweak faster
From the other side, while integer calculations give uniform increments, they make it difficult to deal with extremely large ranges unless you use really large representations. Looking at those same things, if you used integers you'd just about have to apply a scaling factor of some sort externally -- even a 128-bit integer isn't enough to represent the distance from here to a distant galaxy in terms of wavelengths of light. With normal floating point, I get a range of +/- e+308, which does.
Now obviously when I get to large distances, I no longer get wavelength of light precision, but I can still pretty easily use a single unit for all my calculations (e.g., using the meter as my unit throughout).
20:24
so.. what would you use for problem 165? I used rationals, because I wanted to be sure that my result is correct, but u can get it correct using float if you choose epsilon right (some people posted that in the forum u get access to after completing the problem)
@Nils Could be interesting, but I'd caution that floats are really primarily for dealing with measured quantities. They can be used for other things, but some of the other purposes can be somewhat questionable.
@Nils I'm not really sure which I'd use for that problem. At least in theory, rationals are the "right" to use, because you're dealing entirely with ratios of integers. I'd expect, however, good enough accuracy from FP, probably in less time (especially given the dedicated hardware in any modern CPU).
ok
@Nils The whole universe can be represented by coordinates using 3 bits, representing the quadrants. Positive side contains zero.
20:45
eve online, a moderately popular mmorpg, uses floating point for currency...
I expect they use it in many other places, such as coordinates in and of their solar systems, etc., which is relevant given the universe context of that HN discussion
@FredNurk 64-bit (or more) floating points I would hope.
Xeo
Xeo
@FredNurk WoW uses signed 4 byte integers, funnily enough
Oh, it's just for currency.
Then floating point seems weird choice.
Xeo
Xeo
the maximum gold you can carry is like 2147483 gold 36 silver and 47 copper
@Xeo but doesn't WoW (I've never played) use 3 values? gold, silver, bronze, or something?
20:51
Why the 36 silver and 47 copper?
yeah
or I guess from the maximum, they use a single value and divide it prior to display
yeah
Xeo
Xeo
well, it's like 2147483647 copper, but 100 copper are 1 silver and 100 silver are one gold, so it turns into 214748 gold 36 silver and 47 copper
2 **32 = 2147483648 => 2147483 * 1000 + 648
Xeo
Xeo
20:52
woops, there was a 3 too much
wow fairly mathematical discussion going on here
this isn't maths :)
So the currency is stored as copper.
Xeo
Xeo
yeah, but I find it funny
no it's floating points and copper :P
Xeo
Xeo
20:53
signed 32 bit integer
curious why they wouldn't use unsigned#
Can you have negative currency?
Xeo
Xeo
nope
it's not like you can have minus money
Xeo
Xeo
that's what's wondering me
20:54
@StackedCrooked when you're in debt :P
@StackedCrooked they mix c++ (or maybe just c) with python and lua; and afaik lua only has one numeric type (a floating point), so that probably affects the choice
Lua's only numeric type is double
I haven't played eve in ~4 years, so I may be way off
Xeo
Xeo
but on some emulation servers, you could still get gold past the signed 32bit int limit, but couldnt buy anything anymore. on the unsigned limit, the value would wrap around
and you'd have 0 again :)
Perhaps it's signed for safety reasons. If someone managed to get -1 courrency he would suddenly be a billionare.
20:56
@Xeo "I'm rich!" "here, have another 42 coppers" "ohshi--"
@Xeo That would SUCK :D
Xeo
Xeo
@FredNurk Well, it's not like you could do anything with that much gold .you couldn't buy anything.
@DeadMG Section 6.3 I only use unsigned when I have to.. developer.download.nvidia.com/compute/cuda/3_2/toolkit/docs/…
after reading Google's style guide, I'm not going to put any faith in a guide just because it's from a large coporation
2
especially as it's for a technology and language that I'm not using
read it before complaining
:)
20:59
why would I do that?
it's referring the c standard
you've quoted a document but provided no reason for me to believe in it's recommendations
and the C standard, who gives a shit? this is C++
Unsigned integers requires one to be extra careful though. For example in a Tetris game, you are allowed to move the current block to the left until the x coord is 0. When using unsigned this simple algorithm can easily go badly wrong.
@DeadMG 6.3 there is short and makes sense
It's easy to do it wrong, if you're inexperience, or not paying attention
21:02
EVE doesn't use Lua, AFAIK.
They do use Stackless Python, of that I'm sure.
@StackedCrooked: How is -1 a worse scenario than having it wrap? they're both nonsense
All damn day to find a signed / unsigned comparison bug. It wasn’t for nothing java removed unsigned…
@DeadMG @DeadMG while (x >= BOUNDARY_LEFT) doesn't really work if x is unsigned and BOUNDARY_LEFT is equal to zero.
while (x < std::numeric_limits<unsigned>::max())
all that's demonstrated is that you can't blindly insert unsigned
21:09
@DeadMG And occasional blindness is a fact of life, except for the perfect programmer.
No C++ type thinks for the programmer, and mistakes are bound to happen regardless of the type used. :P
that's pretty much my point
If it weren't for the annoying signed/unsigned comparison warnings I'd always loop with an int.
@StackedCrooked agreed.
@CatPlusPlus Avoiding error-prone code isn't a bad thing.
21:11
@StackedCrooked Of course, that's why we don't write C.
@CatPlusPlus Among other things, yes.
And you can always use arbitrary-precision integers and not worry about overflows. ;)
I just spent whole day figuring out that UpdateResource() capitalizes resource name and type on Win7 and doesn't do that on Vista...
Why do they need to be capitalized at all?! All resource editors worth their weight in kilobytes can read lowercase, but FindResource() can't...
21:27
Nice one! @JohannesSchaublitb
@Eugene This means that Windows 7 has breaking changes. Rather unusual for Microsoft.
@StackedCrooked Not really. It looks like they fixed one of their functions instead -- resources edited on win7 will work, resources edited on vista will only work if you explicitly capitalize the name and type.
I suppose the same is true for xp and below.
22:09
I like the channel name.
22:34
it's the channel topic, actually
22:59
hey guys, topic related...
I can't believe how He can compare my question with "what macros are defined?".
that's actually hilarious
23:18
@JohannesSchaublitb Sometimes some people will do almost anything to avoid the obvious and admitting that they made a mistake (and I don't mean "some people" to be insulting either: I certainly have a hard time admitting it sometimes).
Hey, can anyone recommend a book for learning C coming from Java?
@JohannesSchaublitb he overreacted to your comment, but his point is otherwise valid; had the OP's typo (of not including the asterisk) been obvious to you at the time (I'm not saying it was), then he's spot on
@TrevorArjeski Darn -- I keep hoping to see somebody ask the opposite so I could sent them here:
Yes, I'm kidding -- sort of, anyway... :-)
"haha, only serious"? ;)
@FredNurk I swear I didn't say that -- no matter what I might have been thinking!
23:31
@JerryCoffin hahahahahahah
@TrevorArjeski: any good C book, as no java-specific knowledge (vs language-agnostic knowledge) would really help
@FredNurk That's what I thought...:/
it's not something I would fret over: the language-agnostic skill you've learned should dwarf the java specifics and will be a big help
@TrevorArjeski but why not C++? (I may be biased... ;)
@TrevorArjeski: tinyurl.com/pppuc
23:38
@TrevorArjeski yes -- it's really kind of sad. Maybe I have a twisted sense of humor, but a lot of what I think is funny is also nasty enough I can't quite get away with telling it to anybody (and when I do, I usually use myself as the butt of the joke, so there are quite a few people with the utterly false impression that I'm really depressed and just downright hate myself...)
@FredNurk Usually when I read books on theory theyre with C++ or some C/C++ pseudocode. I just wanted to get into some lower level things like Assembly and C. The more I study hardware the more I want to get into embedded programming.
honestly?
@JerryCoffin Jer, it's cool, you need to have a sense of humor, even if it is sick.
there's nothing wrong with liking hardware and being a hardware nut
but if you're a hardware nut, go do hardware, and leave us software nuts to write software :)
23:42
you cant get rid of me that fast
@DeadMG Oh come on -- it ca be fun to do both. There's nothing quite like building a piece of hardware, and all the software that runs it, and seeing it do its thing. Try out some VHDL or Verilog -- you might be surprised at how much like programming it is. FPGA programming (in particular) is a really good way to get yourself into a massively multithreaded mid-set.
that's not really being a software nut, that's more like being a systems nut
or a control freak :P
@DeadMG ...and yet, one of my little conceits is believing that I still manage to do reasonably well at writing software.
hey
there are different degrees of nuttery
all I'm saying is that x86 has the power and flexibility to allow a software nut to achieve his dreams of creative, artistic software without having to worry too much about the performance of the program
@DeadMG Well, one of the things I've never (are rarely, anyway) denied was being at least a little insane.
23:53
and if you went to embedded, you'd have to sacrifice some of your creative expression because the hardware can't keep up
@DeadMG not necessarily. In some ways, you have much more room for creative expression -- instead of tailoring the software to a rather strange piece of hardware, you can tailor the hardware to the specific task at hand. Dealing with a slower CPU can also be fun, just to have an excuse to spend a little extra time to improve the code.
desktop CPUs have more than enough cycles for me not to have to tailor my software to it
I can make misaligned memory accesses and such all I like
we should all be working on 16 bit terminals
I love my GUIs, thanks :P
the march of technology is relentless
2
it really is
23:59
It is actually fun working with constraints. You have an excuse to use clever code. Then again, I usually care much more about the code than about what it does :)
00:00 - 12:0012:00 - 00:00

« first day (198 days earlier)      last day (4964 days later) »