« first day (777 days earlier)      last day (4157 days later) » 

12:01 PM
nice bird
 
Ell
awww thats purrty
 
room topic changed to Lounge<C++>: The bear, the robot, and the lion tried to have a dick-size competition, but we couldn't find a strong enough microscope. [c++] [c++11] [c++-faq] [const]
 
purrty?
@DeadMG ermm.
 
it's true because I said so
 
Ell
12:02 PM
@TonyTheLion you know when like a little american girl says "pretty"
 
oh lol
 
@Ell I thought that was "pwetty"
 
Ell
there are variations
 
how are the genius programmers?
 
Ell
I'm good
...oh wait :(
 
12:03 PM
Who? Where?
 
right here
 
@TonyTheLion Someone page @Chimera and @ThePhD (? I might beconfusing him with telkitty, but, hey, no need to page him; one of these guys does do bird pictures a lot)
@AlbertoBonsanto By existing. Why?
 
headphones... check
 
do I look like I care?
 
music... check
 
12:04 PM
1
Q: C Minishell - Need to Kill Zombies for Pipeline Implementation

ScriptonautSo I'm building a minishell in C(for unix). I just figured out how to get pipelines to work, however I'm having a Zombie problem. Let's say I have: echo a | echo b | echo c This doesn't output anything, when it should be outputting "c". However, if I tell my shell to execute each sub-command, ...

 
I haven't seen telkitty in a while. Can't say I miss him.
 
the house is empty so I can sing really loudly... check
 
title ^^
 
time for le codes
 
@DeadMG I love doing that. Since I live alone, I can do it anytime.
 
12:04 PM
lol
 
@R.MartinhoFernandes I plonked him, so don't care
 
hmmm
 
@bamboon Ooh, sounds like a dupe of something I answered before. Lemme check and send some rep my way.
Ah, no.
 
lol
Y U DELETE?
 
I wonder
 
12:07 PM
I wonder too
 
hash_map : hash_set<pair<const K, V>>
 
Just peeking.
 
hahah
 
@DeadMG Needs a custom hash that ignores the value.
 
yeah
and a predicate too
but aside from that, I figure I can make that work
 
12:09 PM
Yeah, I think so too.
 
so yea, what happened to Daknok?
I haven't seen him here for a while...
 
Ell
Didn't he leave? o.O
 
no he came back, but I don't think he's been here for a while...
 
Ell
Hmm. Valid reasons for a factory?
 
Statefulness.
 
Ell
12:14 PM
My network thingy header is [ProtocolVersion, PacketType], and from there onwwards is determined by PacketType
 
Valid reasons to kill a mouse?
 
Ell
to eat it o.O
 
hmmm
you know, I could have actually backed this on unordered_map<size_t, ... with a hasher that just returns it's argument.
but then I wouldn't have the way better iterators
 
Ell
Do we have a rubber duck room? we totally should.
 
any room with the robot in it is a rubber duck room
 
12:18 PM
Yeah, my awesomeness just flows out.
 
Oozes
 
a priest, a rabbi and a horse walked into a bar... The rabbi asked the horse "Why the long face?" and the horse replied with a neigh.
 
bad joke
 
Terrible joke
 
@R.MartinhoFernandes I am playing Hearts right now. Best fucking game ever.
 
12:19 PM
it's supposed to be
 
well, that's a new joke to me
 
I'm on r/antijokes
 
@billz It's a neigh joke to me.
@CatPlusPlus Ok, I'll shut up.
 
is that where ' why the long face' is coming from?
 
@R.MartinhoFernandes dat pun
 
12:21 PM
That horrible pun.
Now he's replying to the future.
That's a violation of temporal invariants sir.
 
@AlbertoBonsanto Great, I already wrote "Hello World" today!
 
Skyrim's OST is nice.
 
Well done :)
 
man, my TV wants to install updates when I want to play Xbox
 
for a template, then each member function is only instantiated when used, right?
 
12:25 PM
damnit, everything needs updates these days
 
@DeadMG Yes.
 
I hate updates. I don't use Internet with my laptop, just so I don't have to bother with updates.
 
Updates are good.
 
Updates suck when you're in the middle of a presentation.
 
@FredOverflow so your laptop is just for coding?
 
