« first day (499 days earlier)      last day (4450 days later) » 

8:00 PM
@SethCarnegie Hmm, O(-1) can be pretty useful for FTL travel...
 
And I won't even talk about O(-n)
 
What about O(i)?
 
@Mysticial that's UB
All O(i) algorithms do is throw exceptions and crash the universe
because the universe doesn't handle exceptions
 
sbi
@Mysticial Preferably you just switch policies for the same algorithm. TMP FTW! :)
 
@SethCarnegie I think an O(-1) function is the same as O(1) with a negative constant. Which goes to show why those constants are important
 
sbi
8:04 PM
@Mysticial You got that backwards. O(-1) is the result of FTL travel. But it seems not even neutrinos have found a way to do FTL.
 
@Abyx I don't think you can rely on a particular type. But you can rely on only 32 bits being significant, because that was an issue with 64-bit Windows. If you're thinking of reusing unique_ptr, I would instead recommend just defining a proper scopeguard class (trivial in C++11)
 
@sbi You should take a look at the GMP's thresholds for large multiplication... Not only do they have 10 different algorithm with different complexities, to optimize for 2-dimensions of input sizes of different magnitude and ratio...
@sbi I'm pretty sure the GE equations work both ways? If you can do either then you can do both?
Or am I completely wrong?
 
sbi
@Mysticial I have very little knowledge of advanced physics.
 
Same here, I just read it because it's interesting, but I don't understand much of the math.
 
@sbi I think you can also use the Alice trick of just walking through a mirror
 
sbi
8:06 PM
@CheersandhthAlf Why do you think I could do that?
 
Martin Gardner wrote about it in funny way. Like, why is it mirror exchanges left and right but not up and down? (Befuddling!)
 
@CheersandhthAlf the answer to that is easier than it seems
@CheersandhthAlf I've always wondered: what is hth?
 
Xeo
hope that helped/helps
 
silly trick to display a custom thread name in windows debuggers:
 
sbi
8:11 PM
@CheersandhthAlf Wait. You have to raise an SEH exception in order to set a thread name? OMG.
 
@sbi first expansion on the results list (not the first result page) is "Have to Hurry"
 
sbi
@MooingDuck LOL!
Well, it seems I got a very serious and quite tempting job offer today.
I could write C++ again!
 
@sbi Java? too late :(
 
sbi
@Abyx Nothing tempting about that. :-/
One catch is: I would have had to give my resign notice to my current employer today in order to start working for a new employer March, 1st. (My current contract says six weeks to the end of the quarter.)
 
Xeo
Today? A bit late for that, isn't it?
 
sbi
8:15 PM
@Xeo Yep. So July, 1st is the earliest possible date I could start to work for them.
 
Xeo
That's bitter
 
sbi
But: I have already planned the summer with the mothers of my kids, and I will have to care for them for three weeks in a row end of July/beginning of August. And I doubt those guys would hire me and let me leave for a three week vacation the very same months.
 
@sbi preschool/reduced hours?
 
sbi
@MooingDuck Eh?
 
Xeo
@sbi Ouch, bad chainreaction
 
8:17 PM
@sbi When I got my current job I was still in school, so I only worked 24 hours a week. Or put the kids in preschool 9 hours a day :/
 
sbi
@Xeo Yep. The mothers of my kids by now have applied for the holiday according to that plan, and got it from their employers. There's no way I could change this now.
 
Xeo
So, Oct 1st?
 
sbi
@MooingDuck Two of those three weeks the kindergarten my youngest goes to will be closed for summer holiday. All the other kids will have school holidays, too, and I wouldn't want to not to have a vacation with them this summer.
@Xeo Sounds bad, doesn't it? I doubt they'd want to wait for half a year for me.
 
Xeo
Wait, do they only hire at the start of the quarter?
 
sbi
Hey, does anyone of you want a C# job in Berlin? Small company, nice office, great co-workers, a very interesting project, and I could give a good estimate on what salary you'd be able to bargain for. :) If I find someone else, they might let me go earlier.
4
 
Xeo
8:21 PM
Sorry, no knowledge with C# :)
 
sbi
@Xeo No, but according to my current contract, I have to turn in my resign notice six weeks before the end of the quarter.
 
my C# is readonly
 
sbi
@Xeo Neither had I when I started. I picked up the basics in about two weeks.
 
Xeo
@sbi Ah, and not working 3 weeks isn't an option, eh?
 
no knowledge of German :)
 
8:23 PM
as opposed to being unable to read all of perl, despite the fact I use it at work :/
 
