« first day (1061 days earlier)      last day (3873 days later) » 

Ell
8:00 PM
I'm not sure I understand. But here is an example of what I want to fix. Player A builds a factory (and the corresponding packet is sent), the factory starts producing goods. 200ms later, Player B receives the packet
Now player B is out of sync because it thinks Player A has 200ms worth of resources less than it actually does
 
@Ell player B is only out of synch if it applied the packet out-of-order. Constrain the order, problem solved
 
Ell
I feel like this would add up quickly if it wasn't synced
ohhh I see
 
> I reduced my bug cunt.
 
> I increased my typematic raid
 
Ell
8:02 PM
and TCP guarantees order, right?
maybe there is no problem at all
 
@Ell it can (depends on how you use it). If it's a single TCP_STREAM socket, sure
 
@Xeo @Rapptz will be happy about this methinks
 
user1804599
Hmm.
 
Hm, ccache only caches if -c flag is used.
 
Ell
hmm. But wait a minute
 
8:04 PM
@Borgleader I also suggested such an operator in the past.
 
Ell
even if I apply then packets in order, the game will still be updating while waiting for the packet right?
 
I have yet to find out what all this operator auto() is about. Is it to enable API authors to modify type deduction (e.g. in the presence of expression templates)? ?
@StackedCrooked not normally the case. Although, my preferred method is
 
user1804599
Haha.
 
Xeo
@sehe ya
 
Compiling main.cpp into a executable increments the "called for link" counter.
 
Ell
8:05 PM
Player B will still be out of sync because although he has applied the packets in the right order, the game has been updating during that 200ms
 
ln /usr/bin/ccache ~/bin/gcc
export PATH="~/bin:$PATH"
 
Ell
I think o.O
 
@StackedCrooked Oh. Gosh that was sloppy wording! Of course linking is not cached. Because it can't really hash the precompiled sources in that case. However, SCons does cache this too, IIRC. distcc has the same "limitation" (design choice) as ccache AFAIR
 
@sehe But g++ main.cpp = compile + link
 
> "monotonously increasing eventid" -> clock. But yeah, I have no idea how serious games implement this shizzle
 
user1174868
8:07 PM
It is so hot I can use my belly button to harvest salt
 
@StackedCrooked Ah, don't do that then. You're right. I somehow blanked that out (too many years of 'standard form' Makefiles, I guess
 
@sehe So I should change the default command line to g++ -c -std=c++11 main.cpp ; g++ main.o ?
 
@StackedCrooked that helps a lot, depending on the size of the programs. The link step will still be required... :|
 
so. According to my school, Precalculus from MIT does not meet the requirements of precalculus from my school.
 
Xeo
8:10 PM
What's ccache for, again?
 
compiler cache
 
@Xeo well you see, when a man and a woman love each other very much...
 
It's nice if you revert your changes and rebuild. Or if you just want to rebuild quickly.
 
user1174868
@Crowz that is probably more common than not. Schools lose money if they transfer credits in
 
Xeo
oh, cool
 
8:12 PM
hmm compilers cache ...
 
@StackedCrooked or if everybody builds the same snippet
 
@sehe exactly
 
@JohannesSchaub-litb it includes a checksum of the actual binary of the compiler and a the fully preprocessed source :/
 
Xeo
I guess that's really helpful for the cppreference snippets
 
However, separating compilation and linking kinda pollutes the command line.
 
8:12 PM
@StackedCrooked Clang++ not g++
 
@Xeo Indeed.
 
user1174868
Is there a way for me to see previous chat messages directed at me?
 
@sehe nice!
 
@Ell Scala has unapply for pattern matching. If C++ gets pattern matching, maybe it will get an unapply named operator )( or something? :)
 
user1174868
I want to find the PE answers people directed at me and try and learn wtf they did
 
8:13 PM
I think there were some problems clang++'s libc++ on Ubuntu. Maybe they are fixed by now..
 
@ripDaddy69 search for "@ripDaddy" i would do
 
user1174868
Oh and I apologize for the terrible name, I thought it would be funny to have for a few minutes
 
Xeo
@FredOverflow If invocation only "pattern matched" arguments to a function name, that might work. ;)
 
@not-rightfold "get" in the sense of "understand"? highly unlikely
 
btw
 
Xeo
8:15 PM
@FredOverflow lecture content
 
why the fuck is Point Blank Shot a pre-requisite for Manyshot?
 
