« first day (675 days earlier)      last day (4279 days later) » 

Xeo
Sweet
 
me wantsta.
 
And it's open again.
 
sbi
@Xeo The book question is now open again. Thanks!
 
dang. I just flagged for a mod.
well, maybe they'll do something about it.
 
sbi
1:03 PM
@kush "Publication Date: January 21, 2013"
 
You can pre order, I think
 
Xeo
Btw, can you vote to close a question multiple times?
 
sbi
@rubenvb SO lacks the tools to prevent high-rep users from closing a question. Hence my comment.
@Xeo I don't think so.
 
@kush Because programming in C++ is like looking at a snow-covered mountain
 
sbi
Well, I gotta go. See you!
 
1:06 PM
is an unordered_set's interator non-const?
 
Xeo
Anybody got a guinea pig question handy so we can test? :D
@rubenvb no, why would it?
 
@sbi Take care
 
@Neil might as well be like a reaching the top of the mountain kind of thing?
 
@Xeo that would have solved my problem.
 
Xeo
So what was that problem with the interface again?
 
1:08 PM
I have a map<file_type, set<build_element>>. You suggested a map<file_type, map<reference_wrapper<string>-thingie, build_element>>
I just need a list of source files, and an assorted list of object files they'll turn into.
At the time I insert the source files, I do not know what their object files will be named.
 
Xeo
Oh, seems it's non-const after all
 
so unordered_set would fix my problem?
 
Xeo
@rubenvb How is that a problem? Is the object file name your order criterium?
 
a fest for grammar nazis
 
@Xeo no, I want unique source files.
 
1:10 PM
@TonyTheLion Reminds me of that site about writing a programming.
 
Xeo
@rubenvb Right, then the std::map way would work
Since the reference_wrapper<string> would point to the string that is your order criterium
 
@EtiennedeMartel link?
 
Xeo
However, unordered_set is likely the better choice since you don't seem to need order, only uniqueness
Which could also be accomplished with a std::vector which is then sorted and std::unique'd
 
@TonyTheLion oh Spider man, you're such an idiot
 
1:12 PM
@kush Yeah, tired and with the knowledge that from there you can only go down
 
@Xeo yeah, I thought of a vector and std::unique, but I'd have to call that each time I added an element, or make the insert operation a lot more complicated.
 
Xeo
@rubenvb Ah, I thought you added all in one go and std::unique'd at the end
Then the unordered_set it is
 
aargh, insert_iterator no workie :(
 
@EtiennedeMartel I wept
Quite appropriate :P
 
Xeo
@rubenvb std::inserter(cont, cont.end())
 
1:14 PM
@Xeo yah, right. The std::vector solution.
 
Xeo
Or what was "no workie"?
 
@Xeo yeah. an error.
 
Xeo
Anyways, if you want uniqueness, don't care about order and might insert multiple times, a std::unordered_set it is
I use the same for my C++ "preprocessor"
 
Fo Fuk's Sake.
 
@Xeo a pirate wokie?
 
Xeo
1:17 PM
(it's a dependency checker for C++ source files that checks which headers a source file depends on, to make writing makefiles easier)
I'm currently hanging at #include SOME_DEFINE_HERE include directives :(
Which would mean I'd need to add the macro language to it
at which point I might aswell just write a preprocessor...
@thecoshman lol
 
@Xeo can't you just use Clang?
something based off of that?
 
Oh, hey, VS just froze in my face. While editing a XAML, no less.
 
Xeo
@rubenvb Hobby project to hone my C++ skills :)
Worked fine when I only accepted #include "..." style and ignored every other, but now I also accept #include <...> and discard all others as errors :( Might need to simply ignore them
 
@EtiennedeMartel that ought to teach you a lesson :)
 
messy messy
 
@R.MartinhoFernandes Is someone trying to inject SQL via printers?
 
I have no idea.
Seems surreal.
 
