« first day (1493 days earlier)      last day (3473 days later) » 

2:01 PM
@R.MartinhoFernandes yeah, all the big space agencies are doing some pretty incredible stuff.
 
> We'll be able to help out in a batter way then.
 
that's a batting
 
@jalf But not space boats.
 
true
 
Boost.Any requires the types to be copy constructible (i think), that is i cannot store a unique ptr inside a boost.any, is there an alternative implementation that requires move construction only?
 
2:05 PM
@R.MartinhoFernandes air intakes, air intakes everywhere
@R.MartinhoFernandes it'll be a bit stinky...
 
2
Q: Using 2-dimensional or 1-dimensional, which is fastest?

JonasI've been searching the web (and stackoverflow) for opinions on whether or not 1-dimensional arrays (or vectors) are faster than their 2-dimensional counterparts. And the general conclusion seems to be that 1-dimensional are the fastest. However, I wrote a short test program to see for myself, an...

interesting
 
that question needs @Mysticial
 
@AlexM. Or random Turkish dude with a simple answer :-p
 
oh well
 
might be the cost of multiplication in 1-D arrays: d1v[r + c*size] = 0;
or maybe the CPU can do better memory prefetching in the 2-D case.
or maybe it's a silly bug in his code :P
 
2:21 PM
Is std::array<std::array<X, 10>, 20> equivalent to X[20][10] memory-wise?
As in: it allocates 200 Xs all contiguously.
 
morning friends
 
template<class Type, std::size_t N, std::size_t M> using bidiarray = std::array<std::array<Type, M>, N>;
std::bidiarray<int, 30, 20> x; x[0][0] = 1;
is that correct?
 
widibidi
 
I can't be bothered to see what the code actually does, so I just benchmarked it on my PC.
I can't even be bothered to compare my results to his, or my own results to themself.
Only that Intel is about a million times faster than the rest.
 
user1804599
2:26 PM
You know.
 
user1804599
There are people who once accidentally clicked "Subject" header in the list of emails and now they work with email list sorted by subject instead of date.
 
user1804599
Since like, years.
 
hrmph. Is there any such thing as a "configurable" bashrc? Kind of like one where you choose features and compile it. If not, I think I know what my next project will be.
 
user1804599
It's called configure which you have to run before you install Bash.
 
I mean more like. "I want my PS1 to contain the following features" and "I want ls to really do THIS" or something along those lines, but with some easier GUI rather than scripting it out. Seems so error-prone to create a .bash_profile and update it manually
 
user1804599
2:34 PM
Oh.
 
user1804599
Use Z shell and Oh My Zsh.
 
What's the advantage of Zsh? Also isn't there that Xiki shell thing now?
 
user1804599
@corvid superior autocompletion, spelling correction, more extensive globbing, etc.
 
user1804599
The major disadvantage of Z shell is that you'll cringe every time you have to work on a machine that has no Z shell.
 
2:41 PM
I'll give it a try because why not?
 
user1804599
Install oh my zsh while you're at it.
 
user1804599
Has themes and plugins and stuff.
 
Wait. zsh does autocompletion like windows?
Dang, spurious enter.
 
user1804599
@Griwes You mean like PowerShell?
 
user1804599
Ahahahaha no of course not.
 
user1804599
2:44 PM
As you'd expect, it actually adds a trailing slash when directory names are completed.
 
Is it much different than bash or more of just an improved iteration of it?
 
I just did zsh, then ll foo, tab, then subsequent tabs... switch between subdirectories of foo. What?
 
user1804599
~/downloads % du -h | tail -n1
3.5G	.
 
user1804599
oof
 
waiting for compilation
blargh, so freakin' bored
 
2:47 PM
@Griwes Sounds like vim's "full" completion.
 