Ell
gah I forgot the vim for paste
 
@Ell p/P ("+p for X clipboard)
 
Ell
8:16 PM
@sehe cheers :)
 
Xeo
wow
Caching would really do a big job then, eh
 
Yeah.
 
decltype(auto), operator auto()... is the committee ever going to stop with this type inference nonsense? :D
 
That's still not even big.
 
8:18 PM
you'd really want to cache the default examples cppreference uses.
 
However, the cppreference samples are small and build quickly.
 
@StackedCrooked sounds very few
 
user1804599
@FredOverflow what Xeo said.
 
Xeo
@FredOverflow Type inference is awesome.
 
@StackedCrooked oh it is a request on your compiler page
i thought on their web page
 
8:19 PM
@JohannesSchaub-litb via their web page to my server
 
explicit auto D = A * B;   // lol
 
user1804599
explicit should be implicit.
11
 
@FredOverflow what's taht
 
@StackedCrooked it will probably make more sense to employ your own cache at the API level
 
Ell
8:22 PM
what is it called when you do something([1,2,3], [4,5,6]) => [[1,4],[2,5],[3,6]]?
 
@Ell zipping
 
Ell
Right, thanks
 
If C++ ever gets dynamic typing, we cannot afford any new keywords, so this is what it should look like:
~static auto v;
v = 42;
v = "hello";
 
user1804599
@Ell [1, 2, 3].zip [4, 5, 6] in Ruby. :P
 
@sehe yeah
 
user1804599
8:24 PM
@FredOverflow context-sensitive dynamic keyword.
 
Ell
@not-rightfold Okay :D
Although I want to do it in c++ :3 I'll look in <algorithm>
 
[Prelude]
λ zip [1,2,3] [4,5,6]
[(1,4),(2,5),(3,6)]
 
@FredOverflow lol, that problem definition
 
user1804599
@Ell My guess is something generic with std::make_pair as callback.
 
@not-rightfold lol, loller lolst
 
8:25 PM
 
user1804599
@sehe Lach me niet uit om mijn C++-noobheid! :'(
 
@JohanLarsson done that, been there
 
@JohanLarsson rightfold pwned us all
unsurprisingly
 
oh, sry
 
user1804599
8:27 PM
@Borgleader lol
 
Xeo
std::transform(v1.begin(), v1.end(), v2.begin(), std::back_inserter(v3), [](T& a, U& b){ return std::make_tuple(a, b); });
 
user1804599
It's l'easy.
 
@JohanLarsson lol don't be sorry, I don't think anyone here expects you to read the whole transcript. at least, I don't
 
user1804599
@Xeo Why doesn't &std::make_tuple work?
 
Xeo
8:28 PM
@not-rightfold template arguments?
 
user1804599
Ah, I see.
 
user1804599
Thought they'd be deduced. :V
 
Xeo
[]std::make_tuple :>
 
@not-rightfold unresolved function (template)
 
user1804599
How about &std::make_tuple<T, U>?
 
8:29 PM
@Xeo yes please
 
Xeo
@not-rightfold Only takes rvalues
 
@not-rightfold watch STL's talk: don't help the compiler!
 
user1804599
Hmm.
 
Xeo
std::make_tuple<T&, U&> would really be it, but don't explicitly specify should-be-deduced template arguments
 
user1804599
@Xeo orite
 
user1804599
8:30 PM
@sehe ok
 
@Xeo I believe that STL mentioned that the library implementation doesn't need to guarantee that the ref-ness of the template args sticks, and indeed, MSVC's stdlib doesn't
 
Xeo
@sehe That is only for the arguments to make_tuple
 
Ell
@Xeo ahh I forgot I needed back_inserter too
 
Xeo
If I wanted references, I'd do std::tie.
 
Ell
I don't use iterators much. I don't write c++ much :P
 
Xeo
8:31 PM
@Ell everyone forgets that.
 
user1804599
lambdify(std::make_tuple, 2)
 
user1804599
Macroz!
 
I've always considered make_pair a special case of make_tuple (sizeof...(T) == 2)
 
Xeo
not much we can do about the tuple/pair redundancy
 
user1804599
@sehe s/make_//g
 
8:31 PM
3 mins ago, by Xeo
[]std::make_tuple :>
 
I got 2900 on hello world
 
@not-rightfold yeah, but I stayed on topic
 
Xeo
@not-rightfold LIFT(std::make_tuple)
 