12:26 PM
Just for presentations and live coding, yes-
 
My laptop is for stuffs.
Since I use it to "do stuff" I guess I can say my laptop is a manager.
 
so
time to see how much more useful this shiz can be
 
Restoring 700MB database dump is fun.
And I'm apparently dumb and all it's been doing was printing SQL statements.
 
@CatPlusPlus Do you have it on a CD-R? :)
 
Welp.
@FredOverflow No.
 
12:38 PM
hmmm
not having default-constructible iterators- safer, but irritating
            : it(win->OnPoll.insert(Wide::Utility::MakeUnique<std::function<void()>>([this] {
                    text->text = osbox->GetText();
              })).first)
 
@DeadMG This looks too much like C++.
 
Ell
12:56 PM
it is c++?
 
@Ell I think it's actually Wide, his own language in the making.
 
Ell
@FredOverflow although he does use Wide for all his c++ stuff IIRC
 
I think I'll invent a language called c++ with a lowercase c. That'll confuse the crap out of everyone.
 
@FredOverflow No, it's C++.
 
1:18 PM
Nov 6 at 0:01, by Ell
you might have unsuccessfully performed cunnillingus
@FredOverflow how about ç;;?
 
since I dont want to create a new question, I'll ask here:
is this a memory leak? http://pastebin.com/XH42iMvB
 
@user1860848 Don't want? Are you question banned?
 
Ell
@sehe heh
 
@Ell I thought that bore repeating
 
@sehe I asked because I tried using Deleaker but it doesn't recognize this memory leak.
 
1:22 PM
@user1860848 Also, why would it not be. As every doc/primer/tutorial will state clearly: new requires delete.
@user1860848 Oh, now we're onto something. Deleaker is a buggy piece of software, OR your compiler optimizes the whole allocation away. Try a debug build -O0
 
room topic changed to Lounge<C++>: READ CAREFULLY AND REPEATEDLY UNTIL YOU FINALLY GET IT: NOT. A. HELP. DESK. [c++] [c++11] [c++-faq] [const]
 
I know, sorry.
 

Help Desk

For Turbo C/C++ and Dev-C++ questions
 
Great, that dump is shitty. Who needs primary keys on tables.
Funniest thing is it was made by PROFESSIONAL DATABASE CONVERTING SOFTWARE that costs 80$
 
@user1860848 What's wrong with asking questions?
@sehe unless you pass the pointer on to a smart pointer
 
1:32 PM
@FredOverflow I knew someone wouldn't fail to point it out :)
 
I thought it was not worth opening a new question for this problem.
Anyway it was only a test.
 
@user1860848 Did we pass?
 
lol
 
damn
my head is le killing me
 
Ell
le paracetamol?
 
1:38 PM
stomach can't cope with it
 
Did you drink last night?
 
no
 
Well, then you might be dehydrated.
3
 
-1 did you somehow miss the OP's "I am not saying to do it but please tell me how to do it with recursion" (or for that matter the homework nature of the question) The downvote has nothing to do with actual correctness or not of the answer, only with the attempt to provide the OP with complete code for the homework problem. PLEASE DO NOT DO THAT!Cheers and hth. - Alf 2 mins ago
^ Today's downvote. Now I can do other things. Phew!
 
Ell
1:54 PM
how do I set the type of an enum to be std::uint32_t?
 
@Ell enum class e_bar : std::uint32_t {}
 
Ell
thankyou :D
can I get the size of an std::array<unsigned char, N> at compile time? I know I can do .size() at runtime
wait I haven't googled yet
ahh it's std::tuple_size
 
@Ell sizeof
 
Ell
is it? o.O
I swear you can't override the sizeof operator
 
2:12 PM
@StackedCrooked sizeof does not yield the same result as size().
 
@Ell it's N
 
I know.
 
size() is constexpr
 
size doesn't matter
 
lol
No need to by shy about the size of your array.
 
Ell
2:22 PM
is there a way I can infer the type of T in this? template<long unsigned int T> using byte_buffer = std::array<byte, T>;
 
What.
 
Ell
instead of doing long unsigned int T, I can just do auto T or whatever
 
First of all, size_t.
You can't do bigger array than size_t allows anyway.
And really, T?
 
Ell
yeah my bad with the T
 
