« first day (1295 days earlier)      last day (3667 days later) » 

12:00 AM
@DeadMG not banning. Saying that you pay-as-you-go. Read the next 2 slides :)
 
Concepts are mentioned in "Elements of Programming" by stepanov and that was published like 5 years ago
 
Concepts were part of the STL.
 
Concepts are way older than that
@AndyProwl He blocked the particular contraption that was going to happen
 
sgi.com/tech/stl/download.html you can see SGI's implementation here in concept_checks.h
 
@AndyProwl He had good arguments to show. And he wasn't alone. Yes, he wrote the "killing piece". I commend him for it.
We don't need C++ to drown under it's own weight
 
12:02 AM
iirc @ScarletAmaranth is doing his dissertation on Concepts.
 
@Rapptz :O
I wish I could tell Windows to treat my three monitors as only one but for only certain applications (i.e. games)
 
@sehe I'm not saying he was wrong in not liking it, but I look at how C# evolves and I look at how C++ evolves. C# has constraints, async/await, yield, tasks, and who knows what else (I don't know C# much). It's useful. C++ wants to get everything perfect before anything becomes available, and the result is that useful stuff becomes available at such a slow rate
I'm wondering if it's really not possible to develop the language in a more agile way
Now I understand C# is not standardized
(perhaps the first version was or something)
 
C# and C++ are radically different languages. I mean, for starters C# doesn't have the huge baggage that C++ has with the need to support most of C99. C# generics and C++ templates aren't even the same.
 
True, they're not
 
@AndyProwl How are you even comparing these two. They have vastly different ambitions and responsibilities
 
12:06 AM
Also, the way C# and C++ implement features are completely different
AFAIK C# doesn't have to go through a standard committee meeting that takes place maybe a maximum of 4 times a year and when they're all done with whatever they want, they don't have to wait 5-8 months so everyone can approve of the ISO standard.
 
Perhaps I'm short-sighted, but my point is, I don't care how they implemented, I care what's made available to the community
@Rapptz But that's what I'm wondering. If there's really no more "agile" way of improving the language
 
they're trying to be more "agile"
C++98 to C++11 took 13 years
but C++11 to C++14 only took 3
and then we're getting C++17, so another 3 years (hopefully anyway)
 
C++98 to C++11 was a huge delta
C++11 to C++14 is pretty small in comparison
 
That is kind of my point.
 
so the 13 years vs 3 years does not count as a good argument
 
12:09 AM
They're trying.
I am comparing the only data points we have.
I don't know what else you want me to say
 
Is C++14 out yet?
 
@Rapptz I'm not forcing you to say anything
 
Can as well be another 10 years ;)
 
Clang already implements all of it
GCC is pretty close
@AndyProwl Another point of comparison. Look how quickly compilers are implementing language features now a days.
The speed of implementation is definitely improving, I can't see how anyone would say it isn't.
iirc we didn't have a fully compliant C++98 compiler until a few years ago
and VS is still not fully compliant in C++98
 
C++ currently evolves to Javascript
 
12:13 AM
I agree, but if it takes a year to implement something and 10 years to specify it, I still have to wait 10 years
 
From auto func(int x) it is only a small step to func(x) ;)
 
I'm just witnessing how slow C++ develops into something more useful compared to other languages
 
Oh yeah.
Haskell has only majorly updated twice.
 
Haskell is already beautiful enough :)
 
They managed to put modules and concept maps there though
 
12:16 AM
these are the main changes from 1998 to 2010 that are listed in the wiki
 
12:27 AM
@AndyProwl Then use C#?
 
@sehe That is indeed what I'm considering.
So far I kept sticking to C++ because I'm relatively proficient in it
 
@AndyProwl I don't doubt that these folks are really pushing that. In fact, that's the whole problem: some parties are pushing so loudly, I'm forever amazed that C++ hasn't become a total shipwreck by now
 
Stop using it then?
 