sbi
@MooingDuck I consider C# slightly too talkative for my taste (C++ is terser), but it's definitely not readonly code.
 
@sbi I mean, my C# skills. I can read, but not write, C#.
there's probably a linguistic term for that
"not a fluent speaker"
 
sbi
@MooingDuck Yeah, I saw this after I posted my answer. I tried to tone it down then without erasing it. Sorry.
 
Xeo
@MooingDuck Maybe should've said "skills", then. :)
 
sbi
@Abyx German might not be needed. This company has an office in England and one (currently empty, though), in the US. Currently all developers speak German, but we regularly have meetings in English, too. If you're honestly interested, I can try to find out what the R&D head thinks about it. (I would need to be careful, though, as long as I haven't signed a new contract.)
@ScottW This job is non-remote, strictly.
 
8:28 PM
I know German @sbi
 
sbi
@TonyTheLion What are your C#/.NET skills?
 
sbi
@Xeo I didn't get this.
 
@sbi not bad, considering I coded C# for a year before I got to C++
I learned programming through .NET/C#
luckily not through Java :P
 
Xeo
@sbi Ah, nvm. I read your holiday plans as "beginning july"
 
8:29 PM
ohhh holidays
I'm also planning mine
LA and Alaska perhaps
 
@sbi no, thanks, I'm too lazy to relocate to another country
 
@TonyTheLion I grew up in Alaska, it's a pretty neat place to visit (not a great place to live)
 
sbi
@TonyTheLion To be frank (I prefer being frank), unless they are better than your C++ skills, I'd be surprised if you had a chance. No offense meant.
@TonyTheLion And would you be willing to move to Berlin?
 
@sbi I had this idea already, but thanks for considering
 
sbi
@TonyTheLion See, I really cannot assess your C# skills, so it's hard for me to assess your chances.
 
8:34 PM
@sbi if I got a job, yes
 
sbi
@TonyTheLion Ok. If this works out for me, I'll ping you by mail. When could you start?
 
can't you tell dwarves to dig forticiations anymore? Or do we have to construct them?
 
@sbi Only in a few months, I'm on a contract atm
 
sbi
@TonyTheLion Well, then this depends on what you consider "a few months". Two? Fine. Five? Then that's the problem I currently have. I would need someone who could start preferably May, 1st.
 
oh right, can only dig fortifications in smooth stone
 
sbi
8:38 PM
@TonyTheLion Oops. Now I understand. You aren't satisfied with your current job?
 
@sbi oh I didn't realize this
@sbi I am, but it's not a permanent contract
 
sbi
@TonyTheLion I see.
 
@TonyTheLion I moved to C++ from pascal.
 
sbi
@TonyTheLion Start reading here: chat.stackoverflow.com/transcript/message/2771146#2771146. It's quite a complex scenario.
 
1
Q: Data Structure class in College

leocodNext Spring I have to take a data structure class in college. They offer two choices. I can take it in Java or I can take it in C. I have taken two courses of java a year ago and I am taking C now. Some of my friend who took it in Java, they have ended up taking it again in C. Is there any dif...

Top answer, lol
 
sbi
8:42 PM
@Mysticial I honestly think it's a very good answer.
 
No, I definitely agree with you. But it's still funny.
 
sbi
@Yuki I moved from BASIC to Z80 machine code (no assembler) to Pascal. Then I started studying and had to learn Ada. From that I learned C++ by myself for a project we made. I also had to write some C, FORTRAN, COBOL, LISP, Prolog, and some YACC stuff for assignment as a student. And some other stuff I might have forgotten. I had to learn C# for my current job.
You might notice the absence of all the "modern scripting languages". Yeah. I'm old-fashioned.
 
@sbi I can definitely not be available by 1st of March, so if you find someone that is, please take don't hold back
btw, is my C++ skill that noobisch still then? (no I didn't take offense, I"m curious on your opinion)
 
sbi
@TonyTheLion March it needn't be. May?
@TonyTheLion I'm not sure. I haven't seen you asking C++ questions here for a while, so I might be misjudging you from what you asked months ago.
 
@sbi right, well I'm still learning every day :)
 
sbi
8:52 PM
@TonyTheLion So how about May?
 
@sbi oh, well, I don't think I will be done by then, but I'm not sure.
 
@sbi I'm interested :) I'd have to learn German.
 
sbi
25 mins ago, by sbi
@Abyx German might not be needed. This company has an office in England and one (currently empty, though), in the US. Currently all developers speak German, but we regularly have meetings in English, too. If you're honestly interested, I can try to find out what the R&D head thinks about it. (I would need to be careful, though, as long as I haven't signed a new contract.)
 