2:23 PM
template<long unsigned int T> ? You can declaring T as a value instead of a type.
 
You're more terrible at naming things than a certain person here
@StackedCrooked What.
Stop drinking.
 
Ell
I assumed it was long unsigned int because when I just did class T by accident I got mismatch for argument 1 in template parameter list for 'template<long unsigned int T> ...
 
size_t
 
Ell
but okay, size_t
 
And no, you can't auto it. But good news is now it'd only save you 2 characters, so your hand won't fall off because of that
 
Xeo
2:26 PM
@StackedCrooked What.
 
what's wrong?
I just copied his code.
 
Xeo
Oh, it sounded like a question.
Nvm.
 
"You can declaring T as a value instead of a type."
 
Oh wait, "can" should be replaced with "are".
 
Ell
"You can declare T as a value instead of a type"
or
"You should declare T as a value instead of a type"
 
2:28 PM
Neither
 
"You are declaring T as a value instead of a type"
 
Ell
oh yeah :P
my bad >.< ahh it's not my day today
or any day for that matter o.O
 
In that case you can make it a template.
template<Day> my_day { static const bool value = false; };
my_day<Monday>::value; will be false
 
RPi analog sound quality is terrible.
And I don't have dog ears.
 
2:48 PM
wewf
 
Seriously, the thing is godawful. I need to try the HDMI.
But first I need an HDMI output device. Which requires monies.
 
I have a sad life
for watching this
 
Ell
it's a pretty circular circle though
 
tis yes
 
3:00 PM
dafuq
 
31,710 readers
 
Yes, WTF
ermmm
some people obviously have no life
or a bird fetish, perhaps
 
You can have a life and still enjoy looking at pictures of birds with arms.
 
Ell
I can't find the endian safe bit shift from char array thing in the transcript >.<
 
Ell
3:30 PM
wtf cmake has stopped re-builder after I modify the file, what is happeninng?
 
You never encountered a technical problem before? :P
 
Ell
but like literally it was working a second ago and now it's not :O
heh, boy am I a douche
I saved it to the wrong dir >.<
 
3:53 PM
There's a first. A self-deprecating remark doesn't get stars. Either there's no one here, or people think 'a douche' is too rude to go on the starboard
+1 for a working solution - trying to see if we could also make fun_call a my_rec somehow... — kfmfe04 11 hours ago
^ Someone got his idea of make fun...-whatever completely miscalibrated :)
 
Ell
I think I have alignment issues or UB or some shiz like that :o
 
@sehe Was afk
 
Ell
All I want to do is get a uint32_t from the first 4 bytes of std::array<unsigned char, 12>
ahh wait, I am testing by sending data with ruby, maybe that is screwing it up
 
@Ell are you assuring network-byteorder when sending and receiving data?
 
Ell
@bamboon No, but I'm sending from my machine to my machine, so endianness is guaranteed ot be the same?
 
4:03 PM
@Ell yes, that should work
 
Ell
4:18 PM
I'm definitely sending 00 00 00 03 00 00 00 02 00 00 00 01
but I'm getting 50331648, 3, 2
so the last two uint32's work, ujust not the first o.O
 
4:34 PM
@Ell the last one is clearly in the wrong byte order
 
Ell
oh yeah
I'm just gonna double check I'm getting that
ahh yay I fixed it
okay now, I sent 00 00 00 01 00 00 00 02 00 00 00 03, the did ntohl and got 1, 2, 3
 
aaah
good old shitty Unix function names
 
Ell
but I'm not sure if that's right? is 00 00 00 01 1 in big endian?
 
if you got out the same answer as you put in, then it's right.
and yes, 00000001 is 1 in BE
 
Ell
and network endianness is big endian, and my processor is little endian
buttt I'm using memcpy so I think it's UB xD
std::memcpy(&protocol_version, &header->data()[sizeof(uint32_t) * 0], sizeof(uint32_t));
 
4:50 PM
@TonyTheLion beautiful photograph! Nice bird.
 
You're doing it wrong.
 
Ell
I don't understand how shifts help the endianness issue :O
 
5:06 PM
&header->data()[sizeof(uint32_t) * 0]
 
you can put 0U there instead
 
Ell
it's just for consistency :L
 
