« first day (1972 days earlier)      last day (2990 days later) » 

2:00 PM
Apparently none of the proposals related to bit utilities were considered during the previous meeting :/
 
> error: no matching function for call to ‘forward(auto:6&)’
what the fuck now
is GCC really incapable of template argument deduction
Hmm, I can actually replace this auto with a more concrete type...
Let's see if that helps it.
 
Not sure what you're trying to achieve, but apparently you cannot into beatinf your cimpoler into submission.
 
Well, it's GCC.
The retarded brother of the real compiler.
It doesn't really understand pain, so beating it is pretty hard.
aaaaaaaaa
I need that auto to get SFINAE.
Fuck.
Or do I, now...
JESUS FUCKING CHRIST
> /usr/local/include/reaver/variant.h:232:110: internal compiler error: in dependent_type_p, at cp/pt.c:21141
FUCK YOU TOO, RETARDED COMPILER
auto generator = [&](auto type) -> decltype(typename decltype(type)::type(std::forward<T>(t)), void()) {
Apparently this is too fucking complicated for GCC.
 
Nested decltype? Never tried that.
 
I could probably report a bug...
...but that'd involve making a testcase...
 
2:08 PM
Try to throw an std::declval somewhere in for shit and giggles?
 
Oh great.
 
where it t
 
Or just use [&]<typename T>(T&& type) -> /* ... */
 
If I replace that with is_constructible-based enable_if, it also ICEs... at the end of the lambda this time.
@Morwenn ...since when is that legal
 
@Griwes It's a GCC extension.
 
2:09 PM
Fuck GCC extensions.
 
But with a proper #ifdef, it might be enough to just implement the workaround for GCC x)
 
;_;
 
#if defined(__GNUC__) && !defined(__clang__)
   cry
#endif
 
Yes, pretty much :/
 
minimal repro I guess
it'd be a compile error regardless but it still produces an ICE
 
2:13 PM
Starring to maybe report it later on :/
 
Ven
@Morwenn u fukin w0t
 
Ven
I believe. but wow my eyes hurt
 
/usr/local/include/reaver/variant.h:233:90: error: invalid use of template type parameter ‘U’
                 auto generator = [&]<typename U>(id<U>) -> decltype(U(std::forward<T>(t)), void()) {
                                                                                          ^
what.
(is_constructible is still crying)
Oh wait, this will need additional boilerplate anyway if done this way :/
 
lol
At some point template lambdas were a proposed extension to C++.
Short lambdas too where you could write [](int arg) { arg * 2 }.
 
Ven
2:25 PM
[](int arg) => arg * 2;
consistency with JavaScript!
 
it's really annoying how assembly fails just make the apps exit silently
 
xor ax,ax
int 21h
@slaphappy ^
IIRC retcode mightn't be stored, so you could probably drop al from xor
 
cool, depends has a command line mode
 
Ven
2:41 PM
bageels /cc @jaggedSpire
 
@slaphappy that's just untrue
 
Ven
and unfair
grrr I keep pasting prototypes from my hpp to my cpp and wondering why it doesn't parse the block, when I forgot to remove override...
 
2:56 PM
why not use modu- oh.
 
Ven
my general director has a 4-pages article in this month's Hipster Mag.
 
@Ven how lamestream
 
Ven
:\
 
3:13 PM
'Update 86 of 118'.... someone kill me:(
 
kills Martin James
 
@Griwes Next kill Windows Update...
 
killall -9 windows-update
 
@Griwes I wish I was on Linux and that worked:)
 
1) install linux 2) ??? 3) profit!
Dang I'm tired.
 
Xeo
3:15 PM
I don't think you wish that worked... cause I'm not sure anything else would really work after that :P
 
