« first day (827 days earlier)      last day (4347 days later) » 

17:00
@Mysticial litb?
@sehe Johannes
you said tlib, swhy I asked
Then I remembered it wrong.
He made a very valid criticism of my integer overflow question. I tried to fix it - I guess it wasn't good enough.
2 hours ago, by FredOverflow
@StackedCrooked Bjarne is still working on that with a graduate student and other people. Concepts are much simpler now.
rewatching it now
Ell
Ell
@rubenvb what else is it?
17:06
WOOHOO!
vg++ correctly transforms output!!!
Let's plug this badboy in.
@sehe Just wondering, where did the "litb" come from? I see no relation it has with his name?
user784668
hai folks
user784668
Is it possible to make the iostreams throw an exception upon a formatting fail?
@Mysticial it's been explained as many times as I have forgotten it
Hmm, standard library uses noexcept quite sparingly
I would have expected it used more
user784668
17:11
@KonradRudolph Templates.
2
@Fanael So? You can have conditional noexcept
@sehe lol
user784668
@sehe Oh yeah, I knew there was a member function like that, I just forgot its name.
cough - that was so hard to think of :)
user784668
17:17
@KonradRudolph Deemed too complicated to implement?
probably
user784668
Because if the standard library tried to be fully noexcept-correct, many noexcept specifications would probably look like noexcept(T_doesnt_throw_when_foo && U_doesnt_throw_when_bar && pancakes).
@Fanael Yep. But isn’t that the whole point of making noexcept composable?
if you don’t use it, why introduce it?
user784668
m'kay iostreams ur exception messages suck
user784668
e.what() returned "basic_ios::clear". D'uh.
17:20
@Fanael pancakes...
user784668
@sehe Yes, pancakes.
user784668
@KonradRudolph File a defect?
@Fanael Eurgh. Can o’ worms.
user784668
@sehe Uh. What's the type of the exception that will be thrown?
Bleerrrggghhhh.
I hit a wall. =[
user784668
17:25
I'm seriously thinking of reading the file with one read and parsing it later by hand.
BUT!
On the bright side!
Ell
Ell
is there a symbol for string concatenation? because "+" is wrong (according to lot's of people)
@Ell what?
user784668
@Ell ++
Ell
Ell
"one" ++ "two" ?
user784668
17:26
Yes.
Ell
Ell
but that implies you can do "onetwo" -- "two"
user784668
No it doesn't.
user142019
Is it possible in C# to create an instance of T<U> when U is not known at compile time (I have an instance of object.Type)?
user142019
I currently use a dictionary of Types and handlers but IMO it's ugly. gist.github.com/4580056
17:27
Double-clicking now redirects me to the tab with the code and the error! :D
user784668
@ThePhD vg++ wat is dat.
vg++ is g++ whose output is filetered to be usable in Visual Studio
I made it myself. :D
user784668
@ThePhD cuz it sounds liek a good idea
user784668
@ThePhD Care to share?
It's not quite ready yet.
17:28
> made it yourself
Right now, you have to directly specify which files to compile, rather than having VS take care of it like a good IDE should.
I linked you to an article on how to do it
>:(
@Rapptz You're damn right I did, in C#.
I wasn't going to use that PERL shit.
user784668
@ThePhD Whatever. I can live with not quite ready code.
@Fanael I can't. :c
user784668
17:29
@ThePhD Yes you can.
I caannn't.
Ell
Ell
@Fanael why doesn't it?
@Rapptz I think I need your help.
With what
Well, remember how Sublime Text 2 didn't allow you to get a list of files to pass to G++ to compile?
user784668
17:30
@Ell Point me to all the GHC bug reports that claim that since there's a ++, there should be a --.
I'm using C# now. I can get the file list myself by parsing the .vcxproj file.
Cool
That means I can say "Look at all the included files in the project, and include them on the G++ command line"
But I need help doing the parsing.
@Ell It had everything the C++11 stdlib added. Unicode string, signals+slots,....
We can code it together! <3 <3 <3
17:31
@Fanael I except std::exception& or std::runtime_error&, but bad_cast, range_error etc. could happen, depening on what things you format
user784668
@sehe std::ios_base::failure it seems.
user784668
Crap, I'm doing it by hand.
♬ We code together ♩
♪ Like ramalamalama, ka-dinga-da-dinga-dong ♫
can I set a member function's default argument to a class member?
See? We even have music to code it with @Rapptz provided by Sehe. Destiny smiles on our union
17:33
dammit only if it's static, which it most certainly isn't
user784668
Bah.
user784668
@ThePhD lol
user784668
Fugly it is.
@Fanael what is the code supposed to accomplish?
17:34
@Fanael inb4 boost::spirit :)
user784668
@rubenvb Look at the function name. And return type. And the argument.
three things I skipped over.
Why all the seeking?
So, Whaddaya say, Rapptz?
Why not just std::copy and istream_iterators?
vg++ for the masses? :D:D:D
17:35
also, open in binary mode
Are you sure *.cpp doesn't work btw
user784668
@rubenvb Because one read. But yeah, std::copy with istreambuf_iterator would be good enough.
user784668
@rubenvb No.
@Fanael it's double buffered anyway. Ah wait, you used filebuf directly. Why?
Yeah, I've tried it like a billion times. =[
I don't know what's up with my MinGW distro, or what's up with sending parameters on the command line to g++ (through another program like VS, Sublime Text 2, etc.)
user784668
17:37
@rubenvb Or yes. I'm parsing by hand anyway, I can handle different newlines better than the file stream.
user784668
@rubenvb Cuz it was the first thing I thought of.
because fstream is for n00bs?
and if you don't input in binary mode, your C++ lib implementation might handle different newlines automagically.
Or it might not.
user784668
@rubenvb I know. It depends on the OS, mostly.
user784668
@rubenvb Because ifstream and std::istream_iterator<char> will skip over whitespace. Unless I change the flags, but then it's effectively filebuf with fancier interface.
user784668
Yeah.
user784668
17:40
std::copy(std::istreambuf_iterator<char>(&filebuf), std::istreambuf_iterator<char>(), std::back_inserter(result));
user784668
Better.
user784668
'cept it won't handle errors very well.
Woah, did you use voicecom? Where? It would be nice to hear you and speak with my terrible accent.
Anyway, I was curious if anyone here actually bought the ISO standard, or are we speculating about n3485.
@Fanael what kind of errors do you want to see handled? The file is open. If the contents aren't what you expect, you should handle that later.
user784668
@rubenvb I/O errors.
user784668
17:43
@rubenvb Someone unmounting the drive when files are still open. NFS and a flaky network connection. That kind of stuff.
oh.
Stuff that happens in the real world.
Since when are we concerned with that kind of thing?
@R.MartinhoFernandes Hey, did you have a MoveConst template or similar in wheels? (– To transfer const-ness to another type)
@Fanael couldn't you get those from the stream state after the copy?
I'd say a bad stream state follows from a failed stream iterator increment that is not an eof.
user784668
@rubenvb No state since it was a filebuf, not a stream.
@Fanael so now you have a reason for using a stream.
user784668
17:47
@rubenvb Yes, and now I'm using a stream.
open, copy, check state. If bad, I/O error.
better than first seeking and stuff.
that one, yes
propagator... sounds physics-y
@FredOverflow Except you would need 32 overloads to cover for 5-argument ctors (63 for 5-or-less).
user784668
17:56
user784668
Not better.
Qt Creator + Clang 3.2 = win in solving compiler errors.
user784668
Raises exception.
you can turn off stream exceptions.
I thought they were disabled by default.
@rubenvb are you using qt 2.6?
user784668
17:58
@rubenvb They were and I enabled them.
@bamboon I'm using the Qt Creator 2.6.1 release.
user784668
Okay.
@Fanael ah, why is it not better then?
@rubenvb I finally have to give it a try but I will miss ctrl-D from sublime so much
user784668
So istream_iterator reads till failbit. And I'm testing for failbit.
18:00
@bamboon what does that do?
@rubenvb it selects every further instance of the current selection. goto-anything is also nice
@bamboon that happens in Qt Creator when your cursor is on an identifier.
but only in the same file
You can find all occurences of a string though.
user784668
But this works: ideone.com/VlO2tE
user784668
Okay, so I guess Boost contains some code that makes reading a file a breeze. Does it?
@rubenvb but, in sublime you can then select them all and batch edit on them.
18:02
14 mins ago, by rubenvb
open, copy, check state. If bad, I/O error.
@Fanael no. Its iostreams are abstract things that need implementations.
@bamboon sounds useful. Guess I'm getting used to Qt Creator's workflow/features/shortcomings :)
I don't do mass mechanical edits often.
user784668
@rubenvb badbit? libstdc++ hardly ever sets it.
@Fanael you just said this works: ideone.com/VlO2tE
why not simplify and just check (!file) at the end?
user784668
@rubenvb !file is file.fail().
user784668
5 mins ago, by Fanael
So istream_iterator reads till failbit. And I'm testing for failbit.
user784668
18:06
IOStreams. The most fucked up I/O library in the fucking world.
@R.MartinhoFernandes Why? MSVC has T&& and std::forward, doesn't it? :)
g++ *.cpp never works for me.
Fucking g++. Fuck the police. Fuck the man.
@ThePhD make file
user784668
@ThePhD g++ $(ls *.cpp)
I'm not using Bash.
user784668
18:08
@ThePhD Neither am I.
@ThePhD y u no make?
How does that even work.
@BartekBanachewicz Because make tickles me silly.
user784668
@ThePhD PowerShell.
@ThePhD it's good.
@Fanael !file checks all kinds of fail.
18:09
@Fanael You obviously haven't even tried most of the alternatives (nearly all the others are much worse). The reality is that iostreams are actually a fairly decent design with some really poor naming and generally awful documentation, so it takes a lot of work to figure out how to use them at all well.
badbit, eofbit and failbit.
user784668
@rubenvb It doesn't test eofbit. It's literally return this->fail();, so it test only failbit and badbit.
user784668
@JerryCoffin You obviously haven't even tried another language, where reading a file is a fucking breeze.
@Fanael Sorry, but you're simply mistaken on that.
@Fanael well, it still works for detecting eof
18:12
just by chance is anybody of you guys running "ubuntu on android"?
@bamboon haha no.
Running linux on top of Dalvik on top of linux on top of ARM.
user784668
Running Windows on top of Hurd on top of MS-DOS on top of original Unix on top of Mac OS X on top of Windows.
lol GNU Hurd on top of MS-DOS. The irony.
@rubenvb i have a web server running that way
18:15
> There is not a single sentence using the English language in a correct way.
2
lol
@rubenvb I just want a phone which can run gcc
lol
@bamboon iPhone or Android will do just fine.
@bamboon why would you want that? Get a rPi instead.
or a Beagleboard, has more CPU power.
@rubenvb maybe he wants a phone.
All I'm saying is that a phone and GCC is a rather strange combo.
user784668
18:18
@rubenvb Well, GCC is relatively lightweight compared to most phone apps these days.
@rubenvb why? I just want to have all the cool tools I have on my pc with me in my trousers
@BartekBanachewicz really? how so?
@bamboon uhm... you get a debian compiled for arm, bundle it in .img file and chroot into it. Then just apt-get build-essential.
@bamboon huh. remote connections are truly something of the past.
> They found that it took n 2 comparisons to sort an ‘organ-pipe’ array of 2n integers: 123..nn.. 321.
@KonradRudolph I don't understand this sentence, what is an organ-pipe array?
@FredOverflow 12344321
18:20
@rubenvb hmm, I don't get what you wanna say there.
@bamboon Why not just ssh into some fast PC you have at home and run gcc on that?
@bamboon ssh.
user784668
@rubenvb Oh wait.
@rubenvb Oh, I thought 123 was the first element.
user784668
I don't want a big string that contains the whole file.
user784668
18:21
I want a string per line.
@Fanael std::getline
you can even choose your eol character.
user784668
@rubenvb Yeah, I know.
you're making a very confused impression today :)
or I'm being to helpful.
user784668
Oh wait.
user784668
You're rubenvb.
user784668
18:24
The guy that compiles GCC.
user784668
Does LTO work for you on i686-*-mingw32?
@rubenvb that would be something like a start but it's still not a clean solution for me. are there any good ssh clients for android?
@Fanael I haven't had much luck with it.
user784668
@rubenvb: ^^^
But I haven't tried it recently.
I'd say no for C++. And maybe for C.
but your mileage may vary (in the positive sense)
user784668
18:28
I filed a bug, but Kai Tietz closed it with WORKSFORME.
@Fanael can I see it?
user784668
LTO on x86_64-w64-mingw32 works.
oh really?
user784668
Really.
18:30
lemme check with my 4.8 build.
I commented on the bug report. Note that this may take long to fix. Kai is like one fo the only devs working on Windows GCC.
Does anyone have experience with Windows' IDispatch interface and Advise/Unadvise?
How does this look for a "professional" website?
@FredOverflow Oh, right.
@FredOverflow That crap was featured on isocpp.org...
crap, how much rep do I need to see deleted answers?
18:41
lame, WTB rep
That site archives SO questions & answers
You can see Q&As even if you don't have 10k rep
.... Oh, boy.
I have to parse .vcxproj files.
Wheel reinvention, thy name is Me.
@RobW thanks, but it doesn't show deleted answers for me either
@ThePhD and you'll have to translate commandline options, like I said a couple of hours ago.
you could use a makefile or CMake or something.
I'd have to wrap up make, then, in vg++.
The point is to parse output so that it works with Visual Studio.
Now I've decided to go meta-meta and make it so I can have a MinGW project built directly out of a vcxproj
So running vg++ "MyProject.vcxproj" will run g++ with all the relevant arguments and such, and post that output to the Output window in Visual Studio like a regular cl.exe compilation or an MSBuild compilation.
Ell
Ell
18:48
Any electrical engineers at hand?
That means I'll be able to abuse Visual Studio's autocompletion and error listing, while having it compile and build a program under MinGW.
@Ell I am, but don't expect too much
@ThePhD Why on earth would you do that?
Astounding benefits.
@ThePhD Instead of parsing vcxproj on your own, I'd consider writing a program named cl.exe that takes cl command line arguments, translates them to g++ arguments, and spawns g++ with the translated arguments (then put it on the path ahead of the normal Cl.exe when you want to compile with g++).
Ell
Ell
18:48
@bamboon can I use a true DAC and put it through a low pass filter as an alternative to a PWM signal?
@JerryCoffin Do you think there'd be a way to hotswap betweem the two? Having two cl.exe's on the command line will undoubtedly make MSBuild freak out.
@Ell You probably can. The PWM route is normally used because it's simpler and cheaper (oh, and quite a bit more efficient, as a rule).
if you print something from MS paint, does it distort the image at all?
@ThePhD To hotswap, you'd need to change the %path% appropriately. Not sure you can (easily) do that inside of VS.
Hm...
Maybe I could trick-flag.
Replace cl.exe completely, write my own cl.exe, and then use a -D flag that would appear harmless to the regular cl.exe, but when shown to my special cl.exe would trigger a G++ build.
18:52
Thinking about it, you probably can use the multi-platform support though -- I'm not sure how the multi-platform support works, but it's doing pretty much the same thing (pointing to different versions of cl.exe in different directories).
@Ell way to practical for me, sounds like an interesting question for EE though
@JerryCoffin that is under the assumption msbuild does not call cl with a full path hidden somewhere in the registry.
@rubenvb There's only 1 cl.exe that a specific version of MSBuild calls for a certain kind of build; if replaced entirely, we can probably get the functionality we need.
You're thinking of replacing cl.exe now?
Ell
Ell
@JerryCoffin Right okay. It was the first way that came to my mind of generating a PWM signal without having to hook up a whole cpu to do bit banging in software :P
18:54
@rubenvb Yes -- but if it's in the registry (or elsewhere) it's still purely a matter of finding where it is, and modifying appropriately. In fact, changing it in the registry is probably cleaner than trying to modify the path.
Well, JerryCoffin brought up a good point. Right now, the vg++ I'm trying to make completley replaces MSBuild in functionality. That's a million times harder than just faking a cl.exe-compatible command line.
oh wow. That's very handy. A build tool that requires Admin access.
My job gets reduced from making MSBuild-like syntax work for g++ and Make, but instead just translation.
The only thing I want to finally support is the ability to HotSwap, that is, change the cl.exe I'm using with a button press or a flag to cl.exe
I think I could do it by manipulating cl.exe -DSOMEDEFINE
@Ell Most microprocessors basically do something like a timer and a register that gets ANDed with the pulses from the timer, so you write (for example) a 16-bit value to a register, and that modulates the pulses from the timer until you write another value. Even if you're not going to use uP, you can do pretty much the same thing (though a pre-built DAC might be simpler/cheaper if the alternative is discrete parts).
I just have to put something really obscure and dumb in that -D so it never collides with anybody's projects ever.
-DROBOTDOESNOTAPPROVEOFYOURSHENANIGANS
Works for me.
18:59
@ThePhD I think it's better to support it as a separate platform or configuration (e.g., "Win32" vs. "Win32 - g++").

« first day (827 days earlier)      last day (4347 days later) »