Any gcc / g++ users out there?
 
raises hand
 
8:55 PM
I've run into a rather strange issue.
Some kind of weird permissions error.
Is there any way to make g++ tell me what exactly is causing the problem?
I tried the -v switch.
 
And -v -v -v?
 
Oh, you can use more than one???
That's... an interesting set of switches...
 
As a final resort, you can always use Process Monitor and find out what are the files in question.
If the permissions indeed stem from file accesses...
 
d:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: reopening ../../../bin/uic3.exe: Permission denied
^--- A little bit more information.
I wonder why it is reopening the file.
It doesn't exist.
 
sbi
8:59 PM
Wow, @George is here! Welcome back!
(Weren't you one of the founding fathers of this room?)
 
@sbi Sort of...
I pop in now and then.
 
schmetterling is such an ugly word for such a beautiful creature, why German language, why? (butterfly in English)
 
Thanks for the welcome though!
 
sbi
@GeorgeEdison I don't think I had seen you in a year.
 
Wow... has it been that long? :)
 
sbi
9:00 PM
@TonyTheLion I don't know, and I fully agree, but I don't consider "butter fly" an exactly awe-inspiring term either.
 
@sbi perhaps yes, but it's not so horrid sounding as the German word
 
@GeorgeEdison I don't think I can help anymore.
 
sbi
@GeorgeEdison Well, we have fairly incompatible sleeping rhythms, so I might have missed you. All I said is that I hadn't seen you. :)
 
@sbi Shall I contact you by mail?
 
sbi
@RMartinhoFernandes Do that! Make sure you read what I said here and following, though, before you waste time on the issue.
 
9:02 PM
This is probably a silly question but... is there any difference between mingw32-g++ and g++ that come packaged with Mingw32?
Is one just an alias for the other?
 
I suppose so.
I don't even remember having a mingw32-g++.
 
Yeah, I'm going to take a guess that the reason for having both is to facilitate cross-compiling - for example, Unix users have an actual g++ binary that creates native ELF executables and the command mingw32-g++ can co-exist for creating Win32 apps.
Just a guess though.
 
user1182183
Hey people, does maybe anyone know a cross-compiler (or linux compiler) for windows that supports C++11 or can anyone tell me which linux I need to download to be able to install GCC 4.7.0 ?
 
Hmm... Ubuntu is still shipping 4.6 :(
 
Xeo
@RafalGrasman Clang SVN has most of C++11
And you can build it from source
 
9:07 PM
@RafalGrasman You could always try building GCC 4.7 in cygwin.
 
@GeorgeEdison What? 4.7 is out?
 
user1182183
Well the fact is I'm not that goot in linux ;]
 
I don't think so.
 
sbi
@GeorgeEdison Apparently I was wrong: chat.stackoverflow.com/transcript/10?m=1863566#1863566 That's only 105 days ago. :)
 
Xeo
@RafalGrasman I wasn't either, until I set up a Debian vbox to try Clang :)
 
9:08 PM
@GeorgeEdison They why would Ubuntu ship it?
 
user1182183
Will clang be able compile my CPP project on CentOS 6.2?
 
Xeo
Dunno?
 
@sbi Wow... I guess you're right.
 
user1182183
well assume my cpp project works.. xD
 
@RMartinhoFernandes Ubuntu has been known to ship things before their official release now and then.
 
user1182183
9:09 PM
at least on windows
 
But you're right - they probably wouldn't do it with something like gcc.
 
user1182183
But somebody mentioned cygwin?
 
user1182183
George, u sure it can compile C++11 code? :d
 
You can grab GCC 4.7 prebuilt binaries (both for Windows and Linux).
 
user1182183
i downloaded a .rpm for my CentOS but the install says I don't have the depencies -.-
 
user1182183
9:10 PM
and I don't know how to build GCC from source
 
user1182183
and the .rpm is for fedora I think... I thought it would be compatible
 
@RafalGrasman clang++ might. It's in epel - wget the appropriate .noarch.rpm, then yum install it. I did a yum list clang and the version I see is 2.8-14.el6. gcc-c++ is at 4.4.6. You might be able to pull later packages from centos' equivalent of rawhide.
 
@RafalGrasman g++ 4.7?
I'm not sure.
 
Xeo
@Ninefingers Wow, 2.8 is ages old
 
@Ninefingers Both those versions are very poor in terms of C++11 support.
 
Xeo
9:16 PM
Given that the SVN Trunk is 3.1
 
(No support at all, I think)
 
@Xeo It's CentOS, unfortunately :( Fedora support is better, which is what I use on my desktop, but I have a few centos servers around, so I thought I'd put some versions up - knew you guys would know which supports C++11.
 
You need Clang >= 2.9 or GCC >= 4.5.
 
user1182183
I have .. lemme check, gimme a minute
 
user1182183
slow vmware...
 
user1182183
9:22 PM
ok eee, my mouse aint working in the VM now somehow.. any shortcut for terminal?
 
user1182183
hmm ah, got 4.4.6 ~.~
 
user1182183
Cygwins highest I can get is 4.5, hopefully it will compile the code Luc danton gave me
 
Xeo
@RafalGrasman I think @rubenvb has a 4.6 or even 4.7 mingw build up somewhere?
Even with Clang SVN IIRC
 
Just had a clangasm while reading the C++11 status page.
 
user1182183
9:29 PM
Well let's give it a try
 
@sbi i'm still only two weeks into my three month cure, otherwise i might've considered strongly
 
sbi
@CheersandhthAlf You? C#?
 
libc++ Y U NO BUILD?
 
well i haven't touched c# since before it got templates, but e.g. i wrote a super-quick local file search gui (front end for ms index server) in C#. i was the only user but dang it was quick about it. only problem one had to run index server.
 
Templates, lol.
 
9:32 PM
generics, whatever
 
I think he means generics
 
sbi
@RMartinhoFernandes My thought, exactly.
 
Today I tried to install Avira on my mother's computer. It didn't work initially, because Avira requires Windows XP SP3. Windows XP SP3 is almost four years old :)
 