And by that I mean, hasn't been completely obsoleted/abandoned
@AndyProwl I went back to C++ because I like it.
 
@Rapptz At work, I can't. At home, I'm considering it.
 
12:30 AM
If you don't consider the new step in how standardisation is being made as an improvement then I don't think you'll ever be satisfied.
 
Of course I consider it an improvement
I just don't consider it enough of an improvement
 
That's the worst mentality to have.
Improvement is supposed to be in small steps.
 
Yeah like with concepts
or modules
 
They're trying and I hope they continue to improve and I'm not going to rag on them for not improving even more than they have.
 
I also hope they continue
 
12:32 AM
You should learn the history behind those two features if you are interested enough.
Instead of seeing it as an overall failure
It's better to know why it failed than just dismissing the history behind it and calling it a failure
Maybe I'm not as cynical as I thought or something.
I just think modules and concepts are an unfortunate situation.
 
I agree with that
I also think it's unfortunate that we don't have a task model
And better support for functional programming
And of course if performance were my most important requirement I'd say "ok well, I'd better be thankful for having what I have"
But in fact I came to realize that for ordinary stuff performance rarely matters that much
 
I'm trying to explain to a guy that I need a teardown function to demolish the testing database after each testing session. His answer? "Create database if it doesn't exist at start of app, don't ever destroy it."
 
Your experience may be different though
 
C++'s life motto is to have high performance abstractions
 
Yes, I'm aware of that
@Jefffrey Better avoid involving the database at all unless it's integration or acceptance testing
 
12:38 AM
@AndyProwl ... wat
 
@Jefffrey Are you talking about a unit test?
 
@AndyProwl What better support do you actually want? Just so we're on the same page, ranges are not a functional thing.
I'm actually curious.
 
@AndyProwl Of a web application, yes.
 
There are really only two things I would like from the functional world in C++.
 
@Jefffrey You should isolate the logic from the database. Mock the database out so you don't actually need to store anything on disk
The test will run much faster and you will avoid test run wars and other problems
@Rapptz Why ranges are not a functional thing? Lazy evaluation is like one of the two pillars of functional programming
 
12:40 AM
ranges don't have to be lazy
the concept of a range is not a functional programming concept
 
Well I'd want them to be lazy
 
@AndyProwl Hmm. I need to test a REST application. You know, PUT/DELETE/GET/POST requests and what the application response is, as a JSON object. There's no way on earth I can test it without a database.
 
regardless, you didn't answer the question :v
 
@Jefffrey Why not? I'm not sure what the details are, but just create an abstract interface DatabaseGateway, have a mock/spy/stub implement it, and use dependency injection for connecting the stub to the logic you want to test. Then in production you use a difference implementation of that class that does the real communication with the database
@Rapptz I did. Lazy ranges and, in general, more composable algorithms
 
How boring.
 
12:44 AM
And if concept maps were a thing, then monads, applicative functors, and the like
 
lmao
C++ does not need monads
 
@Rapptz Oh that's boring yeah, while having a copy_if_not_but_also_when and whatnot without transform_if is awesome
 
Guys do you know why I am missing important header files under VC/include? I have these: i.imgur.com/Q7dRf9f.png I installed vc++ 2010 express and full, I don't know what else I can do.
 
OK, NOW I'M REALLY PISSED OFF:
http://stackoverflow.com/questions/23438928/segmentation-fault-core-dumped-error
 
You have only those?
 
12:46 AM
Yep :)
 
Good job
 
Of course I am getting cannot include "string.h", etc errors.
 
string.h is not a thing
Use <string>
 
C library
O_o
 
12:47 AM
@MartinJames seconded the flag
@AndyProwl it is
 
@AndyProwl That way I don't actually test the database interaction... which... is everything the REST application is. There's no logic: POST new user, GET new user, PUT (update) new user. GET token, DELETE token.
 
@MartinJames :) close-voted
@Jefffrey I see
@sehe TIL
 
