« first day (482 days earlier)      last day (4474 days later) » 

12:04 AM
Damn, a <chrono> question and I don't know the answer!
 
Xeo
Hehe, I just thought I'd link it for you
 
There's no way to get the epoch of a clock.
 
Xeo
Yep, because it doesn't even have to exist
 
@Xeo Yes, it does. time_point has time_since_epoch().
 
Xeo
@RMartinhoFernandes I meant that the epoch itself doesn't even have to exist as a definite number or something
 
12:08 AM
I'm not sure if auto now = clock::now(); auto epoch = now - now.time_since_epoch(); is guaranteed, but it seems so.
Anyway, the question is highly underspecified.
 
People, I have just realized I know nothing.
 
Tried Haskell, eh?
 
Yes. :)
How did you know?
 
@Xeo Wait, there is. clock::time_point epoch; So simple.
I need to sleep.
 
Xeo
@RMartinhoFernandes One question, is there even a std::chrono::time_point? I thought only clocks had a time_point?
 
12:15 AM
@Xeo Yes, time_points are associated with clocks.
 
Xeo
Then the OP needs to clarify
 
But there is a std::chrono::time_point template that you can use to build your own clocks.
 
@RMartinhoFernandes Yeah I was flubberdygoosted too
Anyways: this sucks eggs:
 
@JohnMerlino you can just run Ubuntu on top of OSX in Virtualbox (that's what I do) - but if you have zero use for Lion, you can replace it with Ubuntu like you plan to do...
 
no time for SO today
Ironically, I could have just capped if I removed my downvote(s)
 
12:20 AM
@JohnMerlino - I keep OSX around mostly because I can't live without iTerm2
 
12:31 AM
Hello everyone.
 
hi guys!
Does anybody here work with NXP microcontrollers?
 
Ah, answered.
0
A: How to convert a fractional epoch timestamp (double) to an std::chrono::time_point?

R. Martinho FernandesAssuming the epoch is the same as a known clock type you can use a duration with a double representation and convert to the duration used by that clock. // change period to appropriate units - I'm assuming seconds typedef std::chrono::duration<double, std::ratio<1>> d_seconds; d_sec...

 
@RMartinhoFernandes Hi! :)
 
NXP microcontrollers?
 
@Hoxieboy yeah, cortex family and etc...
 
12:35 AM
lol @sehe idk about microcontrollers, the most I would know about them is how to use an arduino :3
 
@Hoxieboy sry missed the earlier message by user
 
@sehe lol its'k bro
but yeah, isnt this a programming chat room? I didnt know it involved controllers for robots :s
 
I'm sure our house robot will not be controlled :)
 
derp, @LearningC hello there btw :D
 
Hi. I'm here to troll some more.
 
12:38 AM
@sehe if robot isn't based on Perceptron model...
 
I have an autonomous arduino sweeper bot running right now...
@LearningC I troll constantly here, what with all my python talks
btw, is there an autocomplete feature for nicknames, i think i remember this being brought up once but cant remember :s
 
@Hoxieboy Nice. Even though I don't know anything about python I'll help feed your troll.
 
@LearningC trolol works
also never mind about the autocomplete, i tried tab just now XD
 
@Hoxieboy If you trolled here constantly, I would at least recognize your name.
 
@DeadMG The Case Of The Mysteriously Changed User Name
 
12:41 AM
not gravatar, though
 
@sehe with a default avatar and30 rep?
 
Xeo
The committee can always find a dead horse to beat #WG21
I wonder which dead horse they're talking about...
 
And to be fair, he didn't say for how long. He's been trolling for about 10 minutes, which is, in fact, constantly :)
 
@sehe @DeadMG lols no, because i know pretty much VOID about c++
 
@sehe no, he stopped typing once
 
12:42 AM
@Xeo Concepts?
 
What do you think about Mr. Putin?
 
gods
@MooingDuck its because I took an arrow to the knee
 
@MooingDuck Don't all trolls lie :)
@user1131997 It's spelled, Mr. Python
 
putin? where did that come from? lol
 
@sehe could be he's just a slow typer I guess.
 
12:43 AM
@sehe then , may for Obama , it's OBaml ? :)
 
@MooingDuck Yeah we shouldn't judge the beginning trolls. They will learn
 
