« first day (1415 days earlier)      last day (3529 days later) » 

12:02 AM
by the way, I cooked up a quick example of where I significantly outperform std::sort: coliru.stacked-crooked.com/a/2157ee7301f8aec9
when the input is unsorted I'm slightly faster, but the difference really shows when sorting already sorted inputs
 
12:15 AM
You really know how to do nothing well
 
He's doing the whole 'broad statements for fun' thing again.
 
No I'm doing the whole 'jokes' thing again
 
can one use torrent over tor?
 
sometimes I wonder if cat really is, a cat
@chmod711telkitty yes, but it's considered unpolite use of tor
 
12:19 AM
@chmod711telkitty Get a VPN.
 
that talk is pretty painful to watch because of the questions
literally every slide "but what about multithreading?"
 
@nightcracker what talk?
the one i linked?
 
the one you linked
 
i dont remember hearing multithreading for the last 20 min or so
 
@nightcracker what do you mean?
 
12:26 AM
Hello, Cruel World!
 
@chmod711telkitty torrents are very heavy in the amount of packets they procude, which overloads the tor network
 
@Rapptz how does that stop my ISP from finding out if I used torrent to download stuff?
 
@chmod711telkitty tl;dr, don't be a dick - don't use torrents over tor
 
that's kind of the point of a VPN.
 
@chmod711telkitty because you torrent on your VPN and tunnel the data through an encrypted channel from your VPN to your pc
 
12:27 AM
I mean, it's in the name.. 'Virtual Private Network'
 
Oo ... good idea. Not that I have download though torrent for quite a long time ... but now the govenrment wants to crack down piracy using tax payer's money, I just have to start using torrent again ... with protection.
 
> Structs cannot contain explicit parameterless constructors
Thanks C#
 
user3010322
@CatPlusPlus :3
 
user3010322
They do this for ~~~purrrformance~~~
 
Eh, default init is good
I guess that actually reduces boilerplate
 
12:32 AM
How does explicit S() ever come into question?
 
A defined ctor is explicit ctor hth
 
struct S { explicit S(int i = 0):i(i){}}; ?
 
It's not C++
Though I wonder if keeping structs in a dictionary is a good idea
Yeah probably not
 
user3010322
Nope.
 
user3010322
Copies on get
 
user3010322
12:36 AM
Like all the containers in C#.
 
@CaptainGiraffe Also variadic templates.
 
Structs in C# are no longer stack based?
 
@chmod711telkitty Or just, y'know, not pirate.
 
Structs in C# were never 'stack based' whatever that means
 
If you don't know what it means, how do you know they were never that?
 
12:37 AM
@CatPlusPlus Sorry, Value types.
 
@LightnessRacesinOrbit I'm that good
 
@LightnessRacesinOrbit Don't give Cat crap like that. We all know my mistake.
 
Value types in C# means 'passed around by value instead of reference'
 
> A struct cannot inherit from another struct or class, and it cannot be the base of a class. All structs inherit directly from System.ValueType, which inherits from System.Object.
 
@LightnessRacesinOrbit yeah sheep, bleat for us. I bet you were a really obedient child because you are such obedient adult
 
12:39 AM
@CatPlusPlus Hence my ref to a stack based type
 
@chmod711telkitty What are you talking about now? Dare I even ask?
 
Nothing to do with stack
 
@CaptainGiraffe What does that have to do with "stack"?
 
Locals are always on stack anyway
 
not my fault you couldn't see how others see you
 
12:40 AM
Nothing in the C# sense, everything in a c++ sense
 
Nothing in a C++ sense, either.
Someone's taught you dynamic allocation very wrong.
 
you fit right in the super herd
 
struct T { int x; } // T::x is of a "value type", yes?
T* t = new T();     // I don't see it on "the stack", though.
 
swiping 'effection' on my phone keeps giving me 'erection'
 
@chmod711telkitty just fuck off okay
@Rapptz strange that such an innocuous action would have such a substantial effect on your biology
 
12:42 AM
@LightnessRacesinOrbit lol, also noticed your not so good mood lately, what terrible things have happened?
 
What is "effection", anyway?
 