user1182183
Mhm I skipped the XP era..
 
Incompatibility sucks.
 
user1182183
9:33 PM
win98,win2k,win vista, win7
 
I needed Windows 95 a few months back so I could play The Neverhood.
It didn't install on Windows 7.
 
user1182183
you need a partition which is at the beggining of the disc, formatted into FAT, max 2GB, after the first 2 GB you install windows 7, on the first 2 GB win 95/98/2000 and you're ready to dual-boot
 
What about VMs.
 
user1182183
can be done, at leat less problems with drivers
 
Really, dual-booting Win95 sounds...
 
9:35 PM
I used VMware. Rebooting sucks.
 
Not sure what.
 
user1182183
however I can't get 98 working in a vm..
 
After I installed SP3 and Avira, the Avira update didn't work "because of an error". According to the logs, it was a harddrive space problem. I checked, and indeed there were only 15 MB left on the first partition :)
 
user1182183
vmware tools won't install
 
You don't need them.
 
user1182183
9:36 PM
Lol,
 
user1182183
Yes I do
 
user1182183
especially for the graphics drivers..
 
user1182183
I hate 16 colors..
 
Ah k
 
@RafalGrasman Which of the 16 colors do you hate the most?
 
9:37 PM
I installed Windows 7 today in a VM so I could do Visual Studio. Works fantastic.
 
user1182183
well, i think black is used the most in win98 :P
 
Only I can't stand ClearType.
 
user1182183
clearType just makes your text on screen nicer
 
user1182183
try drag and drop a file and u will see ugly text
 
user1182183
while dragging
 
9:38 PM
ClearType looks horrible on my screen.
 
user1182183
hmm, maybe it depends on something? Ah anyway it's possible to turn it off, very easily actually.
 
I'll get used to it.
 
You can tune it.
 
user1182183
@RMartinhoFernandes I got the package, can I just copy my msys to the downloaded mingw?
 
user1182183
(from the old mingw)
 
user1182183
9:40 PM
else how can I compile any example project from a makefile? :P
 
@RafalGrasman I think so. Maybe.
 
sbi
Wow. I just read an interview with a psychiatrist who works with TEPCO employees in Fukushima. That sounds so horrible.
> When a catastrophe like a tsunami hits a community, 1-5% of the people will be traumatized. Among policemen, firefighters and other helpers, 10-20% will be traumatized. Among the TEPCO workers, this quote is much higher. (translated from a German translation of the original Japanese interview)
He wouldn't give a number, though.
 
the radiation was severe at Fukushima, so I can only imagine that it must be fairly traumatizing
 
