« first day (1097 days earlier)      last day (4077 days later) » 

10:00
I don't know, I think the idea of explicit functions are cool.
@starmole It doesn't help if you're a lazy slob that doesn't care about readable code (and then, auto or not, you lost already)
ITT experts are lazy slobs
Laziness is a virtue. --said someone else so I didn't have to
Those two characters you described should be pushed out, not catered for.
I'll read the linked question. Thanks!
10:06
I recently found out about BOOST_AUTO
probably based on BOOST_TYPEOF
yeah
it's just a macro for compiler-specific extensions that are similar to decltype
Xeo
Xeo
IIRC, BOOST_TYPEOF also has a very hacky fallback for old compilers that uses overload resolution and integer-encoded-types for deduction.
@Xeo I don't even, typename find_me_the_type<sizeof( detect_the_type(expr) )>::type var = expr; sort of deal?
Xeo
Xeo
something like that
10:09
jesus christ how horrifying
Xeo
Xeo
dunno if they still have it
the question you linked to shows in two examples where it makes sense to me and where not. the auto x = new .. is clearly better and does not loose information when reading. but the auto iterator: i'd rather know it's iterating on a vector right there.
again, this is a concern only for reading code, for writing auto is always great
Have you ever used iterators?
I don't get it :( Why do you care if it's a vector?
(And if you do, why is it not obvious, i.e., how does the rest of the code do?)
it will be obvious if i look up the type. which might be chasing some levels of auto to really find
10:18
I ask because they get annoying insanely fast. std::map<std::string, std::pair<std::string, std::tuple<int, int, float>>>::iterator etc
exactly
Are you saying you care about that type?
i want to see that on the line it is used
@starmole No, no, I mean how can the surrounding code be using a vector, that it is a vector and not some other container matters, and you don't know the type?
Wow.
Dude that "line" alone is 85 columns.
My precious space :(
10:20
To be fair, those pairs and tuples are sorta pushing it outside of generic code.
but it tells me right there what it does
I had to come up with an extremely annoying to type example.
Seriously, pro-tip: if you are reading someone else's code and you read each line in isolation, you are doing it wrong.
i agree auto is great for writing code!
And naming is great for reading code. Noise isn't.
If anything, it's not std::map<std::string, std::pair<std::string, std::tuple<int, int, float>>>::iterator that you care about. It's "the iterator of that thing over there".
10:23
I'm glad to give you a copy-paste-able extreme example.
lol
practical example, profiling code.
How "that thing over there" got past your must-know-all-types scanner without you knowing its type, I don't know.
if i get a hotspot there i know what it is
3 mins ago, by R. Martinho Fernandes
Seriously, pro-tip: if you are reading someone else's code and you read each line in isolation, you are doing it wrong.
What about lambdas?
10:24
if it is hidden behind many levels of auto
They're anonymous types.
/* magic */ lambda = [](int x) { return x + 4; };
@starmole Why do you miss it if there's auto instead?
I should go now.
i will have to spend time to see what the auto is.
just a small inconvenience
@starmole You will have to spend time to see what the code is. Just a small inconvenience.
10:26
@R.MartinhoFernandes ..or you are doing maintenance, trying very hard to get some obscure bug fixed quickly and are really pissed off that you cannot see var types, or even whether they are references or not, in the humungous function you have just breakpointed in..
So is the discussion rhetorical or what?
no. my point is that auto is very convenient for writing code but makes it harder to read.
both effects are tiny :)
That went over you head.
My point is that your examples all assume some stupid thing unrelated to auto.
@starmole ..and so harder to maintain, especially if you did not write the crap in the first place.
Xeo
Xeo
10:28
@MartinJames auto x is always a value, auto& is always a reference - that's no excuse.
@MartinJames But humongous functions are a problem either way.
yep. auto makes it easier to write crap :)
@starmole Push those programmers out. Do not cater for them.
This sort of leniency is stupid.
It hurts the industry.
@R.MartinhoFernandes Indeed thay are, so I need all the help I can get :) I cannot refactor entire apps in the time available for bugfixing, even though I often desperately want to :)
10:30
Because those programmers that write crap with auto, are writing crap without it too. Fuck them.
Xeo
Xeo
using baby = my_interesting_type;
using me = baby;
using chase = me;
// ...
chase x = DoStuff(); // Wheee~
@R.MartinhoFernandes I can't fuck them, even if I wanted to. They left five years ago, leaving their crap behind them :(
Code bases accumulate cruft. After 3 generations very code base is crazy
@MartinJames They didn't write code with auto, though.
auto is 2011!
10:31
..also, some of them are real ugly - I've seen the pics :)
This is like refusing to adopt the automobile because it allows bank robbers to make their escape more easily.
Crap programmers exist. Don't use auto.
I say, no. Crap programmers exist. Educate them or kick them out.
I don't want to get bogged down in horseshit.
@R.MartinhoFernandes True, so they liberally used reference types instead, (and huge functions, and no std containers, and C-style strings etc etc).
@LucDanton Welcome to my world :((
I worked on one of the craziest old consumer code bases out there
all done by good people
all good intentions
10:34
@starmole That is a massive claim!
most likely running on your machine too
@starmole Oh, I don't dispute that :(
Good morning!
You may think so, I couldn't possibly comment..
HI anyway !
auto just feels like getting a crash dump inside a function that takes two void* argument. And is called by function pointer.
10:38
I will pretend I didn't read that.
But enough :)
@starmole I don't even cry anymore when that happens. Also, I've stopped swinging mice by the tail and head-butting keyboards.
@ScottW 'auto' and bad-code time-bombs.
I love auto so much ;_;
@ScottW I can easily do 9k, though falling from that height really needs oxygen.
I can do 9k as well. Give me a week ;.;
10:52
what I find these days is that I almost never declare any variable without using auto.
I adhere to the almost-always-auto style. But it can lead to subtle errors. For example if your function returns a nested future (and you did not expect this). Calling .get() on the result will only block until the outer operation has finished.
@CatPlusPlus so... KPS... new tech tree thing, thoughts?
@MohammadAliBaydoun I can do 9k horizontally in my car, but my diesel Fiesta needs more than a week to do that.
I don't even own a car ;_;
Or if your function returns a pointer and you change it to reference. Then auto needs to be changed to auto&.
10:54
@StackedCrooked That's why auto&&, nub.
also, you'd have to change most if not all of the uses anyway
Xeo
Xeo
auto* p :D
I find myself using auto quite a lot as well. ;o.
The compiler knows types better than I do anyway!
The most insidious I've encountered was when I changed a return value from int to boost::optional<int>.
I wonder if boost::optional<boost::optional<T>> has a use-case ;|
10:58
wow, we're still talking about auto?
Still? I just started.
Just got back from lunch.
Oh, Im getting fucking tired of these 'my app does not work but I cannot post any code and I cannot debug':
http://stackoverflow.com/questions/19419779/exe-size-increases-when-receive-packet-size-is-0
It seems that my application becomes CPU bottlenecked when resolution is 640x480 :D (And after testing just now, 800x600)
@MohammadAliBaydoun Are you calling a method to output one pixel at a time? :)
@sehe I've set up an interactive Julia notebook (as they call it) and checked out that plot. You're right, it is quite familiar
11:06
@ScottW Thanks, I won't :(
@MartinJames Maaaaybe ;_;
I'm only saying it's CPU bottlenecked because as I decrease resolution, FPS without Vsync doesn't go higher than 91000
91000 FPS?
In Debug mode
@MohammadAliBaydoun lol wot the fuck
@MohammadAliBaydoun Oh, of course...
11:09
I only encountered this because I was testing the UI element scaling at lower resolutions :P
It's not like I'm crazy or anything o0 (Okay maybe I am)
personally, I think that 1.5billion frames per second is the ideal amount
not too taking on the CPU or GPU, but easy on the eyes.
@ScottW Then I'll ship a 2 billion FPS version just for you <3
1bil just looks like shit and 2bil is too expensive
OK, what substance am I not on?
2
2 billion is webscale
11:12
@MartinJames Domperidone.
@DeadMG True, but I'm thinking coffee. It's too early for beer and I have no prescription drugs ATM. Is that stuff working at all?
no.
at least I don't think so
Try Dom Perignon instead.
I need an int that's webscale
Integer, clearly
Xeo
Xeo
11:16
WebInt?
MongoInt?
JSon object serialized (via an ORM) into a NoSQL flat document store. Replicated on the cloud.
posted on October 17, 2013 by Eric Battalio

