« first day (876 days earlier)      last day (4079 days later) » 

Xeo
3:01 PM
@TonyTheLion Generic programming, when you don't know the argument count, or get it as a tuple, or only want certain parts, or want to access all elements one after another at compile-time, etc.
 
ah right
 
Xeo
Indices trick is friggin powerful
 
you mean auto arr = make_array<int> {1, 2, 3};?
 
Xeo
No
build_indices<N>() and arr[Is]... shit.
@TonyTheLion A good example might be expanding an array into a function argument list.
 
Hi everybody
 
Ell
3:04 PM
man it sucks that renaming a class is difficult >.<
 
@Ell why o.O?
 
I'm trying to understand what while(true) means
 
because he'd like it to not suck?
<grin/>
 
Can anyone help me with that
 
Ell
Because I wish I could just go refactor->rename, but instead I have to search & replace & fix
 
3:05 PM
@Chucky neverending story loop
 
It means while true
 
@Chucky It means "indefinitely repeat" (well, until you leave the control block using break, goto or an exception throw-n, std::terminate OS specific ways to end a thread/ process etc.)
 
@Ell why fix? it's just search and replace
 
Don't rename classes duh
 
Ell
meh, it's failed me before so :P
 
3:07 PM
@DeadMG I think there is a "one" missing in the second line, second sentence here: codepuppy.co.uk/cpptuts/TMP/TypeTraits.aspx
 
@CatPlusPlus CCat
 
Xeo
Psst: VA X
 
@Xeo Visual Assist, decoding /cc @ell
 
Ell
@BartekBanachewicz simple search & replace has failed me before, I remember
 
3:07 PM
oh
 
fixed
 
now you reminded me, I should install VA
 
I don't know how you can trust automated global refactoring
 
I have a free copy, Intel courtesy
 
@Ell you mean, "I failed search & replace" ?! :)
 
Ell
3:08 PM
yeah xD
 
You don't. That's not saying you can't enlist help doing the grunt
@BartekBanachewicz jealous
 
@sehe come work here, duh. :)
 
@BartekBanachewicz offer me a job. Can I work from the netherlands :)
 
@sehe I bet there are Intel sites in the Netherlands :P
 
interesting ones?
 
3:10 PM
hm... that depends on your interests, I guess
 
can std::common_type find a base class between two Derived classes?
 
I don't actually know what all sites do :P
anyway, brb. I have to get food.
 
user1357851
 
user1357851
See how the iphone tabs on top have mono colored images, the Android ones at bottom have colors. They are actually using the same images.
 
@Telkitty I couldn't care less about android
 
3:14 PM
typedef typename std::common_type<decltype(std::declval<T>().CreateFunction("", std::declval<T>().CreateStatementGroup())), decltype(std::declval<T>().CreateUsingDefinition("", sema.CreateQualifiedName()))>::type;
love type traits and type deduction.
 
Ell
Hmm. What's the best way to get char* from std::string? I guess this has been asked before so Ima search Stack Overflow
 
str.data().
 
Ell
that gives const char* I think
unless I'm doing something wrong
which I probably am xD
 
Xeo
Nah, gives const char*
 
user142019
LoungeCraft anyone?
 
Xeo
3:16 PM
you want &str.front()
 
I'm gonna play some Fallout
 
Xeo
Or &str[0]
 
@Xeo C++11 has char*.
 
Ell
Oh maybe I'm not in c++11 mode xD
 
Xeo
@DeadMG Standad disagrees.
 
3:18 PM
but &str[0] is also common.
 
Xeo
c_str() and data() are synonyms.
 
@Xeo Oh. Maybe that was removed.
 
Xeo
std::vector::data() is non-const
(and std::array::data())
(For non-const containers, obviously.)
 
I've seen Boost Asio says Concurrency without threads but doesn't it use a threadpool inside it. I never really understood the Magic of "Concurrency without thread"
 
@DeadMG woah
 
Xeo
3:22 PM
@DiproSen Event waiting, basically.
 
@TonyTheLion What?
 
@Xeo But the waiting must be done in a different thread ? or it will freeze the processing thread. Isn't it ?
 
@DeadMG how do you come up with these incredilong statements?
my mind can't bend itself in such ways
 
Xeo
@DiproSen No, the waiting is normally done in the same thread - you can offload it to a different thread, though.
 
also CPS
 
3:24 PM
well, I need the common type of a function and a using, and the only way to get those types is to get the type of an expression which creates one, which is those functions on an instance of that type.
 
Xeo
What you usually do is add you first async commands, and then do io_service.run()
And those async commands add new ones
 
user142019
Minecraft y u crash.
 