I might be remembering it wrong, I don't have the project in front of me, but it has iomanip? errors etc basically these include files report not being present at compile time. Some of it is old code.
 
@JoanVenge it's really simple, reinstall, fix your installation, whatever. If you require handholding, try Super User but I reckon they'll toss it out. I hope you can search for files on your own, so that's the end of it
@AndyProwl no way?
 
@sehe Thanks. I've just about had enough today. 'Cos driving Anne's darts team around, I'm totally sober. If I was drunk, I would probably have held back a bit 'cos 'don't anger-post when pissed' :)
 
12:49 AM
@sehe yes way?
 
It's not really simple, I already reinstalled.
 
@AndyProwl s/\?/!/
@JoanVenge Then you're really talented. Still no reason to keep wasting time here.
 
Programming is frustrating most of the time.
 
We're not psychic, everybody else just installs this shit and doesn't have the problem. So...
@Jefffrey Highly concur. I've spent ~2 days trying to talk to a WCF service from Java
 
Well I am asking because maybe someone else had this problem. No need to be a smart ass brah.
 
12:51 AM
@sehe I don't know C, I've never used string.h, my SO education taught me "some-standard-header.h" means I suck and <some-standard-header> means I'm cool
 
That's true. But it's in no way equivalent to "That's not a thing"
@JoanVenge I'm not. I'm just cutting to the chase. You do realize that /you/ barge in here with a question, not even checking before you cross the road :)
 
Also, ftr
I learned Haskell on my own approximately a year ago
 
Me too. We have so much in common :)
 
Just because I'm not an evangelist for Haskell and praising it 24/7 does not mean I'm not a Haskell guy
 
@JoanVenge There's absolutely no irony in "We're not psychic". You're gonna have to solve this yourself. And if you need handholding finding out elementary computer usage stuff, you're in the wrong place.
 
12:58 AM
@sehe Correct. The fact that it's not a thing is the part SO (nor myself) hadn't taught me (I remember several upvoted "there's no such a thing"). But I'm not trying to find excuses :) Hence TIL
 
@Jefffrey Of course it is. The only time we deal with things is when they're problems. As soon as the problem is fixed, we move on to the next...
 
@Rapptz by "not a Haskell guy" I meant "not a Haskell enthusiast"
I didn't mean to imply your knowledge of Haskell is poor
 
@AndyProwl yeah that's ugly. But not nearly as ugly as std::binary_function, std::unary_negate, std::bind_1st, std::bind_2nd and that unhealthy bunch
 
@AndyProwl Mostly means you're listening to the wrong people.
 
@JerryCoffin In hindsight, yes
 
1:00 AM
@JerryCoffin That's the natural workflow. With "frustrating" I mean spending a whole week trying to solve the same problem.
 
@AndyProwl If the context is strictly C++, there is no such thing. It is then, maybe, <cstring>. But this context was a compiler installation. Where the compiler can do C and C++
 
Make it two actually.
 
@sehe Right
 
@Jefffrey That does get frustrating, no argument from me on that. Most of us do tend to prefer problems that put us to the test, but not too much...
 
Yeah.
 
1:02 AM
@sehe Not quite true either. Though deprecated, <string.h> is still there (see §D.5).
 