@LightnessRacesinOrbit Dude, when a vector<T> comes into my function, I know there is at least 16 bytes on my stack. Now value type in C# hints the entire chunk is available. It might not be, but if were a guessing man, I'd say maybe.
 
@LightnessRacesinOrbit I'm not sure.
Title of this song.
 
@Rapptz ok
Crystal Castles?
 
nop
 
user3010322
12:43 AM
@Borgleader Eric Niebler's non_null_unique_ptr example is bad.
 
I should go to sleep
 
I think my mp3 is just misspelled
 
user3010322
Because if you do s/non_null_// and s/ptr/reference, what you end up with is unique_reference.
 
user3010322
You can't move, rebind, etc. a reference. His example was doomed from the start.
 
user3010322
I don't see why nobody in the conference called him out.
 
12:45 AM
no one called him out on his 'read-only' ostream either
:v
 
user3010322
Lol.
 
user3010322
Scrubs.
 
user3010322
All of them are scrubs.
 
@Rapptz lolwut
 
I have renamed the mp3 from True Effection to True Affection.
thank you Android for built-in rename capabilities
@LightnessRacesinOrbit This doesn't make sense to me.
Is System.Object special or something?
What about System.ValueType etc.
 
12:51 AM
Beats me.
 
Question. I have 3 files. "blah_Default.h", "blah_SSE.h", "blah_AVX.h". They aren't header files and compile like .cpp files. I only want one at a time compiled. Do I:
1. Have a "blah.cpp" that selectively includes one of "blah_Default.h", "blah_SSE.h", "blah_AVX.h"?
2. Change all their extensions to ".cpp", and inside each file, wrap the entire file with a preprocessor check to decide whether to compile it?
3. Go with 1, but change the extensions to ".hpp" to visually indicate that they are implementation files.
 
Call them .ipp or something
What do you mean "I only want one at a time compiled"? Just.. only compile one of them then....?
 
@LightnessRacesinOrbit Depending on what processor I'm compiling for, I only want that one file compiled.
 
Rely on multiple definition errors to indicate when this has failed in your build process
 
It’s not uncommon to use .inl or similar as an extension for those files. Then you’d have your blah.cpp conditionally include the right one, making up your actual TU.
 
12:53 AM
#1 then, but rename from .h to .ipp
jinx
 
#3 with .inl instead of .hpp.
 
right, #3 with .ipp is what I'm saying :)
fuck this .inl
 
#2 isn’t nice because an empty source still produces an empty object file.
 
Does Visual Studio try to compile an ".ipp" as a separate module?
 
Don't know who cares fuck Visual Studio
 
12:54 AM
lol
 
yeah idk
I doubt it
 
I guess I'll try it and find out.
 
.inl/.ipp are pretty commonly used in C++
 
seems highly unlikely
It is quite disturbing to me that three of us in this room just agreed on something without a second thought
 
Hey, I mostly trust you guys. (at least more than average internet bullshit)
I used to use #1. But I couldn't tell them apart from headers. So I switched to #2. But that killed my compilation times. So I'm considering #3.
 
12:57 AM
> Charles and Diana wedding cake slice sold for £828. Prince Charles and Princess Diana married in 1981.
WHAT.
@Mysticial #3 is how the rest of the world does it ;)
 
@LightnessRacesinOrbit That's good to know. :)
VS2013 doesn't recognize .ipp, but it looks like there's a registry hack to fix it.
 
you dont need a registry hack, afaik you can change that in the options
 
> Some have bought cakes dating back to the days of Queen Victoria, who married in 1840, he said.
Wat.
I mean... wat.
 
makefile does wonders
 
> Tools -> Options -> Text Editor -> File Extensions
I added c++ and h++ extensions
 
1:03 AM
@Borgleader Thanks!
 
user3010322
@Xeo YOUR PAPER WAS MENTIONED IN NEIBLER'S TALK!!!
 
user3010322
@Xeo Where the fuck are you your paper is famous and you don't even know it.
 
I wonder if there's a way to fix the ugly icon in the Solution Explorer
 
user3010322
 
@ThePhD At what time?
 