sbi
> I treat a man in his early forties. He had a house at the coast close to the power plant, which the tsunami took. It also took his 7 year old son. The man hat to leave and search for an apartment, but the landlord didn't want him, because he works for TEPCO. When he finally found an apartment, neighbors stuck notes to his door: "Leave, TEPCO worker!"
> Because he had caught a high dose of radiation, he had to change to a different department in the company, where he now does an office job for which he wasn't trained and which he doesn't like. He's afraid to get cancer, he has very serious financial troubles after losing the house and having his income cut by 20%.
> Plus he has problems in his family. His mother lost her husband and feels guilty for having been unable to save him and her grandchild. When the man comes home, she weeps a lot, and he is unable to rest there either. (This, too, is translated from a German translation of the original Japanese interview.)
How much can one person take?
 
Xeo
@daknøk Yep, Lambda, constexpr, list initialization all SVN :)
 
9:46 PM
Time to compile my code with clang. Here goes nothing,.
 
Xeo
ToT?
 
@sbi seems one person can take a lot
 
> .../src/libcxx/src/stdexcept.cpp:18:10: fatal error: 'cxxabi.h' file not found
@Xeo any ideas?
 
Xeo
@RMartinhoFernandes One sec
 
9:47 PM
ToT is a silly term.
 
dwarffortresswiki.org/index.php/… This is news to me. Apparently due to a bug this map had a giant 2000 block high tower of adamantine spawn on his map.
 
Xeo
@RMartinhoFernandes Wait, is that with Clang or libc++?
 
@Xeo libc++. Clang is ok.
 
sbi
@TonyTheLion Apparently, needing the help of a psychiatrist is frowned upon in Japan. People try to avoid that. That one psychiatrist with a small team (not paid by TEPCO, BTW, but by the government) tries to help the worst cases of the 1000 of the workers who worked there before the tsunami. Of the 2000 external temps who were brought in later none have such help.
 
@RMartinhoFernandes You're not worthy.
 
Xeo
9:52 PM
sudo cp /usr/include/c++/4.6/cxxabi.h /usr/local/include/
sudo mkdir /usr/local/include/bits
sudo cp /usr/include/c++/4.6/x86_64-linux-gnu/bits/c++config.h /usr/local/include/bits
sudo cp /usr/include/c++/4.6/x86_64-linux-gnu/bits/os_defines.h /usr/local/include/bits
sudo cp /usr/include/c++/4.6/x86_64-linux-gnu/bits/cpu_defines.h /usr/local/include/bits
sudo cp /usr/include/c++/4.6/x86_64-linux-gnu/bits/cxxabi_tweaks.h /usr/local/include/bits
sudo cp /usr/include/c++/4.6/bits/cxxabi_forced.h /usr/local/include/bits
From a thread on the clang mailing list
 
Agh, what? I'm not gonna butcher my filesystem.
 
Xeo
Change 4.6 to 4.7, obviously
 
And to think you might just switch to that user with su.
 
Xeo
@RMartinhoFernandes It's not butchering
It's just putting the GCC cxxabi files were libc++ expects them
And it's all nice and tidy under /usr/local/include/bits (most of it, anyways)
 
I don't write to /usr by hand. Only the package manager does.
 
9:54 PM
It's /usr/local.
No package manager writes to /usr/local.
 
Xeo
Isn't /usr/local meant to be written to by the user?
 
sbi
I'm considering going to the pub to celebrate the day by having a few beers, but I guess I'm too tired. :(
 
Xeo
Yeah, old man ape shouldn't go out after 11pm :P
 
I had my electrical wiring fixed today. Now I have five holes in a ceiling.
 
sbi
9:56 PM
@Xeo You got that wrong. I'm not going out. I'm going home from work. Of course, you wouldn't know what that means...
 
Xeo
@sbi Wait. What?
 
6
Q: Why does the following code compile even though I have undefined member functions?

SamaursaI was halfway through working on this piece of code and thought this is obviously not going to compile before hitting the build button. I was surprised that it not only compiled, but linked and worked as well. If I were to guess I would say that SFINAE is responsible for it compiling... is it? ...

 
I hope I get some better sleep tonight, I've been really sleeping badly lately
 
9:58 PM
Can someone just come over and say "It's a bug. It violates §x.x.x". I'm too tired to grep the standard now.
 
sbi
@Xeo You don't know what I'm talking about? Work. A-r-b-e-i-t. :)
 
Working to this hour is unhealthy.
 
@Xeo I'd rather mess with the build system and add a -I flag.
 
I think all the regulars in this room should one day meet IRL somewhere
 
9:59 PM
Hell, working to any hour is unhealthy.
Working is unhealthy.
 
You shouldn't work, people.
 
Xeo
@sbi Ha ha...
 

« first day (499 days earlier)      last day (4450 days later) »