It's the same as header->data()
 
Ell
I know, but I have 2 other lines with 1 and 2, so it lines up nicely :L
 
5:08 PM
Hm..
 
@Ell for?
 
Ell
well it's for 3 different variables
 
nah
 
Ell
std::memcpy(&protocol_version, &header->data()[sizeof(uint32_t) * 0], sizeof(uint32_t));
std::memcpy(&type, &header->data()[sizeof(uint32_t) * 1], sizeof(uint32_t));
std::memcpy(&length, &header->data()[sizeof(uint32_t) * 2], sizeof(uint32_t));
 
just use a struct
 
Ell
5:17 PM
and memcpy the whole thing into it?
 
yep
 
Ell
or I could use an array, then I could iterate to do network_to_host
or ntohl or whatever
 
Unless you're implementing existing protocol (and really, memcpy), use protobuf.
 
@Xeo Nicol added the tag.
 
memcpying whole struct is bad, too
 
Ell
5:20 PM
@CatPlusPlus why?
 
You can't deal with endianness for one. Overreliance on internal representation. You also have to remember to pack it, so nonstandard extensions.
 
Ell
pack it? o.O
I have dealt with endianness
 
@Ell Binary access (via char*) gives you access to the real data. Bit operations abstract away the endianness. Here is an illustration.
 
That cast is UB btw
 
Ell
thought so
 
5:25 PM
Oh, wait, uint8_t is char
 
@Ell Really. What type is protcol_version/type/length?
 
Ell
@CatPlusPlus uint32_t, but I do ntohl after
 
ntohl on what
 
Ell
on the values I get
 
5:26 PM
Also, it should be htonl for transport
 
@CatPlusPlus On everything!
 
Since you seem to be packing, not unpacking
 
Ell
I am receiving stuff
I don't know what packing is :O
 
What does std::memcpy(&protocol_version, &header->data()[sizeof(uint32_t) * 0], sizeof(uint32_t)); do
 
@Ell Preparing something for sending?
 
5:28 PM
Oh wait
 
Ell
its destination first
 
It has arguments backwards
 
Ell
yeah
 
libc is ridiculously shitty
Okay then, that works
You should use protobuf anyway.
 
Ell
I'm just looking at it now
For some reason I remember it being really sucky
that might have been boost.serialize though
 
5:29 PM
Heh, 1GB downloaded while I wasn't looking and I didn't even notice.
I love Steam.
Boost.Serialization's binary archives are not portable
 
I thought Boost had a protobuf library
 
Boost serialization is not forward compatible. A new client won't be able to talk to an old server. (Or vice versa...)
 
Ell
I wonder how google protobuf performs
 
@Ell It's designed for speed.
 
Ell
5:33 PM
@StackedCrooked so even for a game for example?
 
@StackedCrooked It is.
 
Ell
Actually, I see no reason for it not to be fast
 
Vice versa is backwards compatibility, and it can do that too.
Versioning is built-in.
It actually has decent architecture, but implementation is so-so.
Because a) C++ and templates and all horrible things related to that and b) those damn unportable archives.
 
The idea is that you can always read an old archive. However, in a network both parties need to be pack and unpack.
 
Ell
5:37 PM
now I need to plug asio and protobuf together :P
 
If you implement reading/writing with keys instead of relying on order of fields then it should be doable. Still more manual than protobuf
 
Another possibility to consider would be Sun's old XDR format that's used in ONC RPC. Quite a few libraries know how to produce/consume XDR.
 
user406009
Hmm, according to that benchmark, JSON isn't that bad either.
 
Expected delivery day for my amazon order is January 3. That's too long :(
 
hi there!
 
5:44 PM
@user9000 'lo there.
 
hey what's up?
 
@user9000 Hmm...just hanging out.
 
;P
 
@StackedCrooked hm
 
5:56 PM
My link offered a few interesting alternatives like: just chillin and just dizzlin.
And not least: Hanging my ass out the window.
 
FWIW, the No Shave November results. i.stack.imgur.com/vb1H5.jpg
 
That doesn't look like you..
 
It looks unshaven indeed.
 
Unless I remember you wrong
 
@Rapptz But it does (a little anyway).
 

« first day (777 days earlier)      last day (4157 days later) »