user3010322
1:04 AM
@Borgleader Link n00b.
 
what am I looking at?
 
user3010322
@Borgleader The "Lifting an overload set" paper is the Lifting Lambda paper Xeo wrote.
 
I'll look that up, I assume the link is in the chat logs somewhere
 
user3010322
Look at the bottom.
 
user3010322
1:07 AM
DeadMG (Puppy) and R.MartinhoFernandes
 
> htmÿ
FAIL
 
No such thing as "DeadMG"
 
argh use of <pre> for no apparent reason -> no word wrap
 
@nightcracker y u no nonius?
 
1:12 AM
@Borgleader cause coliru
and I don't know how to use nonius as it seemed a bit weird with initializing testcases
 
So, in other words, you have nonius idea at all how to use it.
That's okay; neither do I
 
well I took a look at it
and then I kinda stopped looking at it
 
@ThePhD So now all you guys know how I sound. :D
 
user3010322
@Griwes You were there?
 
who the fuck is Niebler
 
1:15 AM
@ThePhD I mentioned the proposal. I thought that was quite easy to understand from my previous message, duh.
 
user3010322
@LightnessRacesinOrbit Guy who wrote range v3 and has been (or is pushing his way?) into the standard committee.
 
C++ is dead deal with it
 
@LightnessRacesinOrbit C++ is dead, long live C++
 
@LightnessRacesinOrbit lol
 
user3010322
 
user3010322
1:18 AM
Unicode, XML, Trees, Linear Algebra, and a new IO/Formatting library.
 
user3010322
Are apparently the things we need to get standardized.
 
@ThePhD s/ to get standardized//
FTFY
 
under 'Linear Algebra' he didn't bother specify Eigen lol
 
user3010322
Well, he said "To my knowledge" as a weasel word htere.
 
@ThePhD Quite a few languages i can think of ship with these things, so yeah seems like a safe bet
 
user3010322
1:20 AM
My tops: IO/Formatting and Unicode.
 
Yeah. But the worst thing about those is most attempts at them, regardless of a language those attempts were in, failed horribly.
 
user3010322
I think you could get a really GOOD implementation in C++ by doing the following:
 
IMO all I/O should be in binary, and completely seperated from...
Unicode, which should be properly implemented completely seperated from...
Formatting and parsing.
 
user3010322
IO: implement everything in terms of <iostream> and friends set to binary mode, end of story.
 
@nightcracker I hope that is kinda obvious to everyone these days.
 
user3010322
1:23 AM
Formatting: pull out all the formatting of <iostream> and place them in their own dedicated classes, with either C++ printf syntax or C#/Python format() syntax.
 
no
fuck printf
that things needs to die
 
user3010322
Shrug.
 
user3010322
They're both stringly-based formatters.
 
there should NOT be a formatted I/O operation, just output and a formatting function
 
user3010322
That's what I mean.
 
user3010322
1:24 AM
printf syntax just means the syntax for the formatting string
 
user3010322
not actual output.
 
oh
k
didn't saw "syntax"
 
@ThePhD Ugh bullshit
The entire point of C++ is to let third parties implement that sort of crap with libraries if they want
Why are we suddenly driving to standardise all of it?
Children.
 
what is this
lightness reveals herself as a big breasted beautiful blonde
2
 
duh
also tbh look up push-up bra
 
1:32 AM
@nightcracker what was the point behind having a for loop where i is incremented by chunk_size until its equal to size, when chunk_size == size
it's only ever going to be one iteration no?
int size = 10000000;
int chunk_size = size;
for (int i = 0; i < size; i += chunk_size) {
 
@LightnessRacesinOrbit Ask most people how they feel about 'dependencies'.
Also 99% of third party C++ libraries are utter shit.
 
@Rapptz nonius is the 1% ;)
 
Just browse github, the internet, or anything and you'll see so many shitty libraries
Nevertheless, having a 'standardised' library doesn't mean 3rd party libraries cease existing.
Boost still has boost::vector despite std::vector existing.
 
@Borgleader because you can modify chunk_size to test the sorting times of, for example, many 100 element arrays rather than 1 big array
 