@MooingDuck You could also just look up my ip address :s
 
@Hoxieboy he came from USSR
 
@Hoxieboy that doesn't tell me how often you're typing
 
@MooingDuck Didn't know that was the point XD I thought it was an identity crisis between me an sehe
 
12:45 AM
what the website to post compile?
 
@Hoxieboy pft, how can you troll if you don't follow the conversation?
 
@LearningC Just build one yourself. Keep it on your desk so you don't loose it again
 
@LearningC not sure what you mean, but ideone.com or codepad.com?
 
@MooingDuck Its because i'm proffesional :D
 
@MooingDuck ty
 
12:45 AM
pastebin.com
 
@MooingDuck Nah. You fell for it
 
@sehe I'm not experience enough to build a website =)
 
@LearningC "to but a website"? XD
 
I just implemented a clock wrapper.
 
@sehe I had an edge, I remember making him use ideone.com a week ago
 
12:46 AM
Who has worked with factorial numeral system?
 
AFK foolz
 
@MooingDuck chat.stackoverflow.com/… (can't find them all, I'm sure it has been every single day now)
 
@user1131997 number system? or numbers?
 
@DeadMG 324324.342 was the result of my fingers moving very fast across the section of the keyboard with the keys 2, 3, and 4.
 
@Hoxieboy I have no idea what your talking about =)
 
12:47 AM
The numerical equivalent of asdsfasdfsadf.
 
@MooingDuck numeral system
 
@sehe oh my
@Hoxieboy that's not constant
 
Why does my main only run once? when I put in 1 0 1 1? ideone.com/3EYJf
 
@user1131997 haven't heard of that before. Wierd
 
@MooingDuck the numeral system could be factorial too ;)
 
12:48 AM
@LearningC it didin't run at all, it didn't compile
 
@LearningC main only runs once because it is the progam entrypoint and the runtime library calls it only once
 
In combinatorics, the factorial number system, also called factoradic, is a mixed radix numeral system adapted to numbering permutations. It is also called factorial base, although factorials do not function as base, but as place value of digits. By converting a number less than n! to factorial representation, one obtains a sequence of n digits that can be converted to a permutation of n in a straightforward way, either using them as Lehmer code or as inversion table representation; in the former case the resulting map from integers to permutations of n lists them in lexicographical orde...
 
@user1131997 I know, but I've never heard of using it for anything. Just seems odd
 
@MooingDuck I didn't pot the whole thing
Let me post the whole code.
The do while part should it it more than once
 
@LearningC because one of the variables was 0, so it stopped
 
12:49 AM
ohh yea
 
@LearningC when should it stop?
 
sorry my bad.
 
@MooingDuck in wiki , there is good info of using this stuff with samples
 
I wanted it to stop when I enter 0 0 0 0. Sorry I wasn't thing
 
@LearningC (x_from != 0) || (y_from != 0) || (x_to != 0) || (y_to !=0 )
 
12:50 AM
Wait I do have it right. While x,y !=0 it should loop again
 
@LearningC no, you have && instead of ||
 
Who has looked Collateral movie with Tom Cruise ? where he played killer?
 
@user1131997 that's freakin wierd. I like it
 
@MooingDuck that worked by why || instead of &&. Don't I want to check so it continue when there is no 0 0 0 0 in the same line?
 
12:54 AM
@MooingDuck wierd what? movie or factorial numeral system or both? )
 
NON AFK
time
 
@LearningC yes. You're code was true && false && true && true. Can you see from there?
@user1131997 number system
 
|| = OR
 
@Hoxieboy 16:53
 
I stopped trolling for that long?
 
12:54 AM
@user1131997 hover the mouse above the message? notice the tiny arrow to the (left) knee?
 
:2593875 nope :)
 
@user1131997 doesn't handle non-integers though, not a continuous numbering system
 
hover some more. you'll get it. It's almost as difficult as @tab to expand nicknames
 
I see now.
 
@LearningC said the blind man
 
12:56 AM
@user1131997 click the arrow to the left of my message. Almost all mine are replies
 
@Hoxieboy That what she said...
 
@MooingDuck Clicked it and what?
 
@LearningC she said "said the blind man"?
 
@MooingDuck Wikipedia says it works fine by using the reciprocals of factorials.
 