lol. Steve Jobs is haunting.
 
The whole concept of "spontaneous printing" is foreign to me.
 
> its trying to talk to you. DESTROY IT SMASH IT WITH A SLEDGE HAMMER AND BURN THE REMAINS
 
1:34 PM
Yay broken drivers.
All printers are from hell.
 
@rubenvb Then dump salt on it.
 
people still print things?
 
dammit. I'll need to get rid of a bunch of code for this to work. End result: greatness. Intermediate result: FUUUUUUUU
 
Xeo
heh
 
@melak47 I find it a lot less strain for my eyes to have a hard copy
it is also a lot easier to riffle through documents, I sadly do not have a good enough computer set up at work to full facilitate how I would like to work
 
1:38 PM
you can't CTRL+F on paper though :/
 
@thecoshman Kindle?
 
@BartekBanachewicz ¬_¬ I can hardly put every document I read through at work on a kindle
 
@thecoshman why's that?
 
-3
Q: Definition or redeclaration of 'GetInstance' not allowed inside a function

anca lupulescuI am trying to create an instance of a singleton class inside of a wrapper in a multithreaded environment. I am using the wrapper to ease my work and not to write multiple times Lock and Unlock in ManagerSources. #define ManagerSOURCES() ManagerSources::GetInstance() // Singleton class ManagerS...

wth is happening today?
 
@BartekBanachewicz nor would I like to read through them on a kindle, A4 is a poor size for some of these diagrams
 
1:42 PM
@LuchianGrigore sees the word "singleton"; closes tab
 
@thecoshman Ah, with diagrams I gotta agree. We have A0 of current architecture on the wall right now
 
my data model I am dealing with is like a plate of spaghetti
 
@R.MartinhoFernandes even better "singleton class inside of a wrapper in a multithreaded environment."
 
@BartekBanachewicz what industry do you work in?
 
1:43 PM
@thecoshman Telecom
 
@BartekBanachewicz snap :P
¬_¬ who you work for?
 
@thecoshman advaoptical.com
 
o_o
Ericsson
 
@thecoshman does it mean we should start hating each other now?
 
1:45 PM
@thecoshman And you do Java? Tsk, should've applied for an Erlang job.
 
@BartekBanachewicz I don't know... are you amazed that you have a company to work for?
 
@CatPlusPlus ... they advertised for a Java developer... I shamefully handed in my CV. Besides, I don't where/if they actually use Erlang
 
Xeo
Got something to look forward to later today :)
 
@thecoshman what does "amassed" mean? my kindle is far away
 
1:47 PM
:P
 
Xeo
@BartekBanachewicz "amassed" means "to have gathered", which doesn't make much sense here...
Ah, too slow
 
@Xeo i thought he meant something other, I also didn't see it in that context.
 
Oh gawd, "amassed"?
 
@thecoshman still not grasping the point of the question, though
 
@R.MartinhoFernandes I please to aim!
 
Xeo
1:49 PM
So, why's nobody staring my video link? :(
 
@BartekBanachewicz ¬_¬ the code I work on is so shit, I find it hard to believe this company is still running
 
Xeo
I even made it all pretty and everything
D:
 
@thecoshman +1'd, same here. I'm just a student, so I don't care that much.
 
enjoy it whilst you can
 
@Xeo Downloading...
 
1:53 PM
anyone has a link/resource to a comparison between java and c++ methods. I mean, the equivalent java methods in c++. because I'm rewriting my project from java to c++ and it would be really helpful
 
I doubt there's any such thing.
 
@rogcg you just need to know both languages well enough
 
@Xeo The small talk is making me tune out.
 
My method for converting code from language A to language B is: #1 learn language A; #2 learn language B; #3 read code in language A, gain understanding of it; #4 write code in language B.
I honestly believe there's no superior method.
 
@thecoshman what if I want to use this rewriting performance as a method to learn language B?
 