2013-03-10 16:24:39 [INFO] [Minecraft] <elliotpotts> what stuff shouldn't I right click? besides levers?
2013-03-10 16:24:56 [INFO] [Minecraft] ubergeekkiller lost connection: disconnect.endOfStream
2013-03-10 16:24:56 [INFO] [STDOUT] Unloading Player: ubergeekkiller
2013-03-10 16:25:02 [INFO] [Minecraft] <elliotpotts> wuut how did we get diamond? xD
/say it didn't crash!
2013-03-10 16:25:38 [INFO] [Minecraft] [Server] it didn't crash!
2013-03-10 16:25:49 [INFO] [Minecraft] <elliotpotts> Ahhh all bow down to the almighty server!
 
user142019
The client crashed.
 
:) so I noticed
 
3:26 PM
so I have my driving practical test on Tuesday, hopefully I won't embarrass myself :|
 
user142019
@sehe Me too. :(
 
Ell
Ahh good luck :D
 
woot
 
I'm streaming but from the start because the earlier save crashes :v: if anyone's bored
Also no hardcore because it's annoying
 
@Ell thanks
 
user142019
3:27 PM
Maybe it lags because I use a 64x64 texture pack. :|
 
@Xeo What I've understood pushing async command is a sequential process. that is done in same thread but the those callbacks will be executed through a thread pool for the shake of concurrency. Am I right ?
 
@CatPlusPlus sounds like a medical conditioni
 
Xeo
@DiproSen No
 
@DiproSen asynchronous is not necessarily the same as just concurrency
 
Xeo
By default, Boost.Asio doesn't introduce any threads (as far as I'm aware, anyways).
 
3:28 PM
Ahaha what the hell
 
Also, yes, boost asio has 'strands' that allow you to specify which tasks get executed on the same 'logical' thread
 
@TonyTheLion Btw, the fixed version is
typedef typename std::common_type<decltype(std::declval<T>().CreateFunction("", std::declval<T>().CreateStatementGroup(), std::declval<T>().GetRange(nullptr))), decltype(std::declval<T>().CreateUsingDefinition("", std::declval<T>().CreateQualifiedName()))>::type type;
 
@Xeo Then ? If same thread executes the callback , wouldn't other things will freeze ?
 
and that's not even fully finished
 
Xeo
@sehe You can also assign io_services to threads
 
3:30 PM
@DiproSen i dunno. Preventing deadlocks is the designer/programmer's responsibility anyhow
@DeadMG I love it when that's not in my codebase.
 
user142019
How were those fans called we use as an elevator?
 
Xeo
@DiproSen On a single thread, only one thing can be executed at a time, so yes.
 
Ell
what were they called?
 
user784668
@DeadMG looks almost like false in Java.
 
Xeo
@Zoidberg Arcane Levitator?
 
user142019
3:31 PM
Yes, thanks.
 
lol
 
Xeo
@DeadMG Do everyone a favor and fucking typedef those types.
 
user142019
lol they can be used as furnace fuel
 
unfortunately, the compiler doesn't seem to be able to deduce the common type.
 
...
 
Xeo
3:32 PM
@DeadMG Unrelated types, maybe? :P
 
@Xeo This is the typedef.
 
@Xeo then how can it be asynchronous ?
 
@Xeo No.
 
Xeo
@DeadMG I meant for the subtypes involved there
 
I have Derived1* and Derived2*, and supposedly, the compiler should be able to come up with Base*.
 
Xeo
3:32 PM
That just looks horrible.
 
Derided3
 
eh, I could do, but that's the only use point.
 
Xeo
@DiproSen Asynchronicity doesn't imply concurrency.
 
ah whatever
I'll just go back to the previous typedef.
 
@DeadMG private or ambiguous bases?
 
3:33 PM
that one isn't properly generic anyway.
 
5 mins ago, by sehe
@DiproSen asynchronous is not necessarily the same as just concurrency
 
Xeo
And asynchronicity basically says that stuff can and will be executed out of order.
 
same thought ^
 
user142019
epoll ftw.
 
user142019
@Ell I'm going to play on my private server with a friend.
 
Ell
3:37 PM
okay :) I was only looking anyway
I don't know how to make any of this shiz xD
 
user142019
lol
 
@Xeo So asio must not be polling on some event, rather it should depend on asynchronous behaviors of underlying Io handlers,
 
Xeo
It polls on events whenever there is no asynchronous callback being executed.
 
user142019
for (;;) {
    auto event = poll_event();
    auto& callback = callbacks[event.file_descriptor]; // map<file_descriptor_t, callback_t>
    callback(event);
}
 
user142019
Roughly something like that.
 
3:44 PM
@Xeo again its getting difficult to me, Its not transparent to me, If one thread runs an infinite loop, then it will freeze that thread,
 
@Zoidberg is that asio?
 
user142019
@sehe that's an imaginary implementation.
 
ah. I love those
 
@sehe My imaginary friends love those too.
 
hmmm.
 
3:45 PM
@Zoidberg If that loop runs on main thread wouldn't it freeze all activity and behave synchronous ?
 