there is not, /usefully/, such a thing in C++. Because it's, indeed, not useful to have standard library stuff polluting the global namespace
@Jefffrey I still remember when last year I was implementing Shared Signature and Shared Key authentication in C++. From the "documentation" on Azure/MSDN.
That was... phun
I think it took me several days, if not a week, to figure out the "right" - undocumented - mix of upper/lowercase hex digits in URI-encoding and the "right" (cough!) way to interpret the base64 representation of the 32 byte key
(the docs state something like, interpret the key as UTF8 bytes; in reality, the base64 thing is just used as the raw key. Good luck finding that out if the docs said something else)
I finally just reverse engineered from the .NET SDK for Azure. Decompiling stuff until I found that glorious mess-up.
Hahaha, I lol'd so hard. Seriously, learn to use GDB: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7837db0 in BN_num_bits () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 ... #3 0x0000000000402627 in dosign (prikey1=0x605a00, pubkey1=0x6057a0, data12=0x608490 "-----BEGIN RSA PUBLIC ..."..., dataLen=427) at test.c:516 #4 0x0000000000401fc4 in main (argc=2, args=0x7fffffffe188) at test.c:346 You would have seen that you called dosign with a char* instead of RSA*. Also build with -Wall and get rid of the warnings before complaining. — Grapsus 5 mins ago
@MartinJames Why is this question not downvoted more?
 
At least you orgasm when you finally fix it, but gosh... my liver is decreasing in size every day.
 
1:21 AM
@sehe At least if memory serves, the <Cxxx> headers are allowed to add names to the global namespace as well. As such, your code needs to pretty much assume they do, regardless. The fact that they usually don't (or may not) doesn't really gain you much.
The minor good point is that the C standard is much stricter in this regard than the C+ standard--other than the reserved names (underscore followed by underscore or capital letter, etc.) they can't define any names other than what's specifically required by the header you included. Unlike C++ headers, one header can't include arbitrary other headers, and define all those names.
 
very few headers allow you to include another header
<typeindex> doesn't even require them to add <typeinfo>
the only ones I've encountered were actually <initializer_list>
which get included when you include any container
and std::begin/end which get included as well
 
@Rapptz ?
 
@telkitty.exe ..?
 
headers to include other headers are quite common
#include <string>
 
Obviously talking about standard headers o.o
 
1:28 AM
for example
 
In the silly benchmarks department:
1
A: Comparing 3 modern c++ ways to convert integral values to strings

seheThe classical mistake: creating a new stringstream every single time template<typename T> // 1. Using stringstream string StringFromIntegral_SS(T const &value) { static stringstream ss; ss.str(""); ss.clear(); ss << value; return ss.str(); } Update Boost Spirit Karma still ...

Good to see Spirit Karma still doing it's job well there.
 
1:48 AM
Wow. This only has 91 people giving the correct solutions.
 