O.o
 
12:57 AM
@user1131997 and it highlights the message I sent it too
@RMartinhoFernandes that's cheating :P
 
@Hoxieboy Yea when she was working on python.
 
@LearningC I'm still confused :s
 
@MooingDuck Wait, what, why? That's exactly what normal radix systems do.
 
@MooingDuck and so what? :) some problems with formating my messages here in char? :)
 
12:58 AM
1/10, 1/100, 1/1000 <- reciprocals of powers of ten.
 
now we are getting into quadratics :s
 
@RMartinhoFernandes normal radix problems use 100, 10, 1, .1, .01,
 
Anyone seen the new star wars movie?
 
@RMartinhoFernandes ah I see
@user1131997 you expressed confusion over what I replied to for one sentance. That should have been clear.
@LearningC years and years ago
 
@MooingDuck Lightyears away
 
1:00 AM
@MooingDuck Not the new 3d one?
 
@Hoxieboy that's a distance
 
@MooingDuck It was a reference
 
But parsecs is time.
 
@MooingDuck No not the 3d with the red and blue glasses. The one with the latest technology.
 
@RMartinhoFernandes not really consistent. That works for regular number systems (10-base, 2-base, whatever-base) because it just mirrors the integer digit positions
 
1:01 AM
@RMartinhoFernandes parsecs is a measure of distance derived from "parallelax" iirc
 
@LearningC pft, it's the same movie.
@sehe I thought so too, but wasn't sure so didn't assert myself
 
@AlfPSteinbach You think you know more about space than George Lucas?
 
@RMartinhoFernandes 1 Parsec = 3.08568025 × 1016 meters
 