We are happy to announce that Visual Studio 2013 is now available. Download Visual Studio 2013. Discover What's New for Visual Studio 2013. Read the formal announcement on Soma's blog. Check the system requirements and platform compatibility. Build an extension for Visual Studio 2013. Provide feedback! Visit Connect to report bugs, UserVoice for suggestions, forums for Q&A, Send-a-Smile f

5
posted on October 17, 2013

Reversing an immutable data structure in place would be a contradiction in terms; so instead we must define a reverse function that takes a list and returns its reversal.

@LucDanton Not enough conversions..
wait, VS2013 has using aliases?
I don't remember that.
11:18
Would've been hilarious if the Feeds said anything about an std::webscale<int>
Xeo
Xeo
VC13 has using-aliases ♥
Visual C++ Team Blog: Visual Studio 2013 phase 1 bugfixes Available Now!
Sort of analogous to std::atomic<int>
Visual C++ Team Blog: Visual Studio 2013 phase 2 bugfixes Available Now on pre-order!
> Editor, editor, editor! We're introducing new editor features that boost productivity, save time, and provide better context.
For a second there, my hopes were up ;-;
Xeo
Xeo
11:21
It also has std::remove_reference_t, apparently
sweet
user1804599
Wee Windows 8.1.
Xeo
Xeo
@DeadMG It was on the conformance roadmap Herb showed
huh
yeah, I just didn't realize that RTM would have another stack of features.
wtf
Xeo
Xeo
11:25
@DeadMG The support is actually pretty sweet with 2013
Ask Stack Overflow: they care and we don't.
TIL we have not two, but three different wrappers around the Kerberos API
two of them written within 6 months of each others. By the same guy.
Xeo
Xeo
The big thing missing is automatic move generation :(
And for template-nerds like me, expression SFINAE
sad face
user1804599
TIL about expression SFINAE.
11:28
@Xeo Oh really?
That's quite a letdown.
@Xeo Expression SFINAE works in VS2012 CRP.
I remember trying it and it worked okay.
Xeo
Xeo
@Rapptz Not as far as I tested it
(The best test is writing INVOKE)
Great, you gave me 'mangling dotstar' flashbacks.
Xeo
Xeo
haha
11:39
@R.MartinhoFernandes pew pew
> Every telescope should have a laser, regardless of whether or not it would actually have any scientific benefit. The dishes of the Submillimeter Array in particular each need a laser. I think there will be widespread support within the photographic community for this upgrade, airplanes and satellites be damned.
It'd be fine as long as airplanes got their own lasers, too.
@R.MartinhoFernandes OK, no more trips to the Canaries for me :(
OH: Kann ich mit Herr Schwanz sprechen?
There's a guy named Stefan Schwanz.
11:44
Google Translate that if you want.
Xeo
Xeo
@R.MartinhoFernandes ow
@R.MartinhoFernandes I'm still waiting for the next lines of this limerick..
There's no limerick. It's something that actually just happened
@MartinJames heh
Xeo
Xeo
11:58
Yay, pizza
> Most likely, you pasted "fancy quotes" (like ʺ ˝ ˮ ˵ ˶ ̈ ̋ ̎ ̏) from a web-page lol
I'm killing that rep-whore thing again today
@R.MartinhoFernandes no need
good lord that is good
Knows someone a good book to start with C++
12:06
@thecoshman That is genius. Took me a fair while to "get" it
ty
@sehe it is, isn't it.
I think so, don't you agree?
user1804599
> Thanks sehe! for Answering!
hi
any number theory lovers here? John Cook just posted a truly mindblowing fact on his blog johndcook.com/blog/2013/10/17/mills-formula-sympy
there is a theta (called Mill's constant) such that floor(theta^(3^n)) == prime for all n
theta = 1.306377883863080690468614492602605712916784585156713644368053759966434053766826‌​59882150140370119739570729... lots of other digits
12:14
@sehe I think so too, I do agree.
Thanks sehe! for Answering! I am actually typing code in VI thru terminal but dnt know how to do change utf-8 in it. But later I opened it in gedit and found it to be utf-8 only hence no changes required. And thus the problem remains the same. Request youto give any other solution if any..? — dev roy 6 mins ago
@TemplateRex Ah a prime number generator like no other
@sehe awesome!
@sehe but a truly amazing one, cuz theta is a real number, not just some integer like the Mersenne primes
user1804599
Integers are real numbers.
yay! VC++2013!
12:20
@not-rightfold not just some integer I wrote
@Abyx matches gcc 4.6 feature-for-feature?
@TemplateRex maybe. but it has the IDE
@Abyx if you have the Pro edition you can use Clang as a plugin (alpha quality but improving)
@TemplateRex yep, but it without libc++ it's kinda useless
yes, and libc++ is a bitch to install with all the libcxxabi deps
Xeo
Xeo
xxx? Is it now C+++? :)
12:24
lol
@Xeo ah one x too many
@TemplateRex Not really. Different feature sets.
@R.MartinhoFernandes I know, they do this on purpose to claim that they at least offer something that others don't
meh, it's really unfortunate that wchar_t size differs on *nix and Windows.
probably it's one of the main reasons why we don't have libc++ on Windows
@Xeo after C#, the next language should be C&&
12:27
@TemplateRex I would guess that they do it because they prioritise things in different orders...
Xeo
Xeo
@TemplateRex wat
@Abyx How does it affect anything?
@R.MartinhoFernandes no it's pure marketing to differentiate themselves, otherwise they look bad if everthing they offer was available from gcc/clang 2 years ago
Xeo
Xeo
waaaat
@TemplateRex yeah, they have <atomic>, those filthy bastards!
12:28
But it was.
What they offer is a subset of GCC 4.7 features.
(And clang 3.1?2?)
@R.MartinhoFernandes ok, so I got the version wrong, point still is that they laaaaaaaggg behind the competition
anyway, I'm hearing reasonably good noise about the huge number of bugs that have been fixed, so maybe I'd give it a try
@R.MartinhoFernandes libcxx.llvm.org/results.Windows.html there are quite a few issues with "wchar_t is assumed 4 bytes"
Am I in the right place to ask c programming questions
12:31
Have you tried that?
not questions
I mean
just general chat
there is another Lounge<C> for that, here it's C++
btw, we don't like C here
way more than C++
but if you are as weird as the rest of us here, you can stay
@Abyx Yeah, seems like it's the codecvt stuff.
(Which is sorta crazy shit anyway, but still)
12:33
hmm... where did that funding come from for pinning those messages?
it's 0.10 per pin, charged in terms of nasty spam flags on your avatar
Xeo
Xeo
@Abyx I found... 3?
I mainly saw "Windows locale names don't follow UNIX convention."
@Xeo uhm, well, it's more than one, right?
why was I not told about the please background music Manowar?
Xeo
Xeo
> The following code reproduces an error that I get in VS2005
ahahaha, poor sod
@R.MartinhoFernandes 'Metal' band, rather pleasing IMO, though I would probably describe them more as hard rock... more akin to Black Sabbath, though a lot less 'doom'
@thecoshman Ok. I know Manowar. I don't get what "the please background music Manowar" means, though :(
Xeo
Xeo
s/please/pleasing/?
Yeah, I suppose that could help.
12:39
@Xeo indeed
@thecoshman pleasing background music? so you're calling them Muzak? :p
(value + 1) & (boundary - 1) aligns to next boundary, right?
(Not aligning pointers here)
if boundary is power of 2
otherwise % boundary
over-alignment is impl-defined however
12:44
I'm aligning a buffer size, not pointers.
ok
should work then
I need to hold data in 8-byte chunks, but it might not fill it all. So I need the next 8-aligned boundary.
ok, so regardless whether the chunk starts on an 8-byte aligned address?
@R.MartinhoFernandes so, does ogonek work on VS2013 yet? :D
12:45
@melak47 is this just going to boil down to you do not like that genre of music which in your opinion makes them a bad bad?
It's just so I can give out contiguous 8-byte chunks to a C API.
@R.MartinhoFernandes ugh, unprotected putting out
@thecoshman yeah you're right, I don't like elevator music :p
lol, bad bad.
@TemplateRex Sorry, what does that mean?
@melak47 if elevators played Manowar, I'd never get anywhere
12:46
@R.MartinhoFernandes putting out is slang for giving away sex
@thecoshman :D
as in: didn't your mum and dad tell you to save that for a decent iterator?
The C API is external.
Now I have a headache.
@R.MartinhoFernandes but are you giving a pointer or just copies of raw bytes?
A pointer. The API writes on it.
12:51
ow, and this is safe because...?
Because it never writes more than 8 bytes on it?
but it's binary code that you don't control, what if the program is malicious
Then I lost already.
no matter how you look at it, you can't write safe code in C.
This is the C++ wrapping boundary I am writing. It obtains the raw data from that API and returns it in a container.
12:54
0
Q: Strip symbols and RTTI text from GCC executable

PotatoswatterMy project uses template metaprogramming heavily. Most of the action happens inside recursive templates which produce objects and functions with very long (mangled) symbol names. Despite the build time being only ~30 sec, the resulting executable is about a megabyte, and it's mostly symbol names...

</driveby>
If I can't trust the code that runs down at this level, we might as well just scrap the whole project.
@R.MartinhoFernandes I don't mean just malicious, but what if the C API is just plain buggy, and tries to write beyond your boundary?
Xeo
Xeo
What is your proposed solution if it does?
@TemplateRex Yeah, that could happen but if it does there is really nothing I can do.
You can't fix that kind of broken code from the outside.
@Potatoswatter I like those guys who suggest to use strip when you said that you already use -s
12:59
In terms of writing my code, it's just not an alternative worth considering.
@Abyx not gonna complain about free help. I wasn't the downvoter
@Potatoswatter it was me. probably I should write a comment to avoid misunderstanding

« first day (1097 days earlier)      last day (4077 days later) »