@rightføld du -th, please (erhm, that's not it.. wait)
 
compilation and deployment are usually the reasons I am talking in this chat room :0
 
@FilipRoséen-refp -c
 
@R.MartinhoFernandes you'd still get the total of subdirectories in your cwd, but yeah; -c was the flag I was thinking of
 
so many cool ideas, so much school to get in the way of cool ideas :\
 
2:50 PM
@rightføld du -h -s (sorry, I always mix -t and -s up) /cc @R.MartinhoFernandes
 
Oh.
I have alias du='du -s -h'
 
user1804599
Oh -s is nice.
 
@TonyTheLion If you really want to be efficient you can just skip 1, the rest will come without wasting any body energy.
 
user1804599
du -s . | awk '{ print $1 }'
 
mmmh apparently I dreamt that the Haskell room got unfrozen; that was weird
 
user1804599
2:57 PM
Also --si > -h.
 
user1804599
I dreamt I rode a Puch and fell.
 
@Jefffrey Probably not, since you won't survive without work and most people can't work from bed.
 
@Puppy You can survive if it's not workday (eg. Sunday)
 
dumb question, you have to specify windows paths like C:\\Users\\Alex\\Pictures because \ is an escape character?
 
colour me surprised
 
3:09 PM
@corvid depends on where you have to specify them?
 
Ell
@LightnessRacesinOrbit thank you! :D
 
gald we are still uptalking?
 
what's wrong with uptalking!
 
^ fucking idiots
 
3:10 PM
@AlexM. File toRead = new File("C:\\users\\corvid\\Documents\\toread.txt");... I would prefer if it were possible to have something like the os.path module in python
 
Xeo
lol
 
doesn't python accept / as path separator on Windows too?
 
Xeo
what they're doing is not wrong, but attributing that fact to Herb and not the standard... welp
 
@Xeo yeah, exactly
 
IIRC C++ for example accepts "/" as the standard separator on Windows too
because yeah, it's standard
 
Xeo
3:11 PM
Windows itself accepts /
 
really? :O
 
Really? I have been doing everything terribly wrong all this time
 
@Xeo not everywhere
 
Ell
Lol herb Sutter indicates
 
I like the python version of import os.path as op; file = op.expanduser('~/Documents/toread.txt')
 
3:13 PM
@Abyx Herb Sutter indicates that it does!
 
@R.MartinhoFernandes AFAIK, the entire Windows API accepts /. Nearly the only thing that doesn't accept it are the command line interpreters.
 
cpx
Is it not possible to just break out of lambda to save time if we're done?
 
@cpx No.
 
no, that's the wrong approach if you want to do that
 
cpx
I've heard with functors, you can throw exceptions.
 
3:19 PM
you're trying to break the mapping of a function on shit from the function itself
just foreach on that and break if you want to stop
 
@Xeo As we all know, you should always trust an expert and not a standard.
Because specifications are so vague and ambiguous.
Unlike humans, who are perfectly objective.
 
@cpx You have a couple of choices. One is to find the correct stopping point, and pass that iterator to for_each. Another is to have your lambda return (for example) a bool to indicate whether to continue the iteration.
 
Xeo
@JerryCoffin Except #2 doesn't for std::for_each
 
@Xeo you have got a for overload there
Lol! I love "SSCCE". I added the rest of the error information. Is that what you're after? The code I posted is as short as self-containment and completion would allow. — Jeff Maner 19 mins ago
 
@Xeo Nope--which comes as no surprise to me, since I've virtually never found for_each useful.
 
3:23 PM
@Jefffrey he really wrote everything you needed there
the question sucks though
 
I'm sure you can reduce that 50+ lines of code down to something like 10 and that everybody is able to compile with any online compiler.
 
can you use any windows service pack for the "repair my system" mechanism?
 
@Jefffrey like f :: a :P
 
Like all that Parsec crap that is now all over my screen
 
well Parsec is easy
 
3:25 PM
@corvid I s'pose, but if you use an old service pack, it presumably tries to roll your system back to that point.
 
Xeo
Parsec is nice
 
that's fine, I am just trying to remove the linux dual-boot from my system
 
user1804599
If you send an email and HELO hostname does not match reverse DNS, is it likely to be marked as spam?
 
user1804599
Ah, it isn't. Nice.
 
@cpx Lambdas are not special.
 
cpx
3:37 PM
I doubt if it would be considered a good practice to use exceptions for this purpose when they are still other ways around.
 
Is it correct to say that lambdas are functors?
 
Xeo
Yes
(inb4 category theory functors)
 
Is it because the standard actually explicitly says that they should be equivalent to functors?
 
cpx
I just read about lambdas just yesterday. I was confused if to call them "lambda expressions" or "lambda functions".
 
3:44 PM
lambda expressions
 
cpx
Google still reveals results for both.
 
That's the correct term used by the standard, but everybody will understand "lambda" or "lambda functions".
 
hi
 
cpx
Just "lambda"or "lambdas" sounds fine too I think.
 
user1804599
@Xeo I thought a functor was a class, not an object.
 
Xeo
3:48 PM
@Jefffrey A lambda is an object of local non-union class-type with an operator() - that makes it a functor.
@cpx both works.
 
I just spent 10 minutes trying to debug something because I didn't notice the other guy wrote what was essentially
if a or !a
and I was wondering why the thing inside was executing :(
 
@rightføld Is a vector a class or an object?
 
user1804599
Object.
 
user1804599
But this says a functor is a class:
 
user1804599
428
A: C++ Functors - and their uses

jalfA functor is pretty much just a class which defines the operator(). That lets you create objects which "look like" a function: // this is a functor struct add_x { add_x(int x) : x(x) {} int operator()(int y) { return x + y; } private: int x; }; // Now you can use it like this: add_x add4...

 
Xeo
3:59 PM
Terminological masturbation vOv
 
terminal masturbation
 
In mathematics, a functor is a type of mapping between categories, which is applied in category theory. Functors can be thought of as homomorphisms between categories. In the category of small categories, functors can be thought of more generally as morphisms. Functors were first considered in algebraic topology, where algebraic objects (like the fundamental group) are associated to topological spaces, and algebraic homomorphisms are associated to continuous maps. Nowadays, functors are used throughout modern mathematics to relate various categories. Thus, functors are generally applicable in areas...
function objects are not functors
 
18 mins ago, by Xeo
(inb4 category theory functors)
 
@Xeo damn
@AlexM. ^
 
user1804599
yesterday, by rightføld
@Puppy homonym
 
cpx
4:03 PM
One reason I would use lambdas is to avoid additional copies made by functors whenever you use them in algorithm.
 
sounds cargo cultish
 
Xeo
@cpx what
 
i have no idea
sounds gibberish
 
@cpx just has no idea that lambdas are function objects, lol.
 
I think that auto x = []() { return 1; } and auto y = [](){ return 1; } not only creates 2 copies of basically the same functor, but it also generates two different functor classes.
Not sure though.
 
cpx
4:07 PM
I remember I wrote an example yesterday and using lambdas using & reference.
If I can find it.
 
Are you really at a point where worrying about additional copies is productive? It’s fine if you’re prodding around and trying to figure stuff out, but it’s a matter of priority: there may be more interesting things to worry about.
 
cpx
Okay, this one.
 
You mean lambda captures?
 
user1804599
aaahahahhahahah
 
Do lambda captures look funny to you?
 
cpx
4:15 PM
I mean line #36 where every time you pass Even()class object.
 
DO YOU THINK THIS IS JOKE?
 
user1804599
> French top restaurant is going to evaluate tires
 
C++ IS SERIOUS BUSINESS
@rightføld Openshift's tires?
 
user1804599
Michelin Guides (French: Guide Michelin [ɡid miʃ.lɛ̃]) are a series of annual guide books published by the French company Michelin for more than one hundred years. The term normally refers to the Michelin Red Guide, the oldest European hotel and restaurant reference guide, which awards Michelin stars for excellence to a select few establishments. The acquisition or loss of a star can have dramatic effects on the success of a restaurant. Michelin also publishes a series of general guides to countries. == History == In 1900 the tire manufacturers André Michelin and his brother Édouard published the...
 
@Jefffrey *Does
And: yes.
 
4:16 PM
*Do
And: no.
 
user1804599
*Don't.
 
@Jefffrey sure
 
I want to bite my cat's ass.
3
 
@Jefffrey ah the s
missed the s
 
@Jefffrey dude
 
4:17 PM
I shall forever feel ashamed.
 
I'm not even kidding.
 
Happy B-Day @Cat.
I think.
 
@rubenvb wut
 
Maybe.
 
4:18 PM
lol
 
Oh no.
 
lol "Pjotr"
 
It's Elliot's.
 
Elliot's as in Ell?
 
Yes, as in Ell
 
4:19 PM
There is absolutely no reason to assume those two are related, but ok.
Happy B-day @Ell!
 
@Jefffrey uhhh
did yours heal btw?
 
Almost
Still hurts a little.
 
cpx
@LucDanton Syntax on line #21 not_a_lambda { evens } looks very new to me.
 
Does it? You’ve used std::vector<int> v = { … }; just above. (They are not exactly similar of course.)
 
We got it.
It's unified syntax.
 
cpx
4:22 PM
Lag I guess.
 
@cpx You can also try things like int i = { 42 };, f(int { 42 }) etc.
 
cpx
I suppose I haven't got chance to use initializer lists in that context yet.
 
As you can see, plenty of interesting things to study :)
 
> 8th grader came in to my classroom during my prep. In a panic, he asked "Miss, did you see a bag of weed in here? I think I dropped it in your class this morning." Dumbfounded, I explained that a) he shouldn't be doing drugs, b) he definitely should not have drugs in school and c) he should so very obviously not ask a teacher to help him find said drugs. Then I went home and smoked his weed. It was a good day.
 