1:55 PM
Skipping #1 or #2 often leads to disastrous results.
 
translating between programming languages is the same as between human languages
@rogcg then learn language B
and you try to simply write Java in C++ you are going to have a very bad time
 
that's why I'm seaching for this resource, to show me equivalent functions from java in c++
I just need to know the equivalent way to write it
 
What's the equivalent of void foo(Bar[] blah); anyway? template<typename Iter> void foo(Iter begin, Iter end);? But you don't get virtual dispatch. Type-erasing iterator? Somewhat overkill.
 
@rogcg try and find a resource to give a load Spanish sentences with their Chinese equivilents
 
The problem is, just replacing equivalent functions won't work. The languages are fundamentally different.
 
1:57 PM
@thecoshman there are the dictionaries
 
@Xeo So when does it start to be substantial?
 
@rogcg no, that will just tell you what the individual word means. it will not tell me how write a sentence in another language
 
@R.MartinhoFernandes i dont want just to replace. I want to know how the name of the functions. So I'll search about it and start studying how it works
 
Xeo
@LucDanton Dunno, just discovered it here and can't watch it yet :(
 
for example, in English, we say 'a red apple' in most European languages they say 'the apple red'
 
1:58 PM
@Xeo I fear that the style of the talk is just to shoot the breeze. Doesn't seem too focused.
 
@rogcg so you will need to learn what the functions in Java are doing and then learn how to get the equivalent functionality in C++
 
I know, I know. I'm not gonna use it as a way to go. it will be just a resource to check in the mean time. I want to serach how it works. But first I got to know what is what to search about it.
@thecoshman I know what is being made in java.
 
@rogcg Why don't you just learn how to code in C++? And precisely that
 
that's what I'm doing
but I've chosen the practice way
 
@rogcg you chosed the translate way. Go all the way from the beginning.
 
2:00 PM
Learn Haskell.
 
@CatPlusPlus Learn Lisp.
 
I already did, I don't like it.
 
subjects here change suddenly =/
 
There are a few of us in here who do both Java and C++, so we can tell you without random guesses and hearsay, you need to learn C++, don't worry about porting yet, that is a long way off
 
@CatPlusPlus Apart from shitload of parentheses, it blows haskell away </troll>
 
2:01 PM
@rogcg only when we get bored of old ones
 
Weak troll.
0/10
 
whatever..
 
@rogcg There is no such resource. Because lots of "equivalent" things change not just the name of the functions.
 
What's in a name anyway?
 
@CatPlusPlus Still, makes me remember this guy who implementer Lisp interpreter in JS. So, i started to wonder what are the keywords in lisp. I finally realized, that there are two : "(" and ")"
 
2:02 PM
If you want to know how to do some particular thing in C++, we'll be happy to help. But there's no easy way out.
 
@rogcg let's take the const keyword in C++, there is nothing quite like it in Java, yet it is an important keyword for writing good C++ code. If all you try to do is get your Java code to work in C++, you will certainly not come across it, thus be doomed to write shit code
 
ok, thanks.
 
There's also quoting and weird quoting.
Also Scheme allows [] too.
And Scheme > Lisp.
 
@CatPlusPlus I will learn C++ for the next 10 years of my life probably, so it quite doesn't matter to me that much. Until then, we'll all convert biomass to javascript :P
 
You don't write JS, you generate it.
 
2:04 PM
@BartekBanachewicz you will learn C++ for the rest of your life, it will never end
@CatPlusPlus vomit ftfy
 
I've learned my subset of C++.
 
@thecoshman oh, in 10 years I will more or less catch up with the global "pro" level, i suppose.
 
@CatPlusPlus Cat++?
 
Obviously.
 
@BartekBanachewicz Don't worry, I suspect the global pro level is quite low.
 
2:05 PM
@BartekBanachewicz 'moving target' mean anything to you?
 
@CatPlusPlus True dat.
 