@MooingDuck It is kind of saddening to see people make a profit from movies already long dead :(
 
@MooingDuck You think you know more about space than George Lucas?
 
1:02 AM
@RMartinhoFernandes google does, and wikipedia agrees
 
> "You've never heard of the Millennium Falcon?…It's the ship that made the Kessel Run in less than twelve parsecs." ―Han Solo
 
@RMartinhoFernandes so Han Solo typo'd
anyway, it's time for my date, off I go
 
@MooingDuck e.g. 10base digit weights are 10^3,10^2,10^1,10^0 . 10^-1, 10^-2 etc.
 
@MooingDuck No, the referenced "Kessel Run" is a race
 
@MooingDuck No, Lucas just thought the term was cool and since he totally researched it, he used it as time.
 
1:03 AM
Who has girlfriend in this room? and who has problems with his girl? I needed some advice, critical life moment I have :(
 
For consistency, I'd require factorial numerals to have 3!, 2!, 1!, 0!, -1!, -2!, -3! etc.
 
so the millenium falcon finished the race appearing only 12 times, 12 parsecs of the distance
 
@user1131997 It would be unwise to discuss my problems if I had my gf in this room
 
@sehe ok with the 0, but for the rest i think gamma function
 
Anyways, my gf like to be called 'wife' these days
 
1:05 AM
OLD GUY
 
@AlfPSteinbach Yeah, I was gonna look at that but lost interest.
FLAG HIM!
 
How here doing programming as a job?
 
flag ALL the old guys
... uh wait'
 
I would like to work as a programmer for robotics :s
@sehe flagged as pedo :3
 
@LearningC Have you really been far even as decided to use even go want to do look more like?
 
1:07 AM
@sehe have you such problems with your gf in real life with non-understanding each other for a long time? I have :(
 
Step 1: kill everyone else that is more fit for the job. Step 2: apply for the job. Step 3: ??? Step 4: profit.
@sehe Do you just copy and paste that?
 
@user1131997 Nope. That means, in all likelihood, you must be older than the old guy by definition
 
@sehe Sorry I still can't understand.
 
@RMartinhoFernandes We ATTACK AT DAWN slams fist into table
 
@RMartinhoFernandes Yeah, too lazy to type it
 
1:08 AM
@sehe not clearly understand
 
@LearningC You’ve got to be kidding me. I’ve been further even more decided to use even go need to do look more as anyone can. Can you really be far even as decided half as much to use go wish for that? My guess is that when one really been far even as decided once to use even go want, it is then that he has really been far even as decided to use even go want to do look more like. It’s just common sense
 
._.
 
@user1131997 You: "...with non-understanding each other for a long time? I have " so that makes you old enough to have reach non-understanding for a long time. I haven't reached 'a long time' yet :)
@LearningC "How here doing programming as a job?" Care to clarify your own trainwreck sentence?
 
I suddenly had the mental image of an 84 year old white pope becoming a gangster
 
@sehe yeah, but he done what everything over, and if want whatever with then, should all be fine.
 
1:10 AM
@Hoxieboy but he did become one. It was a career choice, IIRC
 
Ok, this room is gone full bananas now. I'm going to sleep.
 
@sehe I was asking who write program for money.
 
@je4d Fair enough
@RMartinhoFernandes cya
 
@sehe Please, everyone, stop talking in google translator mode
 
@LearningC You thought you were asking that.
 
1:11 AM
@RMartinhoFernandes rofl stomp your emenies
 
@je4d What does "but he done what everything over, and if want whatever with then" this mean?
 
@LearningC Supertroll!
Sleep well guys (oh and girls)
 
good well by friend
 
@sehe I don't understand what people are saying about me.
 
@sehe (we all know girls dont code :3)
 
1:13 AM
@Hoxieboy ^^ talk about google translater mode
 
XD
 
@Hoxieboy I have a hot teachers for programming..
 
@LearningC rofl
multiple teachers?
 
@Hoxieboy twins
 
@Hoxieboy Dude if I can get a picture of her you'll take a plane ride all the way here just to take her class.
 
1:14 AM
@LearningC Do you know any other languages (spoken languages :s)
 
@Hoxieboy Yea Vietnamese. I can speak it but not read or write it.
 
@sehe I see...
 
@Hoxieboy she is the teacher's assistance.
 
@LearningC He needs to practice insertion sort and then unload his development tool
 
this i just learned: #include <exception> works
:-S
I thought it's just #include <stdexcept>
 
1:18 AM
@sehe I had to look "insertion sort" to understand what you was trying to say =)
 
@LearningC Sometimes he may prefer less efficient algorithms that work top-down or in-place. That way the algorithms can be applied with relaxed time constraints and more shared state.
 
London Good Bye... UUUUhhhh Uhhhh, London, good bye I'm alien here!!!!!
What's life... wanna be killed after argues with my gf.... Hate all in this world
 
@wilhelmtell Me too. Where did you find '<exception>' ? Is it c++11?
 
@sehe Sorry you lost me. Does Google have a translator for this type of language?
 
@user1131997 I'm sure she'll oblige if you ask her nicely
 
1:20 AM
I have no clue. I was searching cppreference.com for stdexcept, and they only mention exception. i was, wtf. then i tried it.
 
@sehe may be... may be not
 
@wilhelmtell I think <exception> just gets you the base std::exception class, <stdexcept> has a bunch of more specific errors thrown by the stl (oob, invalid argument, bad cast etc)
 
arse
 
@wilhelmtell I'm sure I tried '#include <exception>' somewhere in the past. At which time I learnt the valuable life lesson to impress any onlooking C++ coder by typing '#include <stdexcept>' from then on
 
types away dutifully Computer: Trololol! bluescreens
 
1:22 AM
@sehe I have it with gcc 4.6.1, and there's no c++0x ifdef
doesn't mean it's in the standard of course
 
@je4d don't forget java-esque std::runtime_error. Lovely
 
try: except: statements are useful in python as well ;P
 
whats with the huge push for python. where's the support for ruby?
 
@Hoxieboy Did you know you can type Python in C++ comments?
 
@je4d You're right. It enlists std::exception and std::bad_exception only. Then again, I didn't know there's std::bad_exception.
 
1:23 AM
// Python
 
ruby is a better implementation of python
 
yeah :D
 
@Hoxieboy but vb is where it's at, that's got 'on error resume next'. no need for exceptions.
 
@JohnMerlino I dont understand how you could call ruby a better implementation of python
 
@wilhelmtell Isn't that a base class for bad_cast, bad_alloc, bad_range etc.?
@Hoxieboy +1
 
1:24 AM
ruby is more readable and elegant and supports blocks
 
I'd call Boo a better implementation of Python, in a way.
@JohnMerlino Yeah! Language flame wars FTW
@JohnMerlino Supports blocks? You mean lambdas or closures? Python has them. Ah, I get it: you mean not indentation-based blocsk
 
@JohnMerlin it all depends on how you use it as well
 
> /** If an %exception is thrown which is not listed in a function's
> * %exception specification, one of these may be thrown. */
this RE bad_exception
 
@JohnMerlino i've seen python code snippets that are worse that BASIC, and yes, you can type one liner python programs
 
@wilhelmtell Oh. See, I learned something today. Thanks
@Hoxieboy I can even sing oneline BASIC programs.
 
1:26 AM
@sehe well this is from gcc46 header. it's not quite standardese.
 
@sehe I bet your a good vocalist ;)
 
@wilhelmtell Thanks anyway, good enough for me :)
 