they grow up so fast
 
he meant "a wild plant growing where it is not wanted" of course
what did you think
 
why are there so many softwares on linux to do almost exactly the same thing?
 
the beauty of open source
 
I'm cursed.
Every RF receiver I touch stops working mysteriously.
 
It's a little annoying :| why not just merge them all into one full-featured product?
 
Xeo
4:39 PM
Well they're obviously not set to receive R. Fernandes
 
@R.MartinhoFernandes Your robot electronics are obviously interfering with them.
 
@corvid Because the only thing open source developers get from open sourcing software is the pride of doing open source software. If you collapse all of those into one, the pride vanishes.
That and also: "which one should be merged into which one?".
It's the same concept as the multi-standard thingy.
 
@corvid Because no one would reach any kind of consensus, and then some group would split off to make a fork because they didn't like the decisions that were made and then we'd be back at square one.
@R.MartinhoFernandes: what on earth makes you think that? — Stephen Canon 22 secs ago
Some people don't get sarcasm even when properly tagged.
 
Well, doesn't it depend on how floating points are encoded and what language we are talking about?
 
@Jefffrey the former: yes, but IEEE754 is ubiquituous, the latter: no
I hope that when CPUs become 128-bit we'll switch to 128-bit-fixed-point
would solve so many problems
 