@thecoshman Yes. Still, it moves logarithmically, while I learn at at least x^a, a>1
@R.MartinhoFernandes Yup. That's why it's only 10 years
 
> Resource management in C++ is a solved problem; the only issues stem from ignorance or refusal to use established idioms.
13
 
@BartekBanachewicz I'm just going to play my bullshit card at this point
 
Wow, I woke early because I forgot to disable my early alarm. And somehow I managed to get 3 badges on meta... eh. Back to sleep.
 
2:07 PM
@thecoshman It's not very effective.
@Mysticial Question at 21, answer at 19 (my answer at 7 -.-)
 
@Mysticial Shame on you, posting on meta.
 
@CatPlusPlus well you can't just go an efficiently solve issues, what sort of place do you think this?
 
@thecoshman After you pressed enter, grammatically correct kitten died.
 
@CatPlusPlus He's a traitor!
 
-14
Q: Merge [x64] into [64bit]?

abatishchevHow about to merge and synonymize x64 (828) into 64bit (1,913)? Thanks. Often they're used together.

 
2:11 PM
@BartekBanachewicz ?
 
Does anyone know of a platform that comes with the reddit/9gag/whatever voting system? (hot pages, voting pages, all that)?
 
@thecoshman Lame tryout to hint that your previous statement is unreadable
 
@Mysticial Could ya fix my problem, thx bai!
 
@BartekBanachewicz meh
 
I got "Reversal" on that - the only badge that's 100x easier to get on meta than SO.
 
2:12 PM
@thecoshman Oh man, don't take this badly, but you are deteriorating.
 
Forgive me, it's getting late and it's hot there. I'm going to get a coffee. In the meantime, could some good soul tell me how to install clang on Fedora in one line?
 
@R.MartinhoFernandes really? I thought I had been doing well
 
Install Clang.
 
$ yum install clang ?
 
I'm going to shamelessly write `struct file{ std::string filename; time_t time; }; struct build_element : file { std::string object_filename; time_t object_time; }; and write the necessary hash and/or comparison operators.
 
2:15 PM
-1
Q: Efficiency of output parameter vs return value on the stack for stl data structures