ruby blocks have much more power than python lambdas, lets not be mistaken, and also ruby is PURE OO
 
shouts to his hearts content PRINTF "HELLOWORLD, I LOVE YOU"
 
@sehe that was news to me as well..
and having learnt something, i'm off to bed
 
1:28 AM
pure OO does not make it better at all
 
it's half 1 here
 
@JohnMerlino Ruby is Web Scale?
@je4d "half 3" here
I'm off to bed
 
@sehe nighteh
@JohnMerlino Google was coded in python as well :D
 
@sehe fine, i consider myself 1-up'd :-)
 
parts of google coded in python
 
1:31 AM
excuse me, C++ AND python, not a speck of ruby
anyways this room is for C++, not python or ruby or any other language (other than C and C#)
 
i know it c++ room but someone mentioned python and I just chimed in.
 
How do you claim that a language is better than another? -.-
 
simple
Java sucks donkey dick because you can't employ any programming strategy other than "Garbage-collected inheritance orgasm".
 
Xeo
@DeadMG Note that the orgasms are produced by AbstractFeelingFactorys
 
1:46 AM
socket-to-hole
derp
 
Xeo
I'm kinda wondering, after seeing this question, why the committee didn't take the chance to introduce pure as a pure-specifier
Same semantics and syntax as = 0, but a keyword.
 
anyone here with Linux experience?
 
ideone.com/NrZaS Can someone tell me what is wrong with checkBounds function when I use it in main?
 
Xeo
2:03 AM
@kendfrey Kinda.. ?
 
do you have any idea now to make a program that takes over the console/terminal like vim does?
 
@LearningC decide to x_to, y_to as global variables or as locals and pass as arguments to checkBounds - you are not consistent
@kendfrey use ncurses
 
@kfmfe04 thanks
 
np
 
Java DOES have a really sucky VM.
 
2:07 AM
@kendfrey ncurses has been around forever: gnu.org/software/ncurses - I currently use it for my server app
 
so using ncurses would be the best way to rewrite vim?
not as though I would
 
int checkBounds(int input1, int input2, int input3, int input4); got this checkers.h:49:5: note: declared here
 
@kendfrey yes, unless you're a masochist and want to also rewrite an API to the gazillion terminal protocols out there... ...in that case, you can also rewrite ncurses, if you like
 
heh maybe i am a masochist - otherwise why would I like using the terminal better than a gui. probly because a mouse is so slow, even slower than my typing lol
 
nope - terminal is clearly superior - most hardcore programmers will agree
I had many co-workers who will not touch a mouse (slows them down)
 
2:14 AM
Is this a good way to implement mutices/mutexes/however you say the plural of mutex?
class Mutex:public RefcountedObject {
private:
	WCHAR* name;
public:

	Mutex(MemAllocator* allocator):RefcountedObject(allocator) {
		name = allocator->allocMem(sizeof(WCHAR)*16);
		for(int i = 0;i<16;i++) {
			name[i] = rand();
		}
		name[15] = 0;
	}
	void Destroy() {

		allocator->unallocMem(name);
	}
	///Allows the active thread to acquire control of a mutex
	void* AcquireMutex() {

			return CreateMutexW(NULL,true,name);

	}
	void UnacquireMutex(void* mutex) {
		CloseHandle(mutex);

	}
};
 
@kfmfe04 Can you tell me what is wrong? ideone.com/5tcc0
 
Or is it bad to create a "pseudo-random WCHAR*" that way?
 
@LearningC learn to read the error message - 90% of the time, it will tell you the answer. The other 10%, you have to parse messy template errors (you are not there yet)
 
Some error message I can read but this I cant`Undefined first referenced
symbol in file
prinf /var/tmp//ccYOvSPi.o
ld: fatal: symbol referencing errors. No output written to project1
collect2: ld returned 1 exit status`
 
What is the plural of mutex?
 
2:19 AM
@LearningC that is a linker error - it's still telling you that you misspelled printf
 
Oh. So when I see similar message I just read prinf /var/tmp//ccYOvSPi.o this line to see what I missed spelled?
 
Well, it means that function is missing a definition.
In this case that's because you misspelled it.
 
read the error message CAREFULLY - it says prinf, not printf
 
ohh
I need to pay attention to the smaller details. Thanks
 
always read error messages carefully - like I said, almost all the time, it will tell you faster than any human being can tell you
np
 
Xeo
2:25 AM
@RMartinhoFernandes Didn't you want to go nopping?
 
Erm. Yeah. You know how it is.
 
Xeo
Totally.
 
@Xeo btw, have you successfully built boost using clang? if so, I'll try it myself in a new vbox...
 
Xeo
I don't build boost, because I only need the header-only stuff. :)
 
ic
I want to jump on the clang boat as soon as 3.1 is out
 
2:31 AM
What is a good way of making the program go back to the beginning of the loop if something is false?
 
continue - if it's a for-loop
 
what you mean continue
oh continue. Just Googled it. Didnt know that existed.
 
@kfmfe04 Actually, it works on other loops as well,
 
@RMartinhoFernandes I know while() { }, - not sure if do-while makes sense
I mean, if you use it on a do-while, will it jump DOWN to the while?
 
2:35 AM
@kfmfe04 It said that it works with do-while
 
@LearningC jumps down?
 
@kfmfe04 What do you mean by jumps down?
 
guess so - in the other loops, the check is at the top, for a do-while() it's below
 
It jumps to the condition.
 
Xeo
@kfmfe04 In the flow of control, it doesn't make much difference
 
2:38 AM
hehehe - enough keystrokes spent on this noob-topic ;^P
 
Xeo
My psychic debugging capabilities have once again prevailed! stackoverflow.com/a/9221787/500104
 
finding out the hard-way that 90% of my bugs are caused by putting code at the wrong layer of abstraction - happens most when requirements evolve...
...especially nasty are those new requirements which require the code to be moved up or down for it to make sense - refactoring...
@Xeo - lol nice psychic debugging - next, you're going to encourage people to post no code and ask what the problem is!
 
Xeo
2:53 AM
Hrhr
Or I will write Questions that are actually answers to questions not even posted yet.
Actually, that's pretty easy to do already.
 
rofl
 
3:04 AM
the continue is not working so well
is there an alternative way of doing this>
 
3:24 AM
what does your current code look like?
 
I just deleted everything
I was getting frustrating. I will start fresh tomorrow when I'm more awake.
 
@Xeo Congrats. I'm happy you got it.
 
4:49 AM
Anyone here?
 
Xeo
No.
 
I'm in the mood to write a C++ program to print text to the screen in a hacker like fashion, to emulate movies.
Just for kicks.
I can just use an ifstream, and then use wait(randomInterval) in between cout statements, right?
 
I know about that. I want to implement that in C++.
For people to try.
But I want to run it on autopilot.
 
Xeo
Ah
 
4:55 AM
Actually, @Xeo - How do I pass in an argument to a program?
I'm learning this in class, still very new at C++.
 
Xeo
$ ./the_program 1 2 3 4 5
just after the name
 
@Xeo right, but how do I access those inside my main method?
I need to declare some sort of array for parameters in main?
 
Xeo
int main(int argc, char** argv){
  // from argv[1] till argv[argc] is the arguments
}
in string form, of course
 
test
cache is messed up, can't see new messages. Sec
ah, I see now.
So char** is a C string?
 
Xeo
pointer to the beginning of an array of pointers to characters :)
aka an array of c-style strings
 
4:58 AM
So what's an example of checking for a "-a" (for auto)
or "-m" for manual
 
Xeo
Best get Boost.ProgramOptions to parse the arguments, saves the hassle
But a simple, rudiment form..
 

« first day (482 days earlier)      last day (4474 days later) »