4:50 PM
Like none?
 
What problems would it solve?
 
Yay
Score of 582 in the last 30 days, pretty cool that is
 
user1804599
hi
 
I got gold badge #250 yesterday.
 
silver is only owned by 620 people :O
 
4:59 PM
I have yet to get even bronze
 
I have 285 answers
they just don't have enough upvotes :F
I could get one +500 answer and that'd be it
 
@BartekBanachewicz good luck with that... those rarely happen
 
@Mgetz IKR
 
user1804599
@BartekBanachewicz just admit they are shit.
 
I don't even have a Good Answer badge for an answer scoring 10
 
5:01 PM
@Rapptz Fuck, I wanted to be that one
 
I already had the 1k score
I just needed to answer more
 
Btw, were can I see the current total score of my answers for ?
 
it's in your user page
 
Ah, wait. Got it
887
Hm
 
welp @Rapptz has 200/207 answers in C++ tag
I have 285/469
 
5:05 PM
64/36 for me
 
user1804599
I hate it when a hydrophobe substance sticks to my hand.
 
wow
Project Euler has Idris on its language list :O /cc @Jefffrey
 
user1804599
lol
 
Nice
 
5:19 PM
> I socialize with you people and I fucking hate half of you. @TrPrado and others also qualify as my bitches so I socialize with them but they are not friends.
3
 
da fuck
 
@R.MartinhoFernandes what
 
It's from a forum thread titled "What's a friend?"
 
How can I call a static member function via a template alias?
 
Is cosh the new puppy on nomic?
 
5:23 PM
template<class T>
using type_t = typename my_type_trait<T>::type;

auto&& a = type_t<some_t>::static_mem_fun();
 
@R.MartinhoFernandes Either it's the Internet talking, or this guy is a sociopath.
 
yeah that works
 
Probably with typename or some silly C++ thing.
 
@EtiennedeMartel It's a joker.
 
really?
"Error: type_t<some_t> is not a class, namespace, or scoped enumeration"
 
5:23 PM
> The final group are the people I piss off by posting games but they ignore it and try not to message me.
SPEAKING OF WHICH: gameID=150486
From the same person.
 
@R.MartinhoFernandes Then it's the first case.
 
@gnzlbg Have you tried with typename?
 
@gnzlbg really
 
@LucDanton my bad, it works perfectly, thanks!
@Jefffrey i screwed something else, it works :)
 
> A friend is someone who stabs you in the front.
 
5:32 PM
@LucDanton Fails utterly (on VC++ 6).
 
@JerryCoffin That's a pretty safe guess.
 
does it fail on VC++ 14
 
My GHC also rejects it!
 
Compiled with /EHsc /nologo /W4 /c
main.cpp

Compilation successful!

Total compilation time: 109ms
 
lol
 
5:35 PM
nop
 
@R.MartinhoFernandes I figure it is, anyway (I'm certainly not going to install a copy to test it).
 
rise4fun has gotten better
(i.e. it actually works for me now)
lol this is fun
Total compilation time: 62ms

Total execution time: 593ms
for int main() {}
cloud so slow
 
that's 45.6ms per character!
 
5:58 PM
for 100 bucks I can get you 100ms per character
 
posted on November 14, 2014 by Gabriel Ha

Hello C++ World! With Wednesday's release of Visual Studio 2015 Preview, we are pleased to present you with new and improved coding productivity features, not the least of which is (finally) Refactoring for C++! Special thanks goes out to you folks...(read more)

 

« first day (1493 days earlier)      last day (3473 days later) »