2:06 AM
Added another candidate implementation, that is faster still than the Karma version. It clcoks in at ~4x the lexical cast. [Silly Benchmark Disclaimer]. Of course, any real wins depend on the real usage patterns. — sehe 41 secs ago
Now it's really time for bed.
@Rapptz PE will have to wait :(
 
user3010322
Hm.
 
user3010322
So, MSVC trips up on my bounds<std::size_t n> template.
 
user3010322
I apparently have too many instantiations of bounds<1>
 
user3010322
So it's Internal Compiler Erroring, and throwing my whole build out the window.
 
I just came here to laugh at that.
 
user3010322
2:14 AM
I fixed the problem with my release build of Unicode by not using buffer_view in it
 
user3010322
and creating a dumbed-down version of buffer_view to handle it data_block<T>
 
user3010322
But now the main engine isn't compiling.
 
user3010322
I, uh.
 
user3010322
I'm out of ideas. I can't really keep bending over for MSVC.
 
user3010322
I'm pretty sure it's time to switch to MinGW and QtCreator, but overhauling my builds and engine to work with QtCreator and MinGW is going to be.... a lot of work.
 
user3010322
2:16 AM
So I've effectively shelfed all my coding for months.
 
So, played a bit of Child of Light.
After two hours of play, I have to say I like it.
 
Congratulations.
projecteuler.net/problem=439 what is this monstrosity of a sum :v
that's not how you use sigma notation at all!
shit, I must be retarded, I can't repro the results.
 
Uh, Steam is down.
 
Oh
My sum_of_divisors stuff was off
 
2:31 AM
Is that why Steam is down?
 
Yes
I'm using the Steam server to calculate sum of divisors up to a large number k
 
That explains everything.
 
I imagine I might solve problem 439 by the time I'm 102.
 
2:57 AM
@Rapptz Want to be PE friends?
 
Sum of sivisors is just the Euler Totient function.
 
I don't really think sum_of_divisors is my bottle neck.
it's the dumb S(n) function
I'm always a noob at optimising nested for loops
they go over the same bounds
 
Any time you have a nested that goes over the same data over and over again... Is a suspect for an optimization.
 
yeah and these are the ones I suck at :v
teach me oh great mysticial
I can't combine them together
 
Oh you can't...
 
3:03 AM
yeah it's 1 to 10^11 twice
 
Then it depends on the case.
 
for(uint64_t i = 1; i <= n; ++i) {
        for(uint64_t j = 1; j <= n; ++j) {
where n is 10^11
 
What's the body?
 
takes a sip from the firehose
and gets blasted in the face
 
inline uint64_t solution(uint64_t n) noexcept {
    uint64_t sum = 0;
    for(uint64_t i = 1; i <= n; ++i) {
        for(uint64_t j = 1; j <= n; ++j) {
            // dumb brute force ._.
            sum += sum_of_divisors(i * j);
        }
    }
    return sum;
}
I was trying to do some math in my whiteboard to see if I could make it better but couldn't think of anything that wouldn't just end up in more computations
 
3:05 AM
Oh, that's not a data-bound operation.
First, you can shave off a constant factor by recognizing that i * j is symmetric.
 
When a PE problem says "You are given that...", is this just to verify that your implementation is correct? Or is it intended to be used as part of the calculation?
 
former
you can use it on some problems though
 
okay, so it could be either one, depending on the problem?
 
essentially
the givens here are a bit meaningless imo
they're just meant to verify
 
that's the way I usually take them
 
3:08 AM
What you can do is prime-factorize every integer 1 - 10^11. That can be done easily using a sieve.
 
but I haven't gotten much further than problem 60ish
 
nevermind, that still doesn't get rid of the N^2.
 
oops last sigma is d/(i * j) :v
@Code-Guru I kinda miss Marcus.
He used to do PE problems (I think he solved all of them)
 
I don't remember him
 
Woah, I didn't see this until now:
16
Q: Allow users to optionally filter out low-quality questions

David FullertonLots of people are talking about this, so time to throw my hat in the ring. Note that this is just my idea and hasn't really been vetted by other Stack Exchange employees (probably some of them will chime in here). Background: of "rep whores" and "help vampires" See this answer to "Why is Stack...

 
3:17 AM
He was around very very shortly.
 
@Rapptz 11547220324392_1c08b044a4063c2604cf456d619020a2 (PE Friend key)
 
Looks like all rage on meta is actually coming to something.
 
@Code-Guru added
 
cool
 
oh wow
 
3:20 AM
I'm definitely a PE noob...
@Rapptz hmm?
 
I got a new award
 
grats!
 
did you solve the sum_of_divisors problem?
 
No I just clicked on my progress page
I was unaware I actually had most of these awards o.o
 
3:24 AM
is there any separate chat room for bash?
 
nop
 
try server fault chats
wait, server fault has chats, right?
 
i donno.
 
@Code-Guru You can simplify it mathematically by doing this I guess..
but... that's still a monstrosity computationally :/
 
I'm back...brute force to PE often freezes up my poor little laptop
I'm doing PE problems in Haskell and I find it even more difficult to wrap my head around optimizations.
 
3:46 AM
I tried doing PE in Haskell when I first started learning
but it was ultimately a lot slower
probably cause I sucked at it or something
so I just went back to C++
 
I've been debating whether to do some in Python or maybe even Scala...
 
Python is incredibly slow
 
true
 
like, slower than slow
I think NumPy would help but I don't use it
 
I guess doing PE in C++ would help me sharpen my skills. Especially since I know very little about C++11
 
3:50 AM
C++11 won't help much in PE.
The issue with PE is it isn't a programming thing
it's a mathematical thing
I'd really like a site like PE that was for programming.
But the only "programming competition" sites are full of Indians and "1337 h4ck3rs"
 
TopCoder ftw!
Have you tried rosalind.info?
 
TopCoder is a terrible site
 
lol
they are updating the look lately
 
@Code-Guru Nope
 
Bioinformatics problems...still some mathematical concepts, but not the number theory stuff from PE
definitely very algorithmic
 
3:54 AM
PE is just cruel with its mathematical knowledge requirement lol
 
true
The first 50 problems weren't too bad, but it seems to quickly ramp up from there.
 
I don't know how many I have solved
394
the first 100 are simple (a few are annoying) but yeah
 
I've got 68 so far...
 
apparently I'm part of the 1% :v
 
leetist!
 
3:57 AM
tbh
these aren't even the math problems I like to solve
I like solving equations
 
what math problems do you like?
 
PE has a lot of that though which is why I let it slide :P
 
taking derivatives?
 
that's baby stuff :v
 
true
 
3:58 AM
I like doing the problems by hand
it's just when you translate into the program it's not very efficient because math and programming aren't really 1 to 1.
So you have to make more effort to make it decently fast
so.. two step process basically
 
I've tried to figure out dynamic programming in Haskell, and I still can't wrap my head around it enough to implement my own algorithms with it.
 
yeah you tend to use a lot of DP in PE.
 
Is it normal when you written enough code that you start to have a love/hate relationship with EVERYTHING?
4
 
I think that started before you wrote code...
 
Just for example, I have to deal with at least 8 implementations of the 3d vector datatype: Ogre3d, Eigen, PCL, OpenCV, ROS, TF, KDL, double[3].
 
4:14 AM
lol
 
And it is great that sometimes I just go look at the source code of some libraries, and they are just converting to other types, and then converting back to return a value.
 
okay, trying a supposed memoization in Haskell...hopefully it's correct
 
Haskell has Data.Map though
 
4:43 AM
yah, I need to learn how to use that
 
it was the 3rd thing I learned in Haskell actually
 
... so I'm not feeding SO's demise, and I strongly reject such a stupid arrogant and false accusation, which I return to you: I give you -1 for your comment, you are projecting yourself: you are feeding SO's demise with comments like yours, but thanks God there are people more civil and respectful here. I don't want to waste my time with flame wars, so I end this thing here. Consider reading this. — Mr.C64 6 hours ago
enjoy
 
does the syntax count as the first two things?
 
nope
1st was recursion, 2nd thing was branching/pattern matching
 
0th was the syntax...
=p
 
4:47 AM
lol I guess
 
I read LYAH cover to cover, so that's pretty much the order I've learned things
 
I read the wiki first
then I read LYAH then I read RWH
 
although, I could probably go back and read LYAH again and still learn some things at a deeper level.
I'm trying to get through RWH, but it's pretty dense.
not a bad thing...the author makes the material approachable. It just takes me quite a bit of time to wade through the examples and understand them.
 
I wish Haskell had nicer syntax
:s
In the beginning it's nice, then it kinda goes downhill IMO
 
I agree that the core syntax is nice. The operator overloading gets a bit out of control, though.
 
4:51 AM
Yeah, exactly.
Lemme try this Rosalind thing
first one is... Fibonacci.
I've done these a million times lol
> solved by 458
 
@Rapptz check out the Stronghold
 
where
Oh
well these are... actually interesting
 
I think you went to the area for the (relatively) recent Coursera class, so there aren't as many ppl that solved them.
 
Coursera?
 
MOOC website
 
4:56 AM
yeah I know but how is it relevant?
So how does this work?
Can I try this in any language I want?
lol I'm glad they're defining alphabet for me
I forgot I'm retarded
 

« first day (1295 days earlier)      last day (3667 days later) »