« first day (332 days earlier)      last day (4602 days later) » 

12:28 AM
Hello?
 
How are we?
 
let me engage the ESP circuit
wait
 
ESP circuit reports that you are pretty exhausted from the effort of understanding the creation of space, "I am particularly interested in space and have a knowledge of the sciences that create and maintain it".
Well OK I think that must be a typo or lango, yes?
 
12:33 AM
Hahaha and how do you make this hypothesis?
 
just looked at your StackOverflow description
 
Mine?
 
HAHAHA
 
well ok creating space...
there is a simple way to create space in a finite universe
 
12:36 AM
You will have to excuse me as I am too lazy to look at yours :P
Hmmm many theorys
 
are you familiar with special relativity's notion of how objects become shorter when they move fast?
 
Define shorter
 
it means, if a 5 meter long vehicle passes you pretty fast, like half of speed of light, and you measure its length, it is shorter than 5 meters (i'd guess like 3 meters) as measured from your reference system
 
Are you familiar with the theory which explains why lower fequences arrive quicker from a supernova than high fequencys do
I see
If you could see
 
they might if they interact with gas and stuff
i don't know
i haven't heard of it
 
12:40 AM
Well we can help each other
I don't fully know yours and the same from you
 
i'm just striking up conversation. i've always found the space expansion procedure funny.
 
The basic theroy (explained as simple as can be) is that space isn't as smooth as we think. You know the fabric way of looking at space right? (In a 3 dimential way)
HAHAH
 
well no
there are lots of competing theories
 
You know the term fabric of the universe?
 
not even that, it could refer to so many different things
i think maybe it could refer to underlying structure of spacetime
 
12:43 AM
I will give you an image then :P
HAHAHAHAHA
 
The Fabric of the Cosmos: Space, Time, and the Texture of Reality (2004) is the second book on theoretical physics, cosmology, and string theory written by Brian Greene, professor and co-director of Columbia's Institute for Strings, Cosmology, and Astroparticle Physics (ISCAP). Introduction Greene begins with the key question: What is reality? Or more specifically: What is spacetime? He sets out to describe the features he finds both exciting and essential to forming a full picture of the reality painted by modern science. In almost every chapter, Greene introduces its basic concepts ...
Is that it?
 
Oh, that's general relativity.
 
He he, that's fractal general relativity :-)
 
12:46 AM
The second one might be better.Lol yea but I call it fabric :P
 
Brian's first book was the first, I believe, to tell non-scientists seriously about the conflict between general relativity and quantum mechanics. Both disciplines were started by Albert Einstein (he got the Nobel for photo-electric effect). Only one can be right.
 
Its funny for people ecause its hard for them to imagine a 3D fabric
Yes!
Well we have something in common then :P
 
But I haven't read the second book, the one I linked to above.
 
Hmm Back to the THEORY.How can I put this?
Wait
 
I think, one point the good Brian failed to use as argument (if I recall correctly), is how quantum mechanics forces creation of virtual pairs of particles, everywhere.
The problem with that is, the speed of such a pair relative to e.g. the Earth.
With no preferred reference system, we should be hit continuously by very close to lightspeed heavy particles...
That's but one example that combining the two theories, fails.
 
12:51 AM
I wish we had a Unified theory already
 
Yet each one is what Roger Penrose calls a superb theory, i.e. it works splendidly on its own, to umpteen decimal places of measured effects.
 
I think we are trying to expain parts of the univerve but not the universe in whole if you know what I mean
Really I didn't hear about that one
brb
Hey we should keep it contact I am sure I could learn alot from you
 
you can just check out this room
there are other people here you can learn more from
 
well they're sleeping right now
i think
 
1:02 AM
I am sure I could learn much from you Jedi Master
 
@tony: it's 3 am
 
and?
it's 2 am where I am
 
1:05 AM
Is this Other Jedi Master in the arts of teaching?
 
I guess if you wanted kittehs
 
i am not sure. i guess one kitten would be enough to catch unwanted mice etc. then what work would the others do on the farm?
 
]\'p:?\
 
1:25 AM
Google+ insists that some of the people who have added me, have added me back. Which is incorrect. This fantasy info from Google is almost as perplexing as the non-working internet shortcut earlier, from Microsoft.
 