user1804599
@Xeo Make the latter an alias to the former and add first and second to tuple of two elements!
 
@DeadMG if that's ELO... well done
 
user1804599
8:32 PM
@DeadMG noob
 
Xeo
#define FWD(id) std::forward<decltype(id)>(id)
#define LIFT(id) [](auto&&... a) -> decltype(auto){ return id(FWD(a)...); }
would be a very rough approximation.
 
wtf why define out the std::forward call.
 
I got 1500 on hello world, used luck.
 
Xeo
@DeadMG clutter
 
user1804599
@JohanLarsson noob
 
8:34 PM
it's less cluttered to define a macro with a bigger body?
 
Xeo
@DeadMG The body of the lambda, the important part, is less cluttered
 
@not-rightfold what did you get? Out of battery?
 
Xeo
I could've also left out FWD definition vOv
 
user1174868
@sehe thanks
 
user1804599
@JohanLarsson almost
 
user1804599
8:34 PM
0:04 minutes remaining.
 
Xeo
I obviously would not do that if I wrote actual code
 
@not-rightfold score?
 
user1804599
@JohanLarsson 6200
 
How much time should I reserve?
 
user1804599
 
user1804599
8:36 PM
@sehe tot je pensioen.
 
> "more dope kitten" (picture shows a non-kitten)
 
proof that Zoidberg knows more obscure shit than anyone else
 
@not-rightfold I don't have any, anymore
 
user1804599
I know Gear.
 
user1804599
@sehe :>
 
8:37 PM
@DeadMG indeed. he's got a memory disorder that facilitates this, IYAM
 
Ell
@DeadMG cos he's dabbled in languages like go, elixir, icedteacoffeescript etc. I think
 
@not-rightfold I'm signing next monday.
 
user1804599
@sehe I can't remember acronyms though, IYAM.
 
@not-rightfold max is 6300, what did you miss? java?
 
ISTR it meant If You Ask Me, OSLT, ICBWT, IANAL
 
8:41 PM
there was a group of religious people here in germany who had some plate with some bible/koran verses and put the german command "Lies!" above those verses...
 
Xeo
lol
 
> Cell phone cameras repel UFOs imgs.xkcd.com/comics/settled.png
@JohannesSchaub-litb indeed, statistics are not lies
 
got 500 on that one
 
Ell
@JohanLarsson 350 :3
 
8:58 PM
@JohanLarsson 300. Which was pretty good considering most of them were fairly blind guesses.
 
> Inline functions never inline
wut
 
Ell
"The tricky reference" is silly
 
@Ell Everything there is silly.
 
Ell
9:08 PM
@Griwes I think most of them are
 
Most of them are eliminated using -Wall -Wextra -pedantic and reading the output.
Size of empty class is totally irrelevant for any sane code.
The "default parameters in derived classes" shows the writer has no clue how default parameters work.
 
@sehe Compilation is now cached. (fyi)
This should greatly reduce CPU usage.
 
in case it wasn't clear: please don't do that. Pseudo code only creates Red Herringssehe 28 secs ago
@StackedCrooked wokay
 
Xeo
template <> struct Overload<> {
    void operator()() const {}
};
That seems unnecessary / dangerous
Just specialize on single F.
 
@StackedCrooked to have that actually be useful, you need to check the compiler version (md5sum of the binary? perhaps something with strace -e process across the build.sh could help)
 
Xeo
9:22 PM
@sehe Didn't he mention that ccache automatically takes the md5sum of the compiler binary?
 
@Xeo This isn't using ccache. Click the link
 
However, that would require parsing the command line to find out which compiler is used (g++, clang++, .)
 
@StackedCrooked Nope. You could use blunt force, or use/parse the output of strace there
 
I got lost in Wikipedia again.
 
@StackedCrooked mycompiler=g; ${g}++ -o a.out main.cpp
 
9:23 PM
But strace would also affect output shown to user. Unless I run the command twice. Once with and without.
 
@TonyTheLion Don't. There's tropes and reddit and youtube for that
 
Easier said than done
 
Xeo
@sehe, might want to revise your answer
 
@StackedCrooked Mmm. I think (know) you can attach strace to a running process in a different terminal
@Xeo mmm? Which one
 
Xeo
look up ... checks ... 15 messages
 
9:25 PM
 
Xeo
@Griwes lol
 