@nightcracker oh i see
 
1:36 AM
huh that guy was epic at the Halo 4 warthog-mounted gauss gun. I'm excellent at it and he was better than me. don't see that every day
 
@Mysticial lel
 
I love that first sentence
> My personal verbal skills are so bad that nobody can understand anything I write.
Brilliant.
 
@nightcracker Here's a quick pass at converting your benchmark to nonius: gist.github.com/anonymous/9442b3c5ad9a24283c36
 
@Borgleader k, and what's the output if you run that?
 
1:41 AM
I'm running it now. The first one alone is estimated to take 3 minutes
by default it does 100 iterations
 
oh wait... i think i fucked up
 
@Borgleader er yeah I'd say so
 
i need to allocate meter.size() number of vectors
 
user457812
The answer is a vector vector.
 
1:43 AM
hai guis i need code for like saying 2 plus 2 and answer 4 lik that, help pls?!1
 
user457812
The answer is a vector vector vector
 
i nneed it in C++/C# or Java(script)
oh god
I'm a genius
I'm gonna make the tag Java(script) just to fuck with people
 
user457812
I approve of this
 
then click the star button lazy fuck, I need the karma/rep/stars
 
user457812
I don't approve of it in a way that benefits you but in the way that a Facebook conservative shares pictures about how Obama is a secret muslim
 
user457812
1:46 AM
i.e., save the picture, recompress it to ensure maximum jpeg, then post as though it were mine.
 
-1
Q: How to split a long input into multiple items in C++?

user3052738I'm new to C++ and have been trying to code a program where I enter many things at once and it splits them into different strings, ints, etc. depending on what they are but I can't figure out how. I want to be able to input, for example, "What is 7 plus 9?" and code it so it assigns the first nu...

 
> ideally a lexer and parser like antlr or lex/yacc would be great but the learning curve is steep
suggesting antlr or lex/yacc to a guy who clearly would fail fizzbuzz sounds like a grandious way to solve this
might as well sign it with "fuck off" too
 
that whole post is a joke
 
stackoverflow.com/questions/1337/how-do-i-install-yacc-on-windows-i-have-windows‌​-8
 
1:53 AM
@LightnessRacesinOrbit wow
 
date with your mom lately?
 
@nightcracker Out of curiosity, I decided to see the first question on SO:
pretty lame.
 
why is it that the technology world is so incredibly swamped with males?
 
Theres an article in this month's wired about that
apparently its a cultural thing
 
2:01 AM
I haven't read Wired for a long time...
 
so I'm the only one who's operating computer peripherals with my penis?
 
iirc, in the article they say in india, there are more women in the tech industry
 
thought that gave us the edge
"more women than in the western world", or "more women than men"?
 
More women than in my life
 
more than here (where here be western)
 
2:02 AM
@CatPlusPlus how can there be more women in india if there are only 6 cats?
 
Almost implemented Telnet not bad
 
@R.MartinhoFernandes I found an issue in nonius. I used an invalid filename and didn't get an error. Instead, the report just didn't get saved. I noticed that when I was using std::sort_vs_introsort.html I wasn't getting a report file but when I switched to stdsort_vs_introsort I got one.
 
That's not invalid though?
 
:: in a file name is invalid
at least on windows
 
Oh, right, because ADS
 
2:12 AM
@nightcracker Benchmark report, and code (not including your introsort header file)
 
Robot swallowed a file open exception? :)
 
anyone know how to get out of a question ban?
 
user3010322
@LightnessRacesinOrbit I/O separation from Formatting, and Unicode, should be worked into the standard as they already cover these areas poorly.
 
user3010322
The rest is handleable by working libraries out in the wild.
 
I thought SO told users who got banned how to get unbanned =/
 
2:16 AM
@Timothy Yes, it's easy, ask totally inappropriate questions and use as many four-lett... . oh.. get OUT of a ban..
 
user3010322
Plus, C++ only needs to concern itself with the encoding, decoding, and normalization bits of Unicode on its first go-around.
 
user3010322
Things like layouting and the like it doesn't have to bother with.
 