I are cute (Cat)
 
2:15 AM
Just to toss in my two cents worth, I think if you're going to read anything by Brian Green (among others) you should also read Not even Wrong, by Peter Woit.
 
user457812
2:36 AM
Yay, lateralus
 
Hey, @nil, whatsup?
I tried to write a program in class today to print out all char values.
 
user457812
Getting over my cold, killing zombies in interesting ways, and being mad about missing a morning class
 
It blew up in my face, since I'm new to C++ and I didn't realize it was going to overflow the char type.
So, how would I write the program correctly?
 
user457812
Overflow? O_o
 
user457812
So you were expecting it to saturate at some point?
 
2:44 AM
Well, there are 127 positive char values.
I tried to loop from 'A' to "200", whatever that was.
In Xcode 4, it simply failed to output
 
user457812
Is this for homework or just amusement?
 
@nil It started as amusement and my teacher wanted me to do it once I told her that I was trying to do it.
 
TBH I don't know if it's an overflow or some other weirdness.
 
When my for loop looks like this, it works:
for(int i = 0; i<=62; i++){
Where char firstChar='A'
After 62 it breaks up.
If I try 63 or higher, in Xcode, I get some oddness with the output.
Any ideas?
 
I've been throwing together a mockup for the chat thingy for the last couple hours. dl.dropbox.com/u/26824/temp/chat1.png
 
2:50 AM
@CatPlusPlus Huh? A remake of chat?
 
But better and everything!
I'll probably never finish a prototype, but oh well.
 
user457812
Was going to download the source for the char printer thingy then realized I'm under Windows..
 
user457812
Hm
 
user457812
Aaand I don't have mingw installed
 
@nil so, there's no GCC on windows?
Just get Code::Blocks or gasp, Dev-C++
 
2:51 AM
There's GCC, there's clang, there's MSVC.
 
Well, here's the thing.
 
user457812
Oh, does clang work well on Windows?
 
And Open Watcom, and Intel CC.
 
user457812
I am a horrible clang fanboy just for the error messages.
 
Comeau probably too.
 
2:52 AM
On Xcode on Mac OS Lion, looping beyond 127 seems to make the output stream wonky.
On Windows, the OS cheats and uses unicode instead of ASCII.
How do I build a string in C++?
I wonder if the broken char values are causing the stream to break.
 
I don't think there's a modern OS that wouldn't use Unicode.
 
@CatPlusPlus But shouldn't char be limited to ASCII? Unless I'm mistaken...
 
user457812
Not really..
 
char is weird.
 
Ah, ok. But why should cout on Mac OS just blow up and on Windows it will feign correctness?
Oh, and behold my pun. I used the identifier c, for my experiment, so I have a line that reads c++;.
 
user457812
2:56 AM
Oh, got Visual C++ installed, that'll work for screwing around with stuff
 
Yep, that should do it.
So, please tell me what happens when you run my code.
 
user457812
Seems to run more or less fine.
 
user457812
3:10 AM
Hm, I need to reboot
 
user457812
Can't get any work done on Windows.. but I also want to slaughter zombies
 
@nil What do you get as output?
 
@Moshe You're starting with 'A', which is ASCII 64+1. As you increment this you get first to 127, at which point, with signed char you get next -128. Then you go all the way up to -1. But the next one, 0, is a special value which you should not output. And the ones after that (up till but not including 32) are control characters, which you generally should not output. E.g., 7 is ASCII bel, and may cause a little sound.
 
@AlfPSteinbach Is that why I'm crashing? Xcode just clears the output stream (or, that's my guess) and won't print anything.
 
You're not crashing.
 
3:24 AM
@AlfPSteinbach What I mean is that I get no output at all in my console.
 
But run your program from console instead of from XCode.
 
hang on, will try
@AlfPSteinbach Okay, here's my output:
 
looks all right except for the terminal configuration and except for the extraneous text
 
Cam
hey guys I hope this isn't considered off-topic. If it is I will stop and go away. How does https work? In particular I'm wondering how it prevents man-in-the-middle attacks. Say I connect to an insecure internet connection (sketchy coffeeshop wifi, etc) couldn't the connection be providing me with fake certificates and stealing my information?
 