@Xeo please. be a lot clearer? I am talking about this:
11 mins ago, by StackedCrooked
@sehe Compilation is now cached. (fyi)
Follow link, inspect awesome Archive check
 
Xeo
6 mins ago, by Xeo
template <> struct Overload<> {
    void operator()() const {}
};
 
Also, quoting a comment on imgur, cat's don't gravity.
 
@Xeo I have zero clues what that is about
 
Xeo
9:28 PM
 
@Xeo Oh I "gedit" now (har har). What could be dangerous? It's hacky yes.
 
@Griwes the eyes are all wrong!
 
Xeo
@sehe make_overload([]{}) :D
(yes, thinking about it, it's fine, since overload resolution requires arguments)
 
@Xeo What about it?
@Xeo mkay
It's hacky as hell
 
Xeo
@sehe ambiguous overload of operator(), one in the base case, and one synthesized from the overloaded() call
atleast I think it would be ambiguous.
 
9:31 PM
@Xeo mmm. yeah. in a way. I deleted it for now. The other stuff all concerns shady macros and printfs - I'm not even sure what they are talking about in that question
 
Xeo
mh
 
But it does the job. At least for g++ and clang++.
 
@StackedCrooked nah, it's fine (better than naught); I'd probably use openssl digest
 
Btw, do you prefer posix sh or bash?
 
for compiler in g++ clang++; do $compiler --version; done |openssl sha1 would be easier
@StackedCrooked no preference. I like bash. For server, sh is potentially more secure
@StackedCrooked wait. where did you put this?! You didn't change the checksum derivation for all archive posts, did you? Because that guarantees zero cache hits in the foreseeable future
 
9:43 PM
@sehe Archive posts are found by their id in the URL.
However, yes, cache is cold every time I change hash.
 
that was my point
 
I think that's hard to avoid.
 
mmm. yes. good point
However, now it looks like you're hashing the binaries every single time. Probably best to.... cache the binary-hashes :/ Say, for some time, perhaps until you run a maintenance script, to "derive" the new "environment" hash (it's more than just the compilers, right, why not hash on the chroot, basically?)
 
Not really the binaries, but the output of --version: g++ --version | shasum
 
That's worse: OS still loads them + dependencies. Now it also runs them.
 
9:47 PM
That warms them up for the user program that will be run next :)
 
Cough. It warms the blocks up, but it does kill the process first :/, processes. It warms the irrelevant compiler(s) too
 
root@stacked-crooked ~ $ time g++ --version >/dev/null

real	0m0.007s
user	0m0.000s
sys	0m0.004s
7ms is not really a big deal.
 
So? how many hits do you get at peak times? ISTR memory load being the main bottleneck
Memory isn't measured in ms
 
Requests are handled sequentially.
 
it's measured in "fuck you bitch".
 
9:49 PM
I enabled concurrent requests for a while but that's a mess. (They all run under the sandbox user so the ulimit restrictions are then shared over the number of active jobs.)
 
@StackedCrooked Wokay. Then it's prolly simpler this way. However, if you wanted to have an "environment" hash worth more, you'd start including more stuff. And then it becomes a factor. I'm really thinking ahead
@StackedCrooked starvation ensues
 
@sehe What kind of stuff shouldI include?
env?
I could actually for a cold cache every week by adding echo $(($(date +%s) % $((7 * 24 * 3600))))
 
your call. You know the feature set (boost version comes to mind)
 
Hm, good point.
That would require a hash of CPP output.
Which in turn requires me to parse the command line to figure which compiler they are using, if any at all.
 
@StackedCrooked "require"? Nah. Just put the version number somewhere? I think you can write a 5-line cpp that dumps boost version to the console
 
Xeo
9:54 PM
@sehe Clang seems to fuck up on the implicit conversion inside of decltype
 
@StackedCrooked oh wait, you mean there are multiple BOOST_DIR's on the system?
 
Was short term memory about 7 things? I cannot remember.
 
@sehe /usr/include has the one from apt-get, /usr/local/include has recent build
 
@StackedCrooked ah. just ... remove the non-feature (/usr/include/boost)?
 
I guess. I hope that won't break anything though.
 
9:57 PM
@Xeo Hm..? Where's the broken
 
@StackedCrooked only on forking/recompiling old entries. but that's bound to happen anyways
@Rapptz i was looking for it too
 
Xeo
... wtf
wat
I swear there was a compiler error before I shared.
 

« first day (1061 days earlier)      last day (3873 days later) »