@Borgleader the difference in speed for unsorted inputs surprises me - are you sure you used maximum optimization (-O2 -m64 -march=native) ?
 
@Timothy create another account then use tor ... wait, use tor then create another account
 
@nightcracker I used VS2013 :P
 
2:17 AM
@Borgleader oh well, their std::sort is... suboptimal :D
 
@chmod711telkitty I would never do that ;)
 
looks like I'm twice as fast for sorted inputs
than vs2013
 
@Timothy then learn to ask good questions and provide good answers
 
@chmod711telkitty I have, i rewrite all my -rep questions
 
provide some good answers
 
2:19 AM
answers don't help with question bans?
 
Not using jQuery might help.
 
@MartinJames What?
 
2:40 AM
@ThePhD Granted
@ThePhD yeah
 
user3010322
Yay, Lightness agrees with me. <3
 
@Borgleader doesn't mean anyone listens.
@Timothy read this, edit ALL of your questions to comply, paying special attention to the titles - then wait.
 
@Shog9 Oh, that's not what I meant. I was pretty sure the information is given. My statement was more of a "shouldnt you already know how?"
and by statement, i meant question -.-;
 
2:56 AM
gotcha
 
3:19 AM
@quantdev I chose not to use std::string to avoid the allocation, the exception hole, and the copy (they all would be there, right?), and to be a little less dependent upon the STL. As for char arrays, my class stores a const char *, as in the conststr example linked in the question body. — Kalrish yesterday
Seemed relevant.
 
1
Q: Maybe monad what is Just for?

KevinI have been reading up on how to implement Monads in C#. In the more Haskell like implementations such as the one described here http://mikehadlow.blogspot.com/2011/01/monads-in-c-5-maybe.html use a type called Just to wrap a result other than "Nothing". Is this type only a convenience so that w...

 
2 nannies in the lounge, are the kids here being naughty lately?
 
@LucDanton So fucking bad.
How did no one call him out on this?
 
Well maybe they are in a freestanding environment where allocations and exceptions are undesirable and they somehow have hashmaps!
@Rapptz Honestly the first thing I was contemplating is how the OP intends to retrieve elements back from the container. Then again there are scenarios where that would work, so I said nothing.
 
3:36 AM
0
A: Maybe monad what is Just for?

Code-ApprenticeIn Haskell, Maybe is used as a simple error handling mechanism. Just indicates that the wrapped value is the result of an operation whereas Nothing indicates an error of some kind. As a basic example, Haskell has a function with the following signature(1): lookup :: [(key, value)] -> key -> Mayb...

Does this seem like a reasonable answer?
Any suggestions of anything I could add/change to make it clearer?
 
Mention that Just is not a type.
Also the question is hard to decipher, so I can’t comment on your answer other than that.
 
@LucDanton I was thinking about how to address that issue. C# makes it look like Just is a type because it's a class.
 
Yeah the pun is unfortunate.
 
3:51 AM
@Shog9 why is this account of mine not linked to the rest of my Stackexchange accounts? I am using the same login, email address and password for all of them
 
I'm getting fairly similar results for gcc 4.9.1 as well.
std::sort unsorted: 1711ms
introsort unsorted: 1694ms
std::sort sorted: 581ms
introsort sorted: 286ms
Using slightly rewritten benchmark code: coliru.stacked-crooked.com/a/3a39dfe702686c69
My changes shouldn't make any significant difference to the benchmarking though (and seem to produce results similar to your code quite consistently).
 
so the patch is to make it faster when the data is already sorted?
 
Ok, this might be off topic, but ... does anyone here know the order I have to apply primer, waterproofing membrane & adhesive when tiling the bathroom walls?
I have watched a few tutorials online and got some help from bunnings. But it's really confusing ...
The order that I have used is: clean the water using water hose, applied primer then the waterproofing membrane
 
@Rapptz Do you mean his code vs. stdlib, or the changes I made to his code?
 
former.
 
3:58 AM
now I have marked the centre of the wall and is going to apply the adhesive and tiles
but on the adhesive package, it is mentioned that it's best to be used on primer?
 