as you can see you have ok output up til end of lowercase alphabet. That's 127. Then at -128 you get those question marks.
 
3:29 AM
@AlfPSteinbach Windows 7 outputs some stuff there, actually.
 
Cam
but it says https is secure only if the "server certificate is verified and trusted."
 
with UTF-8 encoding, as your terminal probably is set up for, that's expected
 
But what causes Xcode to show nothing?
Is that a bug? A silent fail, at least...
 
@Moshe Yes, a Windows console window does not interpret using UTF-8. It will by default use some variation of the original PC character code (codepage 437). Or on a real programmer's machine it will be some variation of Latin-1 (codepage 1252).
 
UTF-8 is codepage 65535 or something like that, I don't remember exactly.
 
3:31 AM
Ah, well. So is there a way to get the value of char and refuse the increment if it hits the limit?
 
For both those Windows encodings nearly all character encoding values correspond directly to visible characters.
@CatPlusPlus Yes but you can't use it in a console window. Try chcp 65001 & more
 
@Cam For MITM attack on SSL you need to: 1) spoof DNS entries, so that client connects to malicious server instead of the intended one (AFAIK there aren't any attacks on established secure channel) 2) forge the certificate, so that client can't tell you've spoofed DNS.
 
1 min ago, by Moshe
Ah, well. So is there a way to get the value of char and refuse the increment if it hits the limit?
 
@Moshe If you're only interested in ASCII, yes: stop at 127. :-) That's all that ASCII ever defined. It's a 7-bit code.
 
Ok
 
3:33 AM
Forging the certificate requires access to the CA, otherwise browsers won't trust the new one.
This is especially visible for EV certificates.
 
@AlfPSteinbach Cool! One other question - can I cast an int to a char and thereby start at 0 or -126?
 
And that's why trust in compromised CAs gets revoked so hastily, see DigiNotar.
 
You can cast an int to a char but you don't need to, it converts implicitly. And you can start at 0 if you want, but that's a separate question. You'd do better to skip the control characters, which means starting at 32, which is the space character.
 
The specifics of the crypto are in X.509 and TLS standards.
 
@CatPlusPlus Users are accustomed to invalid certificates. They're issued not only by Microsoft but even by the users' banks. In short, the whole field of digital security is invalidated by Worst Practices being practiced all over, which makes it your problem.
 
3:36 AM
Well, their problem.
Any certificate alert should be triple checked.
If your bank's certificate suddenly changed from EV to self-signed, then well.
 
\O/ I have a header called limits.h
 
It's primarily a C header, full of ugly macros. C++ has <limits> (no .h).
 
@CatPlusPlus It's better to use <limits.h>, because that does not give you any false idea of what you get (or not), and lets you write code that works with all compilers. Note: this changed with C++11: I'm giving C++11 advice here.
 
Ah, well. It's there, it works and I'm happy. Yay included headers.
 
@CatPlusPlus Oh, sorry, I read "C++ has `<climits>"
 
3:54 AM
@AlfPSteinbach, @CatPlusPlus, @nil - The final version of my code:
Yay for obsessive nerdy learning. :-D
 
user457812
Dunno if that really falls under obsessive
 
@nil Well, I could have just dropped the whole question a few hours ago.
It's midnight here and I'm working on code for no reason - that's obsessive.
 
user457812
Well, whenever I'm working on code, I usually have a reason, but it mostly comes down to "this would neat"
 
user457812
Though most people probably don't think thread-local storage is neat.
 
This comes down to "I was bored in class because I'm not new to programming and I wanted to learn about the char datatype".
 
user457812
3:59 AM
However, right now I'm reading Bukowski
 
I'm printing the code out.
 
user457812
Printing?
 
@nil Yes, the ink and paper kind.
 
user457812
How strange
 
@nil No, it's exactly a single page. A nice way to wrap up an experiment.
 
user457812
4:06 AM
No, just strange that you would print out code.
 
Well, it's done in code review scenarios, all the time. I just want to print this because I like seeing code on paper. That may be strange.
 
Code reviews on paper? Sounds tedious.
 
So I've heard that it can be done like that.
Regardless, go marvel at the working code. :P
 
user457812
Pretty sure I already saw it, admittedly hard to be excited about that stuff anymore
 
Fair enough, but I'm excited.
 
user457812
4:22 AM
I'm excited about reading Bukowski
 
user457812
There's some odd appeal to his writing
 
Who's he?
 
user457812
Henry Charles Bukowski (born Heinrich Karl Bukowski; August 16, 1920 – March 9, 1994) was an American poet, novelist and short story writer. His writing was influenced by the social, cultural and economic ambience of his home city of Los Angeles. It is marked by an emphasis on the ordinary lives of poor Americans, the act of writing, alcohol, relationships with women and the drudgery of work. Bukowski wrote thousands of poems, hundreds of short stories and six novels, eventually publishing over sixty books. In 1986 Time called Bukowski a "laureate of American lowlife". Regarding Bu...
 
Ah ha!
 
user457812
That fellow. Kind of like experiencing an introspective train wreck that shouldn't have been a train wreck.
 
4:23 AM
Ah ha.
 
user457812
An instructor of mine said reading him can give you a hangover. He might be right.
 
Well, I just realized that I have to be asleep now to get up on time tomorrow.
Have a good night.
 
user457812
Ciao
 
I just realised it already is tomorrow.
2
 
user457812
That's a horribly realization.
 
4:32 AM
Well, I was going to get up half an hour from now, anyway.
 
4:57 AM
@nil Actually, now I'm off to bed. Here's a question I just asked:
0
Q: What's a good way to test that variables aren't being mixed up?

MosheIn C++ class today, we discussed the maximum possible length of identifiers, and how the compiler will eventually stop treating variables as different, after a certain length. I posted another question earlier, hoping to see if the limit is defined somewhere. My question here is a little differen...

 
user457812
"the compiler will eventually stop treating variables as different, after a certain length" huh?
 
user457812
According to who now?
 
@nil my teacher
 
user457812
Is there something in the standard about identifier length?
 
If an identifier is too long, the compiler is said to drop the end of it and mix em up, I think.
The standard claims its unlimited, but really?
 
user457812
4:58 AM
I think your instructor is confused
 
It might have been someone in the class, but that's what I'm remembering at this fine unearthly hour.
 
user457812
I would disregard it. As for testing the length, it would probably be easier to just check the compiler's source where possible and otherwise assume it will use as much memory as need be.
 
Hrm... I'm not going to drop this one so fast. I wonder how powerful a machine I can access. Also, is it possible for my program to generate and run this code for me, in some capacity beyond printing code to the terminal?
 
user457812
You could probably write a script to automatically build something like that, but I don't think there's much point to it.
 
Well, really, bedtime. I do want to continue this conversation though. Thanks for your time!
Oh, someone posted this!
1
A: What's a Good Way to Test that Identifiers aren't Being Truncated and Thereby Mixed Up?

JRLFor Windows C++: Only the first 2048 characters of Microsoft C++ identifiers are significant. Names for user-defined types are "decorated" by the compiler to preserve type information. The resultant name, including the type information, cannot be longer than 2048 characters. Thus seem...

 
5:09 AM
How are we today?
 
@JamesDyson Good, hacking at language design conundrums, on the way to bed.
 
Hahah sounds exciting.....The conundrums very problematic? (btw I haven't heard someone say that word in awhile)
 
@JamesDyson No, I'm taking "Intro to C++" in school, but I'm not a novice programmer. The classes are thought provoking though. I hear some of the students who are unfamiliar asking interesting questions. I'm simply playing with those questions. Read the transcript for more. I really must be off to bed. Feel free to leave an answer on the original question(s).
 
Hhaha fustrating much? They have a bit until they catch up :P What you starting off with?
 
@JamesDyson "A variable is a box. This box is called X. X equals 6. (teacher points at box and draws a 6 with chalk". To be fair, I learned something about char datatype today.
 
5:14 AM
seya mate then
 
@JamesDyson Yep, cheers.
 
HAHAHAHAHAHAHA LOL
HAHAHAHAHAHA BOCX
Wouldn't algerbra be better example?
a is value etc
brb
 
user457812
Microsoft's compiler scares me now.
 
How come?
Too crazy?
 
user457812
Just referring to the 2048 character limit on identifiers -- how the hell am I supposed to use the entirety of Ulysses as an identifier now?
 
5:23 AM
Lol I am playing piano while answering overflow questions
 
user457812
I'm reading Bukowski. There's a good chance I will be depressed by the time I'm done.
 
Damn that must be really annoying
 
user457812
Reading Bukowski is pretty enjoyable.
 
Don't go depressed!
 
LOL it is scary that having a 12-bit bitfield to store a string length isn't a red flag over there.
 
user457812
5:25 AM
To be fair, anyone with that long an identifier needs to have their head examined, but that there's even a limit seems absurd nowadays.
 
Agreed
 
Well, universal-character-names are up to 10 characters each.
So for someone writing C++ in an obscure Unicode expansion script, that limit is more like 204 actual characters.
 
@Moshe The standard requires that identifiers can be "arbitrary length", but suggests that an implementation must at minimum support 1024 character long identifiers.
 
Hey alf your back
 
5:47 AM
what's wrong with my back?
should i watch it?
[attempting to comply]
hm, i think i'd need a mirror to watch my back
 
user457812
My dad had a little mirror your could attach to your monitor.
 
user457812
I think it was made for people who probably had no business using computers.
 
I found that by googling "watch my back". It's not bad cover of old Euro-pop song. The original:
 
6:16 AM
@nil what was it for?
 
user457812
Seeing whoever is approaching you while you're at a computer
 
he he
in 1987: "it's a modern world. but what you don't know, we used one of those way back in 1983!"
 
6:41 AM
oh people have not really awakened (?) yet
but
this video is really fun, in very low-key way ok
and it's Safe for Work in spite of first picture! I think
well, not entirely sure
 
 
2 hours later…
8:58 AM
Woo, getter/setter bashing:
0
Q: Should I use private classes in private projects?

PuchatekI'm facing writing a reasonably large program for a research project that will probably be used only by me, or possibly also by a small number of people that might take it over in the future. The point is - it's not a commercial application, and won't be publicly available. And my question - in s...

 
O hai
 
sbi
> You're right, that's looks way more elegant - Puchatek
@RMartinhoFernandes OMG. Is this C++ fashion show?
@TonyTheLion Here's a hard-earned secret I'm giving away for free to you younger folks: The key is to not to sleep during the day, but ploughing your way through it, not matter how much it hurts. Of course, I'm sure you'll all just ignore this anyway.
@TonyTheLion My first reaction was to scream "that is photo-shopped!", but still: It must have been hard to find five such kittens, all of the same color.
 
@sbi The key to what?
 
sbi
@LucDanton To what I referred to, of course.
 
So, more internets I take it then.
Oh, I see there already are tickets regarding the visibility issues of Boost.Exception. Not sure why I missed them before.
 
sbi
9:11 AM
really, who put me in charge of myself? And what where they thinking?
 
morning
 
9:27 AM
Oh gosh, look at the number of suggestions of locking in this question:
0
Q: Running method while destroying the object

WerolikA few days ago my friend told me about the situation, they had in their project. Someone decided, that it would be good to destroy the object of NotVerySafeClass in parallel thread (like asynchronously). It was implemented some time ago. Now they get crashes, because some method is called in main...

"If you have a threading problem, you don't have enough locks."
Is this a new mantra?
 
@sbi Haha, well despite going to bed at 3 am local time (4am for you) I was up at 9:30. So it's not that bad :)
 
sbi
10:14 AM
@TonyTheLion I went to bed at 1:30am, read until 2, and slept until 8. <yawn/>
 
10:25 AM
I've been looking over the internet how use polymorphism with references in a loop...it must be impossible because I haven't found anything
 
What are you looping over?
 
I am trying to do this...
for(int i =0 ; i < (int)gameBeings.size() ;i++)
{
gameBeings[i]->update((currentTime - previousTime)/10.0f) ;
gameBeings[i]->draw(backBuffer) ;
}
 
Where are the references and what's the problem?
 
That's the thing...I can't make gameBeings an array or list of reference..so I can't use a loop to do this
gameBeings[i].update((currentTime - previousTime)/10.0f) ;
gameBeings[i].draw(backBuffer) ;
and no I don't want this
*(gameBeings[i]).update((currentTime - previousTime)/10.0f) ;
lol
 
Right.
So what's the problem.
 
10:30 AM
You mean it is working?
 
What do you mean what's the problem? :S
The problem is by being unable to create a list or array of references I can't create a polymorphic loop with references
No it is working fine..I'm just curious if I can do it the same way with references
 
No.
 
Dang, what I thought.
So the only good is with a polymorphic function
fat lot of good that does :)
 
Use pointers. Polymorphism is completely independent.
 
You could use a wrapper around whatever kind of pointer you're storing in the container and forward the operations to the pointee (PIMPL really) so that container[i].foo() is available but that would just be gratuitious.
 
10:33 AM
A reference in a struct is essentially a const pointer with no lvalue.
 
What is PIMPL ?
I will use pointers...it works anyways
 
sbi
In computer programming, an opaque pointer is a special case of opaque data type, a datatype that is declared to be a pointer to a record or data structure of some unspecified type. Opaque pointers are present in several programming languages including Ada, C, C++ and Modula-2. If the language is strongly typed, programs and procedures that have no other information about an opaque pointer type T can still declare variables, arrays, and record fields of type T, assign values of that type, and compare those values for equality. However, they will not be able to de-reference such a pointer...
 
An idiom to wrap a polymorphic class hierarchy inside a wrapper with value semantics.
(It has other purposes as appear in the Wikipedia article there.)
 
@sbi ty for the article..will read it
 
Hmm, so in the framework for my preprocessor, sometimes a compilation stage needs to call the next in the pipeline. However, the next stage might not be a stage at all, but instead a generic iterator.
Is it better to make each such case a friend function with a backup overload for the generic case, or to expose the next-stage link and split each case by e.g. SFINAE?
 
10:48 AM
Can't the stages be independent?
 
They should be as independent as possible.
It's definitely a failure of the framework if you can't use them completely separately.
 
I'm not sure why friend is relevant here? Do you want to introduce the 'fallback' in the class scope of the current stage?
 
The two such cases I have so far are initialization and finalization.
 
There are stages in the compilation of C++ that need to call others? Ouch.
 
The fallback is a namespace scope function which is called if you call say finalize( std::back_insert_iterator() ).
Since the fallback can't be in any class scope, then the non-fallback functions must be friends in class scope, which are found by ADL. This all works splendidly for finalization.
 
10:51 AM
Ah, the *non-*fallbacks.
 
However, I'm wondering if two parallel systems that work the same way are a code smell.
 
I'm not sure I understand the other option 'expose the next-stage link and split each case' well.
 
Hmm, having put it all down in words, that's starting to sound like a silly concern.
 
Yay for rubber-ducking.
 
I mean the alternative is to make the next_stage member object in each stage public, and access it directly in the previous stage.
 
10:53 AM
I did that all morning-long >.>
 
Make each stage responsible for detecting whether it's present.
 
Past-self is the worst programmer ever and I need a rubber duck to fix his grave mistakes.
 
And future-self is a superstar programmer that will fix all those *TODO*s someday.
 
@Potatoswatter Does it make sense with your design for the last step of a stage to return some object that can be used by the client code to construct the next stage object?
Uh, or return the next stage actually.
Point being, not having the next stage as a member.
 
Well, I don't want the client to need to do anything more than define the object.
So there isn't an initialize function for the user, the same way that there is a finalize function.
(finalize is necessary because iterators have no built-in concept of end-of-file, which is essential for parsing!)
The next stage is actually constructed in-place in the previous phase, so there is actually no linked list.
And the previous phase cannot exist before the next stage is completely constructed.
 
10:58 AM
Well, not having the next stage member as an object member sounds like the least coupled design, so I guess first option?
 
Which sounds draconian, to put it into words like that, but actually works out quite nicely.
 
@Potatoswatter That sounds backwards.
 
As in, you would expect the succeeding phase to instantiate the preceding stage?
 

« first day (332 days earlier)      last day (4602 days later) »