All soddin' year it's been hardware failures that mean continual re-install of OS and the bloody updates:((
 
Oh great, now GCC and Clang disagree w.r.t. friends.
Ugh, I was sure I had it in state where the friends declarations worked with both compilers ;_;
 
loungë
 
Yes! Made that fucking file compile with this fucking compiler.
Ah crap, I was trying to simulate std::invoke with std::bind in a naive way and it obviously doesn't work :X
 
How?
 
How what?
 
How did you make the hoe thing compile?
 
With boilerplate.
I basically moved the lambda generating thing into its own struct :/
 
3:41 PM
Oh.
 
Welcome to C++98 :/
At least I could still use the [](){ using T = Args; }... thing (although not with this exact syntax) for the rest of use cases.
 
I know, right? I tried to make an algorithm C++98-compatible once and had to write two full structures just so that I could use std::partition.
 
auto generator = [](auto type){ using T = typename decltype(type)::type; return [](){}; }; and then generator(id<Args>())....
Doesn't hurt too much.
Sure, boilerplate, but at least I can do it inline.
Unlike that one retarded case with SFINAE where I did put that in its own struct.
 
return []{} is enough.
 
sol is now starting to crash
Exceptions aren't making it out alive.
They're being swallowed up somewhere.
 
3:46 PM
@ThePhD It took a while.
 
Well, let me be more clear: the tests for sol now has 1 failing due to a crash, because I have a REQUIRE_THROWS( ... ) and while it used to throw it's no longer throwing at all or calling the atpanic function.
 
depends.exe /c /a /f /u /od has been running for one hour now :3
 
@slaphappy ...whatever that means.
 
0.o
 
@Morwenn I know, though I usually keep the () there.
 
3:50 PM
But syntactic sugar :o
 
I tend to keep the parens too, can't explain why
 
@Morwenn but ease of adding arguments later on :o
 
@Griwes Can't you get everything right the first time? Wow, such a loser.
 
And made another file compile!
 
3:54 PM
:p
 
error: declaration of ‘test::reaver::_v1::packaged_task<T> test::reaver::_v1::future_package_pair<T>::packaged_task'
error: changes meaning of ‘packaged_task’ from ‘class test::reaver::_v1::packaged_task<T>’
oh fuck you gcc
 
loungé, i haff qwestion
I have a list of objects with specific ordering constraints. Given the constraints I want to group together as many objects as possible based on one of their properties, but I'm not really clear on how. I've been stuck on this problem for a little while... anyone know if this falls under a certain class of problems? General advice or whatever would be appreciated.
^ sample problem
brute force permutation is
 
@Prismatic IDGI
What does "group colors together" mean?
 
Do you need all such orderings or just one
 
I just need one ordering
 
4:02 PM
dunno, decorate the shapes somehow and sort them?
 
@Griwes It means that in the output, colors should be grouped together as far as possible subject to the constraints
 
probably won't work though
 
@milleniumbug Yeah I tried that but the output changes based on the comparison function you give for the colors... ie, if "red < blue" you get one grouping and if "blue < red" you get another. But one of those groupings is worse than the other because it has less identical colors adjacent to each other... if that makes sense
 
so you have a subproblem now
 
sub problem?
 
user1804599
4:06 PM
@Ven map xs [x](arg) -> arg + x type inference and ambiguity!
 
smaller problem inside another
didn't expect I'd need to explain this
 
I guess
I thought it might have some fancy math definition
 
> -10 12 hours ago removed User was removed (learn more)
rip :(
 
Well, problem looks interesting, I'll be interested in a solution too
 
Trying every permutation of the sort comparison functions also seems unpractical
 
4:09 PM
I have a serialize() function that takes a string filename and string &output as parameters. It serializes to output. The file is not touched. vOv
 
@milleniumbug You wanna know what its for? I'm trying to optimally batch 2d objects with transparency that have a defined order. If you're interested I wrote up the actual thing Im trying to solve here
1
Q: Optimal batching for 2D objects with transparency

PrisI have a collection of 2d objects with transparency. Each object has a depth value to determine draw order and a material. I'm trying to batch them in an optimal way to minimize draw calls. Assume that objects with the same material can be batched together in a single draw call. A naive way of b...

 
@Prismatic You're trying too hard.
 
nou
 
oh btw @VeronikaPrüssels
std::string& PackRef=*((std::string*)(0))
 
4:11 PM
If you have access to the 3D backend, simply slap the object's z coordinate into the "depth" you want, and then orthographically project.
@slaphappy uwotm8
 
THAT'S RIGHT
 
@slaphappy ಠ_ಠ
> 3,4,8,9) does not throw if other's target is a function pointer or a std::reference_wrapper, otherwise may throw std::bad_alloc or any exception thrown by the constructor used to copy or move the stored callable object.
 
the thing I talked about earlier
 
@ThePhD That has nothing to do with the problem, the issue is correct ordering for transparency. I am using an orthographic projection with OpenGL and 'z' is my depth value lol
 
C++ is really bad at this "move semantics" thing. :/
 
4:13 PM
@slaphappy git blame the guy
 
@Prismatic Ooh, right.
@Prismatic Painter's Algorithm plus Binary Space Partition tree of some sort.
 
What would I do with a BSP?
 
Ven
@Zoidberg the type is known: you know xs's type.
 
Also why can't they just bake in order independent transparency into the hardware already?
 
Because it's hard.
And has a significant performance impact.
 
user1804599
4:14 PM
@Ven the syntax is ambiguous
 
@Prismatic It allows you to determine groups of primitives / objects which do not overlap or touch.
So you can basically write a BSP that sorts objects into its leaves and always stops when depth.material is the same for all objects in the current leaf node's progression.
Whether or not that's actually worth it is for you to figure out.
 
Ven
@Zoidberg what's ambiguous? not seeing it right now
@slaphappy sounds like great segfults
 
@ThePhD thus the 'bake it into the hardware' part
 
@Prismatic OIT is currently implemented as a linked-list of pixels for an individual pixel.
 
there are different OIT methods, that's one of them yeah
 
4:17 PM
Albeit, there's a paper somewhere that provides a new technique...
Wtf Domagoj hasn't been here in so long
 
Ah, okay.
 
@milleniumbug 100% sure he's not here anymore
@ThePhD he's on discord
 
I didn't really understand what you were getting at with the BSP
 
@Prismatic A Binary Space Partition allows you to separate objects that aren't overlapping or touching.
So you split up the objects into groups of "these objects are not touching each other". Then, once you figure that out, you then evaluate only the groups of objects that are overlapping / touching.
You sort those smaller sub-lists, to determine whether or not you need multiple draw calls or not.
IIRC, Binary Space Partitions and things of that nature are generally not super duper fast.
 
Ven
4:22 PM
Aw, I used di -f somewhere in some session of lldb, and now this session shows assembly as well :|
 
Xeo
@Griwes short buffer optimization vOv
and type erasure
 
It's a safety pessimization :/
 
Xeo
Type erasure is actually the big problem, I think
 
Yah.
 
Also libc++ passes that test with flying colors.
it's a move, which is a pointer move!
Ever allowing throwing moves was a mistake :/
 
4:27 PM
@ThePhD Aren't those quadtrees and friends?
 
Ven
type erasure <3
 
@Morwenn happy quadtrees friends
 
quadtree is an n-ary tree
 
@Morwenn Quadtrees is another kind of Space-Partitioning datastructure, yeah.
 
where n=4
 
4:28 PM
@slaphappy :D
 
Problem is, this isn't really an n=4 problem.
 
also ugh
 
He just wants "are you all in this group or not".
 
WTB regular void
:X
 
So that's more fitting for a BSP?
 
4:29 PM
Solarus' collision detection got several times faster when they replaced the old system by quadtrees.
 
Ven
@Griwes ENOTENOUGHLEGACY
 
i still dont get the bsp solution lol
 
Eh.
@Prismatic Just... you need something to split up the objects that you're sorting by visually.
 
I'm special-casing another function just because some dork decided that void is not a real type all those years ago :/
 
That's your problem, right?
"How do I get lists of objects that only overlap and have the same material, rather than sorting the entire list?"
 
Ven
4:31 PM
struct Unit {} unit;
 
Yes thank you.
That doesn't help when I actually have void there.
 
Ven
:P
#define void unit
^ that'd totally help :P
 
...
 
Ven
actually, true story, I found in some outdated "test-runner" a -Dprivate=public -Dprotected=public
 
With boost asio is it possible to keep a synchronous tcp connection alive (just with boost::asio::connect).
 
4:36 PM
Blergh why does Flask not work
@coincoin Maybe, read the docs, see SO
 
well already did...
I just get examples with asynchronous connections
 
@ThePhD I think I see what you're saying
 
Ven
error: use of non-static data member '_sessions' of 'CookieSessionStore' from nested type ''
u fokin w0t
 
@coincoin sure
 
@slaphappy my hero. trying to write a minimal example
 
4:41 PM
@coincoin you can use asio::read and asio::write for synchronous operations (it's per operation, not per connection)
@coincoin example of what? you can look at my ftp server on github but it's async
 
@slaphappy yeah I can use that easily no problem
@slaphappy the thing is I would like to keep a unique socket
and avoid the creation of it
a little bit like this code : coliru.stacked-crooked.com/a/2042c3d24a16c6ac
 
you want to accept only once?
 
well I don't use accept
 
@coincoin it's a client?
 
4:43 PM
yep just a http client for post/get method
(for the moment)
 
then, synchronous connect, read, write
also don't use asio for this, dummy
 
aha
The problem is I can do that without problem
 
there are excellent HTTP SDK for C++ there's no reason to use asio
 
the problem arises when I try to reuse the same socket
Yes I know I ve tried cpp netlib, cpr
I found them pretty nice
 
Ven
ew cppnetlib
 
4:46 PM
are you trying to reuse a socket object or to keep alive the connection?
 
yes
not the way to go ? ^
 
1 or 2
 
for the moment 1
 
O.o why
 
I don't get it
first time I use Asio
:x
 
4:49 PM
say you to this
tcp::resolver r(io_service);
tcp::resolver::query q("host", "service");
tcp::socket s(io_service);
boost::asio::connect(s, r.resolve(q));
 
yep actually I want to avoid to redo the boost::asio::connect(s, r.resolve(q));
everytime since I have thousands of post methods
 
why do you disconnect in the first place
 
well if it is done in a function and I call this function several times
i connect/disconnect right ?
 
yeah, and it's a pretty bad idea
 
@Prismatic ur pickin' up what im layin' down ye?
 
4:51 PM
yeah that's why I wanted to wrap up this
in a client class
where the above code is done only at construct time
seem like the fair thing to do right ?
 
yeah, that's fine
 
the problem is that
 
but then what's wrong?
 
I have a bug when using the _sock
I have private:
boost::asio::ip::tcp::socket _socket;
no problem I can do one post i get the good response
but when I reuse it
well I don't get the right response
 
connection closed?
 
4:52 PM
because of the _socket which seem to change
 
Are you copying the value of the socket?
 
well there won't be any disconnect till the class client is alive right ?
 
if the server closes the connection on you, then you need to use HTTP Keep-alive
 
client((
const std::string &ip,
boost::asio::io_service& io_service,
boost::asio::ip::tcp::resolver::iterator endpoint_iterator
)
: _ip(ip)
, _socket(io_service)
{
boost::asio::connect(_socket, endpoint_iterator);
boost::asio::socket_base::keep_alive option(true);
_socket.set_option(option);
}
oops... sorry
 
@coincoin HTTP
hence "Use a HTTP client"
 
4:54 PM
hum I ll take al ook :)
 
Wait
 
especially if you don't know how HTTP works :P
 
Don't HTTP clients close the socket
after every single request?
 
@ThePhD depends on Keep-alive
you can, or you can not do it
 
as you can see i use boost::asio::socket_base::keep_alive option(true);
not the same thing ?
 
4:55 PM
do you think socket_base supports HTTP headers
 
Oh.
I need to triple the tests I have.
.-.
 
@coincoin those are TCP heartbeats, not HTTP headers
 
@ThePhD nah still lost lol
 
arggg
 
@ThePhD Normally, yes. To avoid that you use WebSockets.
 
4:57 PM
do you have a nice c++ http client which can do that
^
 
@coincoin The server is not guaranteed to accept your keep-alive request though
 
That Valgrind trace is several times my height o__o
 
inb4 peanus
although that wouldn't be that long of a trace
 
@coincoin windows or linux
 
@slaphappy I ll check that then
linux
 
4:58 PM
Better?
 
@coincoin Google seems to turn up several.
 
@coincoin you need to observe events on your socket or your program will suck. it's p bad that you don't know why your sockets go down
 
@JerryCoffin I ve tried several it is always nice to know your favorite ones
 
Lol, I'm not copy-pasting this
Time to use macros.
 
@coincoin probably poco
but you're doing a HTTP client in C++ on linux which is a p bad idea anyway so I guess you're fucked
 
5:01 PM
@slaphappy ale po co
he he he
 
@coincoin It's against my beliefs to play favorites.
 
@slaphappy ok ty I will definetly use a http client
 
@набиячлэвэлиь har har har :D :D :D
 
I just wanted to try this keep alive thing to see if the performance we get can be better
 
did you measure :3
 
5:02 PM
well no since I couldnt do it ~~
not yet
 
Ughgugghgughgugh goddamn.
 
that's very bad
go to your room
 
@ThePhD matey
what is your problem
 
Nothing .-.
I'll figure it out.
 
5:08 PM
Yes! Everything compiled under GCC.
 
Doesn't link, but I think that's because I need to rebuild boost with a non-ancient GCC this time.
 
@slaphappy when can i go out
 
When shall I be free?
When shall I cease to be?
 
@coincoin when you understand that premature optimization yadda yadda
 
5:11 PM
aha
actually i've measured
i just couldnt measure with the keep alive thing... (thought it would be fast to do)
I lost an afternoon because of this
 
you have measured and you saw that reconnections to the server were expensive?
 
I use http 1.1
~~
I saw that the requests where taking long time and wanted to see if it could have been better without reconnections
 
Aaaaaah, uninitialized values all over the place ç___ç
 
you never measured, you liar
no dessert
:3
 
@slaphappy aha mais si je te jures
 
5:20 PM
@coincoin what do you mean you use?
 
c'est ça qui prenait le plus de temps
mais en fait c'est en partie du au traitement de la requête côté DB
je voulais juste tester rapidement ça
mais je me suis juste pris la tête
 
if you observe socket events properly you'll see why the socket is being mutated
it's hard to diagnose without all the details
 
@slaphappy Ill try that but if Poco can do that
maybe I should not bother
with Cpr couldn't find a way to do it
merci ;p
 
you're welcome
 
5:32 PM
@набиячлэвэлиь wow thanks nice :)
 
hey
@BartekBanachewicz
poland question
how do you say hi/bye to girls
 
figures that they'd release clang 3.8 on 8th of March. Clever :p
 
@slaphappy Dobrye den (or something)? o.O
More like "dzień dobry" apparently
 
user1804599
5:51 PM
Hi!
 
Ell
hi
 
@slaphappy "dzień dobry" (literally "good day", used where "good morning/good afternoon" is used) is formal, "cześć" (like "hi") is informal
there's also "siema" which is also informal, it's a shortening of "jak się masz?", which is in English "how are you"
"do widzenia" is used where "goodbye" is used (literally "see you later"), a bit formal
 
@sehe That's correct in most of Balkans
 
you can use "cześć" also for goodbyes
 

« first day (1972 days earlier)      last day (2990 days later) »