@Rapptz I'd guess he just decided to write an interface compliant implementation of introsort, and it turned out to be a little faster in general, and quite a bit faster for sorted input.
But, of course, I didn't write it so I'm only guessing.
 
So I'm trying to convert my entire pi program from type *name to type* name. Likewise for references. This is gonna need some tricky find/replace sequences.
 
not possible with regex for the generic case
 
I've been doing it on a per-type basis as I run into them.
I just had 810 replacements for wchar_t * to wchar_t* .
 
@Mysticial IMO, this is better just left alone. If you're going to spend time rewriting code, do something that makes a real improvement.
 
4:12 AM
maybe he's bored
maybe you should use namespaces while you're ahead :p
 
@Rapptz I've been doing that since maybe 3 months ago.
 
that one is actually solvable for the generic case with regex though
I think anyway
I can't imagine it being difficult.
 
The namespaces I've been doing manually because there's too many exceptions and hooks involved.
3346 replacements for vtype * to vtype* . lol That's one of the types that I introduced after I started doing namespaces.
 
finally
I've written a template!
wrapping this is kinda bored in that aspect
 
@JerryCoffin I've been switching back and forth between style improvements and refactorings. When I get bored of one, I switch to the other.
 
4:25 AM
I kinda wish there was a weak_ptr without the shared_ptr part.
 
What would you be holding onto?
 
I'm not sure how to express 'non-owning pointer, don't fuck with it or it'll fuck shit up'.
 
@Rapptz One of the refactorings that I'm doing is something similar.
Some objects are RAII, some are non-owning, but they all share the same non-mutator methods.
i.e. two versions of the same object, owning/non-owning. With 90% the same functionality.
 
I solved that issue already actually.
I have template<typename Deleter> struct basic_thing
then I do
using thing_view = basic_thing<no_delete>; and using thing = basic_thing<deletes>;.
you might consider a similar design.
iunno
 
How does that work? Does the basic_thing hold all pointers and handle the deletion itself?
 
4:31 AM
yeah
the deleter does the deletion
basic_thing holds the pointer
 
You write special members etc.?
 
you could with SFINAE.
 
Could what?
 
oh I misunderstood
I guess by 'special members' you meant operator= et al
 
For each such thing, and not their clients.
 
4:34 AM
to answer that, not really.
only move
I wonder...
 
Then when and how does the deletion happen?
 
In my case, it was just a wrapper around std::unique_ptr.
but in the destructor?
 
@Rapptz In my case I couldn't quite do that. They were also different enough where I couldn't have the ownership one inherit from the non-owning either. So I ended us doing a base parent class.
 
Oh I don’t mind passing thing& around (while storing thing*) for those cases.
I don’t have the heart to have an std::reference_wrapper with a more sensible name. Or to bring the whole of <functional> everywhere.
 
Finally!
Someone understands me.
std::reference_wrapper really should have been in utility
:(
and std::hash should probably be in its own header.
but idc about std::hash as much as std::reference_wrapper.
 
4:40 AM
Yeah utils and the like are probably the sorriest names that programmers use, in typical fashion. ‘It’s useful and naming things are hard’ — so now everything that’s not in utils/ or whatever is useless!
Still though, I suppose <utility/reference_wrapper> would be an improvement.
 
<utility> has gotten beafy in C++11.
@LucDanton from std.utility import reference_wrapper
rip
Maybe one century.
 
I have an rvalue_reference_wrapper for, well, symmetry but I’m not sure if I find it useful anymore or not.
 
it was explicitly deleted in the stdlib version
not sure why
I mean, I know why it's deleted
I'm just not sure why they decided against the rvalue reference version
 
It’s from tr1 so predates rvalue reference. That being said, so does std::bind. It still needs a champion/paper to make the change I suppose.
I’m under the impression that the Committee is mostly made up of people that would rather defensively copy than store an rvalue reference. Which is fair, it’s kinda dangerous otherwise.
 
5:16 AM
Should I ditch PascalCase for metafunctions, leaving it for Concepts? I.e. CommonType to common_type[_t]?
 
I was contemplating it but decided against it.
 

« first day (1415 days earlier)      last day (3529 days later) »