Moataz Elmasrylets say I have the functions std::Vector<Point> calculate() { std::Vector<Point> points; //do stuff with points return points; } and void calculate(std::Vector<Point>& points) { //do stuff with points } So my question is specific to objects initialized on the...

Can someone find the dupe for me?
 
@R.MartinhoFernandes $ sudo yum install clang or # yum install clang
 
@R.MartinhoFernandes lazy bum
 
What if he doesn't use different PS1 for root?
WHAT THEN?
 
ls
oh damn, wrong window.
 
you know you can edit posts...
 
2:17 PM
Obviously it should be ll.
 
@BartekBanachewicz include p0rn porn pr0n pron src test
 
@CatPlusPlus wtf is PS1?
 
@rubenvb Prompt variable
 
@rubenvb old games console
 
wow, wtf:
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
 
2:18 PM
indeed, (sudo) yum install clang worked. And it's... Ooooooh... shiny.
 
that's echo $PS1
@BartekBanachewicz wow. Fedora has a package manager to install stuff. Ain't that weird?
 
@rubenvb You didn't know that?
 
@rubenvb I meant that clang's shiny, not yum
 
yum is yucky.
 
@R.MartinhoFernandes I still don't know wtf it means.
Sometimes the bare parts of a Linux system scare me.
 
2:20 PM
W T F?
error: a space is required between consecutive right angle
brackets (use '> >')
Doesn't standard allow this?
 
@rubenvb It's what defines your terminal prompt to be
 
A bunch of ANSI escapes, and \u is username, \h is hostname, \w is working directory.
 
@BartekBanachewicz add -std=c++11
@Collin oh, all the stuff before the little square thingie.
 
@rubenvb it's various things, like saying set the prompt title to <hostname>: <working directory> or something like that, and your promt that you get is <username>@<hostname>:<working directoy>$
 
ah, i thought the -Wc++11... did it in clang. whatever : error:
use of undeclared identifier '__ATOMIC_ACQ_REL'
 
2:21 PM
-W is for warnings.
 
@rubenvb Uh.. yeah
 
Clang pretty much uses the same switches as GCC.
 
@BartekBanachewicz File a bug with Fedora. What C++ headers are you getting?
 
Mine looks like this: \e[0;32m[\u@\h \e[0;33m\W\e[0;32m]$\e[0m
 
@rubenvb how to check that?
 
2:22 PM
@Collin Colours!
 
@BartekBanachewicz run the compile command with -v and see where it looks for includes
 
@R.MartinhoFernandes like some sort of chump :P
 
It sets the color to green, shows the user@host, sets the color to yellow, shows the current base directory, sets the color to green and shows the $
My root shell sets them to red
 
@Collin I liked the Arch Linux August install CD prompt. It didn't get installed though :(
 
/usr/bin/../lib/gcc/i686-redhat-linux/4.7.0/../../../../include/c++/4.7.0
/usr/bin/../lib/clang/3.0/include
 
2:23 PM
@rubenvb Well, now you know how to steal it.
 
Never tried arch, this one is the basic fedora with some colors added
 
@BartekBanachewicz oh, Clang 3.0 can't work with GCC 4.7.0 libstdc++.
Update your Fedora
 
@rubenvb I just installed it. And run update kernel*
 
# yum update-this-shit # not a real command
 
2:24 PM
I guess I should get around to rebooting, I think I've installed like 3 kernel updates since the last time I did :-P
 
[\033[01;32m][\u@\h][\033[01;34m] \w[\033[00m]\n>
The best prompt.
 
@Collin Use Arch.
 
@rubenvb So could you please translate it to human, what should I do?
 
@BartekBanachewicz Use another Linux distro.
 
@rubenvb ?
 
2:26 PM
@rubenvb I spent two days trying to install a one that would work with g++ 4.7.0. Please not again.
 
On Arch you'd install 20 kernel updates in the same time, and also broke your system at least twice.
 
@rubenvb How does that help?
 
Still would need to reboot to new kernel versions
 
I use Arch on my server now. :v
@Collin kexec 'em.
 
effectively, my prompt is just '$'
 
2:27 PM
That's an awful prompt.
 
Full of awe.
 
the actual PS1 string is a bit more complex, as it does some magic to show clear case view if one is set, and also throws some stuff that the terminal title
@CatPlusPlus what more do I need?
 
I don't know, working directory?
 
window title is along the lines of \u@\h:\w
 
lol
 
2:28 PM
Seriously, even the Windows crap cmd prompt has the working directory.
 
Using window title for this is counterproductive. You have to scan for the information.
 
@CatPlusPlus get's too long most of the time, so I would rather just get it when I want it, or look at window title
 
Might as well use whoami and pwd manually.
 
@thecoshman I just use the basename (\W)
 
I use two-line prompt.
I can get as long as it wants.
 
2:30 PM
Yeah, me too.
 
@CatPlusPlus not really, as I can have a few windows open, and just look through them to know which one to go for, even when they are running something that would stop me being able to do as pwd or look at the promt
 
@thecoshman New linesss.
 
`d-wx--x--x. 5 minecraft minecraft 4096 Aug 18 18:09 minecraft`

..How did I set those permissions?
 
Coincidentally, multiple windows suck too.
 
I solve all my screen real estate problems by using three monitors.
 
2:31 PM
@Collin Mine looks like .
 
I find the '$ ' sticks out well so I can see what commands I have done where
 
You suck at prompts.
 
@Collin $ chmod 311 minecraft?
 
@LucDanton work is too cheap for that :(
 
@R.MartinhoFernandes could have sworn it was 755.. but I dunno
 
2:31 PM
The ± is to tell that I'm in git.
 
yes
 
It's kinda worthless to have an article titled "Monads in Pictures" if the pictures don't load.
 
@R.MartinhoFernandes it works
 
2:33 PM
Oh wait, they loaded now.
 
@R.MartinhoFernandes Took me a while to get the page to load, also had to reload one of the images.
 
I swear they weren't loading before.
 
By 'took a while' I mean something like '5 minutes'. I believe you.
Today's excuse for slacking is that it's just too damn hot.
 
Mine is that I'm reviewing code.
 
I fixed a bug!
 
2:41 PM
okay, so 0100 is 4 because 8 * 0 + 4 * 1 + 0 * 0 + 0 * 0 = 4. So basically, as we go left, each value represents a greater power of 2. But then, how is 10101010 = 170?
Binary is confusing.
 
work related desire to give up on everything is rising again
 
@ApprenticeHacker because it's 2 + 8 + 32 + 128
 
FTR it works the same as decimal. 100 is 1 * 10^2
 
where's the confusion?
 
2:43 PM
0 * 2^0 + 1 * 2^1 + 0 * 2^2 + 1 * 2^3 + 0 * 2^4 + 1 * 2^5 + 0 * 2^6 + 1 * 2^7
@LuchianGrigore No, it's not.
 
@ApprenticeHacker and your equation is correct, but a 'correcter' version would be 8*0 + 4*1 + 2*0 + 1*0
 
Oh, +.
 
@CatPlusPlus :))
 
weird how a few chat messages taught me more than the entire article I just read.
thanks, all
 
@ApprenticeHacker it depends what encoding really :P you could say the left most 1 is a negative value, letting you use negative numbers
 
2:45 PM
"Is there any online VS2010 compilator?"
compilator
Look at it!
LOOK AT IT!!!
 
Ugh, one my coworkers introduced crazy global state here.
 
Compilateur in French.
 
There will be pain.
 
lol
@R.MartinhoFernandes but Shirley, you need it!
 
Shirley?
 
2:48 PM
Not really.
Airplane! (titled Flying High! in Australia, New Zealand, South Africa, Japan, and the Philippines) is a 1980 American satirical comedy film directed and written by David Zucker, Jim Abrahams, and Jerry Zucker and released by Paramount Pictures. It stars Robert Hays and Julie Hagerty and features Leslie Nielsen, Robert Stack, Lloyd Bridges, Peter Graves, Kareem Abdul-Jabbar, and Lorna Patterson. The film is a parody of the disaster film genre, particularly the 1957 Paramount film Zero Hour!, which it follows fairly closely, with superficial changes. For example, Ted Striker was Ted Stry...
Get some culture, boy.
And don't tell me it's from before you were born. I was born 7 years after it.
 
@R.MartinhoFernandes wrong 'Shirley?
still, I thought you would appreciate the reference, you often try to slip it in any place you can
 
@R.MartinhoFernandes you read minds? :D
 
@thecoshman That was meant to @ApprenticeHacker. You got it right.
 
@R.MartinhoFernandes well... with out reading the script, it could be any spelling of the name :P
 
The "Shirley" joke is currently well-known because the actor that originally said it recently died.
 
2:52 PM
@StackedCrooked is the actor who is in Airplane? as well as Naked Gun etc.
 
or does the pun originate from an even older film?
or maybe I am confusing people :S
 
good morning
 
@ApprenticeHacker The only excuse I accept for not having watched Airplane! is that you died before 1980.
 
@R.MartinhoFernandes ... I best find a torrent :P
@Chimera the majority demographic would say otherwise
 
2:57 PM
@R.MartinhoFernandes woot
 
@R.MartinhoFernandes huh... not sure why, but I always pictured you as old then that
 
Because I'm so incredibly awesome?
 
@R.MartinhoFernandes fanatical devotion to the pope templates
 

« first day (675 days earlier)      last day (4279 days later) »