well this was a pointless exercise.
 
Xeo
@DiproSen Yes, and there's no problem with that, as you're executing asynchronous callbacks only anyways
 
I implemented using x = a.b.c;
 
user142019
@DiproSen that's not the point.
 
but of course, cpp() is not of that form.
 
user142019
3:45 PM
(Yes it does.)
 
so I can't actually using it.
 
user142019
The point is that you do all I/O on the same thread.
 
[Minecraft] <elliotpotts> hehe
[Minecraft] <ubergeekkiller> look
[Minecraft] <elliotpotts> oh dear >.<
[Minecraft] elliotpotts hit the ground too hard
[STDOUT] Sending serverside check to: elliotpotts
[Minecraft] <ubergeekkiller> noob
[Minecraft] <elliotpotts> how did we get all this cool stuff
[Minecraft] <elliotpotts> what are all these bottles o' shiz?
[Minecraft] <elliotpotts> Portable hole. That could be useful.
[Minecraft] <elliotpotts> woah. we be running a meth lab down here
[Minecraft] ubergeekkiller lost connection: disconnect.quitting
 
Xeo
@DiproSen Synchronous execution would mean things get executed in the order you assigned them, which will not be the case.
 
user142019
That's useful especially in server applications where you don't want to spawn a thread for every client since that will blow up your machine.
 
3:47 PM
@Xeo Oh! I see. It smells like asynchronous is not parallel. rather asynchronous is unordered . Is this definition correct ?
 
Xeo
@DeadMG You should maybe stop implementing special-cases only.
As we said before, async != parallel / concurrent
 
user142019
Asynchronous means that the order is indeterminate, if I'm correct.
 
@DiproSen Basically yes. Asynchronous says nothing about multithreading or anything like that.
 
@Xeo I forgot that that wasn't the general case.
also, I'm not implementing special cases.
 
Xeo
That's the definition of asynchronous - not synchronous, not synchronized.
 
user142019
3:48 PM
And with threads that happens to be true, but also in the case of epoll/kqueue/friends which Asio uses (if it's sane, at least).
 
The point of asynchrony is to deal with the fact that I/O tends to be slow as all hell.
 
user142019
I hope it doesn't use select lol.
 
@Zoidberg IIRC it doesn't.
 
user142019
Good.
 
Xeo
The beauty of Asio is that events for which you registered later are getting executed earlier if their data arives earlier than some previously registered callback. Which means you're always doing something.
 
3:49 PM
So My definition of async was totally wrong. I used to think async == parallel but its not. async == unordered execution
 
@Ell Portable hole? Are you stealing my stuff?
 
user142019
@DiproSen Yes.
 
Xeo
lawl
 
Ell
@LucDanton Hah not stealing, just looking :P
 
user142019
You don't know in what order things are going to happen.
 
Ell
3:50 PM
@LucDanton I also may or may not have tried on some of your underwear Goggles of Revealing
 
Xeo
They're happening in the order of their data arriving / being ready.
 
Those are easy to make. As long as someone gets to do some mining. Just sayin'!
 
Ell
I don't understand how you have 42 diamonds already.
And so much stone
 
Mining.
Do eet.
 
Ugh USB is a complicated-ass protocol. All I want is to implement an HID device.
 
Xeo
3:51 PM
Bling Machine. :3
 
Ell
you manually mined the 42 diamonds?
 
Yes. Fortune enchantment though.
 
Ell
also @CatPlusPlus obs was the software I used, not ffsplit :3
 
@Zoidberg Hmm ok. But the infinite loop for polling runs where ? it looks like it runs inside io_service but runs in same thread ?
 
I'm using Xsplit now
 
user142019
3:52 PM
@DiproSen I don't know anything about Asio, so don't ask me. :)
 
user142019
I have never used Asio, only epoll and libuv.
 
@DiproSen It runs in either the io_service::run() function or any of the functions it calls. io_service::run_once() is similar but returns after one "transaction".
 
Ell
Asio looks nice imho
 
hmmm
 
You can of course call io_service::run() in any thread.
 
3:54 PM
@Insilico So If I do some thing after io_service.run() It will never get executed unless the event loop inside finishes ?
 
@DiproSen Yes.
 
token- value: "using", type Return
 
Thanks, That what I needed to know
Its clear now
 
using std := cpp("<WideLibrary/lols.h>").std;
Main() {
    thing := std.string();
    thing2 := std.string("Hello, World!");
    thing = "Goodbye, World!";
    thing2 = thing;
    std.cout << thing2;
}
happier now @sehe?
 
user142019
> If fcontext_t is used in a multi threaded application, it can migrated between threads, but must not reference thread-local storage.
 
user142019
3:56 PM
I'm doomed. I need this.
 

« first day (876 days earlier)      last day (4079 days later) »