« first day (1619 days earlier)      last day (3314 days later) » 

6:03 PM
lol yet someone else that doesn't understand pure virtual inheritance:
2
A: Destructor from class implementing interface not called when referencing as interface

ddriverThe problem as I mentioned in the comments is that you don't have a virtual destructor in the bottom of your polymorphic hierarchy, therefore you get undefined behavior when you delete IBase pointers. It works in your isolated example because auto in that case infers a Derived * type, so the app...

 
Xeo
Fuck.
The bottom bracket (?) on my bike seems to be broken
 
If you throw enough burnt matches at Jupiter it will ignite.
 
6:21 PM
hmm, I was under the impression that a pure virtual base didn't need a virtual destructor
 
user1804599
Wooohooo.
 
user1804599
I fixed six issues in one commit.
 
user1804599
And I deleted a lot of code!
 
@Mgetz You were mistaken (5.3.5/3).
@Mgetz lol yet someone else that doesn't understand pure virtual inheritance
 
Evening all.
 
6:28 PM
hey mates
 
Hope the marmelade has been fun.
 
anyone can guide me a bit on sockets ?
 
user1804599
@PLearner There you go: linux.die.net/man/7/socket
 
No man. Not basic. Struck on some send receive issues
Doing a C# server communicate with C++ app
 
user1804599
Alright, time to add threads.
 
6:34 PM
already did.. :D
but no such replies
 
user1804599
Very interesting.
 
First issue - at the point at which you spot <EON> the buffer may also contain some of the initial content of the file as well. Second issue - at the point at which you spot <EOF> you discard whatever else came in with that buffer - so at the very least, you might be missing the start and end of the file. But for more concrete help, at least try to tell us what issue(s) you have (re-read your question - there's nothing there that I can see that actually reads like a question) — Damien_The_Unbeliever 8 hours ago
0
Q: socket data receive handle

PLearnerWell its a common question I guess as I found many posts related to this but couldn't figure out the solution. I'm sending a set of data in sequence to a C# socket server application. Now my data is coming continuously from client end but I'm not able to breakup the data in particular format an...

 
@LightnessRacesinOrbit I remember reading somewhere that the paint and the glue used on the Hindenburg's envelope were highly flammable.
 
that's silly
it's also not Jupiter
 
I got about 15 minutes and 10 seconds to kill.. what to do?
 
user1804599
6:45 PM
src/vm.cpp:27:31: error: call to implicitly-deleted copy constructor of 'std::__1::atomic<long>'
            make<Subroutine>([callCount = std::atomic<long>(), &object, &body] (VM& vm, std::size_t, boost::intrusive_ptr<Value>*) mutable {
 
user1804599
y u no move
 
moving an atomic doesn't really make sense..
 
user1804599
Why not?
 
@райтфолд what would the effects of such call be?
 
user1804599
aaaaa std::function has a copy constructor what the fuuuuuck
 
user1804599
6:47 PM
Well then, std::shared_ptr<std::atomic<long>> it is.
 
it would be quite inconvenient if std::function wasn't copyable
 
user1804599
It should be a flag as a template argument.
 
user1804599
Whether you want it copyable or not.
 
@райтфолд why? it was introduced to act like a function-pointer on crack.. and function-pointers sure are copyable
 
user1804599
Because non-copyable functions make perfect sense?
 
6:49 PM
@райтфолд Functions are values.
 
not enough sense to have the default behavior of std::function being non-copyable
 
@райтфолд What about no?
 
user1804599
@FilipRoséen-refp Indeed. In fact, I never said it had to be the default behaviour.
 
@райтфолд if you don't want it to be copyable, than wrap it in something.. or use something else; I've never heard anyone claiming that they'd like std::function to provide the behavior you describe
should we also make it possible to conditionally disable copying of the standard containers?
 
user1804599
@FilipRoséen-refp You already can, by using non-copyable element types.
 
6:52 PM
(not taking into account that the supplied value_type T might yield such behavior)
@райтфолд ^ that.
 
user1804599
std::function uses type erasure so you'd have to signal that in another way.
 
user1804599
Such as with a flag.
 
nah
just make std::function share the instance if it's copied.
 
7:05 PM
fucking shit my laptop died
FUCK
GOD DAMN FUCKING LIFE
 
Wait, why do you care if an std::function is copied again?
 
uhhh... Idris - Can't unify Vect ( n + 1 ) b with Vect ( S n ) b ?
what am I missing?
do I need a proof that succ n == n + 1?
 
might be
 
user1804599
auto llvmU8PtrPtr = llvm::ConstantExpr::getIntToPtr(llvmI64Ptr, llvm::PointerType::getUnqual(llvm::Type::getInt8PtrTy(*ctx)));
 
user1804599
I hate lines that are long like this one.
 
7:07 PM
Welcome to C++.
 
I'm simply trying to concatenate two vectors with (++) :-/
I REALLY want a practical dependetly-typed language; is that so much to ask?
 
user1804599
Scala.
 
C++
 
C++ can't dependent types
 
user1804599
C++ lacks dependent types.
 
7:08 PM
@райтфолд scala can?
 
@Jefffrey C++ isn't dependently typed
 
user1804599
@ScarletAmaranth It has dependent types, but I don't exactly know how powerful they are compared to dependent types in other languages.
 
@райтфолд and are they "main-streamed" in the language as in NOT like templates in C++03? (or even templates now really)?
 
> In computer science and logic, a dependent type is a type that depends on a value.
Why isn't std::array a dependent type?
 
user1804599
My favourite example:
 
user1804599
7:10 PM
case class Currency(symbol: String) {
  case class Value(value: BigDecimal) {
    def +(other: Value) = Value(value + other.value)
  }
}

val (usd, eur) = (Currency("USD"), Currency("EUR"))
usd.Value(BigDecimal("1")) + usd.Value(BigDecimal("1")) // ok
eur.Value(BigDecimal("1")) + eur.Value(BigDecimal("1")) // ok
usd.Value(BigDecimal("1")) + eur.Value(BigDecimal("1")) // type error
 
user1804599
@Jefffrey Because it's not a type; it's a template.
 
@Jefffrey because you need to know the value at compile time
with dependent types, you can index a type over a value that's computed at runtime
@райтфолд uhhh - 2 space indents?
 
user1804599
That's what I do.
 
I find 2 space indents unreadable :(
 
@ScarletAmaranth That makes no sense. Why would you want that?
 
7:12 PM
@Jefffrey it does once you get used to dependent types
 
Also what does "index a type" mean?
 
user1804599
@Jefffrey Check this tutorial out: rise4fun.com/FStar/tutorial/guide
 
user1804599
It will explain it nicely.
 
you parameterize by types
you index over values
 
user1804599
You can encode in the type system, for example, that repeating a list n times results in a list with the length of the original times n.
 
7:13 PM
@Jefffrey is this another thread where you think std::array is a dependent type
uh
 
i want map : (a -> b) -> Vect n a -> Vect n b = these ns must be equal
 
have you, dunno, read the wiki page or something
 
user1804599
Just by specifying the type as val repeat: n:nat -> list m a -> list (n * m) a.
 
the point is you have proofs and invariants and you don't outline them all
 
that means that you need to invoke the Cons of Vect as many times for the input vector as for the result vector
 
7:14 PM
you work with a concept of a type that can change in different functions
the fact that it can work with runtime is mostly due to the fact the runtime values are processed by functions giving you different guarantees about the values
while still being of "base" type something, you can assess more and verify if the functions keep those
 
so, if users says that he wants to add 5 elements to list (by inputting 5), then you need to guarantee that you call a "correctly indexed" <whatever uses lists / vectors of various lenghts>
 
technically instead of dependent types you could write a type for every computation you do and manually prove the functions return correct things via wrapping and unwrapping
dependent types basically prove some things for you
 
it's really just natural deduction
 
also MY FUCKING LAPTOP DIED ITS A BIG THING ;/
 
or sequent calcul (gensens?) or what have you
 
user1804599
7:17 PM
coooooooooool this library supports lists of kinds
 
@ScarletAmaranth "sequent calcul (gensens?)" I have no idea what that means.
 
[* -> *]?
@JerryCoffin I can't recall the exact name of the logic calculus by I believe his name was Gensen
Gentzen!
@JerryCoffin Gentzen's Sequent Calculus; there :D
 
apparently it's covered by that international warranty something
I wonder if those fuckers are going to wipe my SSD just because
actually wouldn't mind that
guys
if I have hardware under international warranty
can i give it to anyone to repair?
it's a fucking thinkpad after all
 
user1804599
 
7:22 PM
@ScarletAmaranth Oh--okay. Maybe I'm just slow, but I didn't catch the idea that gensens was supposed to be a person's name.
 
user1804599
val f3 = factorial(3) probably takes ten hours to compile.
 
@райтфолд no need for dependent types there :P
 
user1804599
Indeed.
 
lol you can keep your HDD if you pay for it
what the fuck
those fuckers
I should have gotten the 5 year warranty
I think I can prolong it tho
 
user1804599
 
user1804599
7:25 PM
Lines 86 and 98 as well.
 
user1804599
csv is on line 32.
 
	//in case copy constructor copies to itself.
	if (&m == this){
		this->dimension = 1;
	}
	else{
		dimension = m.dimension;
	}
deal with it
The only reason why this doesn't give an error or even a warning is because "the default value in the register of said primitive is zero"
 
7:43 PM
lol "copies to itself"
 
@DonLarynx So you're trying to protect yourself against morons? It's not worth it, they'll do other bad things.
It's C++ after all.
 
@milleniumbug "So you're trying to protect yourself against morons?" jes
 
then stop programming in C++ because it's impossible
hell, it's impossible in any language really.
 
@Puppy but i like making morons lives easier.
 
their lives will be easier by learning to not write stupid code
not having it fail and produce stupid outputs silently
 
7:52 PM
@райтфолд mmm; I think I want to know Scala now - although it looks a bit noisy
 
@Puppy Well, that's where you (or someone else) writes a wiki for your code. Which is analogous to a math major using LaTeX. In that using LaTeX is a necessary but somewhat bothersome task.
 
Writes a what?
 
user1804599
@ScarletAmaranth class +[- +, + -](+ : +, - : -)
 
It's also known as documentation.
 
7:58 PM
people write stupid code despite docs available
 
@DonLarynx I tried that approach once ("teaching stuff to people by writing stuff about programming"), and then found the people that needed it most didn't read it anyway, so yeah.
 
user1804599
Fuckshit.
 
@milleniumbug However, my goal is to make people's lives easier - those who don't use C++, specifically - so that more users become interested in using C++. Although I will have to deal with my share of dullards, there is a small chance a user is actually NOT a dullard - a chance I'm willing to take.
 
user1804599
Can you have a C-style variadic lambda?
 
store.steampowered.com/app/274170 -- Yuck, this looks...interesting.
 
8:17 PM
Hi folks! Hope everyone's well :-D
What judgement about this teacher/student (Who's going wrong?):
0
Q: Different ways to access array's element

E_TonyAs well as I know, there are two ways to access array's element in C++: 1) Using square brackets array[i] 2) Using pointers *(array+i) My university's teacher forces me to use *(array+i) method, telling me that "it's more optimized". So, can you please explain, is there any real differen...

 
I want to see a good game from the Culture universe.
 
user1804599
aaaaaaaaaaaaaaaaa
 
user1804599
... in a lambda makes the lambda operator() a variadic template doesn't it?
 
user1804599
I get error: 'va_start' used in function with fixed args.
 
@райтфолд lol C-varargs
 
user1804599
8:29 PM
Apparently it's a clang bug.
 
user1804599
Well then, let's make it a not-lambda.
 
8:42 PM
 
user1804599
cannot initialize a variable of type 'void *(*)(void *, unsigned long long, void **)' with an rvalue of type 'void *(void *, std::uint64_t, void **)'
        auto functionPointer = reinterpret_cast<void*(void*, std::uint64_t, void**)>(engine->getPointerToFunction(llvmPointer));
 
user1804599
IT SAYS auto YOU MORON
4
 
user1804599
Oh wait.
 
you didn't cast it correctly.
 
user1804599
Must be a function pointer type, not a function type. :P
 
8:45 PM
indeed.
I wonder what the potential benefits are of concurrent analysis?
 
user1804599
Alright.
 
@райтфолд C-declarations are perfect for obfuscation.
 
and that's just the declaration.s
 
user1804599
LLVM y u no exceptions.
 
I hate (might be too strong of a word) that recruiters ask about an estimate regarding monthly pay, I feel like it's their obligation to give me their estimate instead of putting that on the one being interviewed for a position.. without further information about the other employees of the company, and their knowledge and background it's somewhat impossible to make an accurate estimate. Sure, I understand that they'd like to know how much you would want on your paycheck, but still..

Yeah, this is just a pointless rant.. just finished my (kind of) first interview (over skype)
@райтфолд from now on forward I'll think of you as the "diagnostic messenger"
 
user1804599
8:52 PM
> Interpreter has not been linked in.
 
user1804599
dude what the fuck do you need an interpreter for I'm on x86-64
 
the day compilers are smart enough to actually discuss the code in question I vote that we put such a compiler and @райтфолд in the same room
it would be hilarious
 
Fucking hell, why does Run's Text property has BindsTwoWayByDefault?
It's for read only text! You would never need a two way binding on that!
 
@FilipRoséen-refp That would be an idea. I propose a first feature to this: name calling after trying to compile std::vector<int*>*
 
But every single fucking time I bind a read only property to it, I have to make sure I don't forget to also specifiy one way binding or I get a crash.
 
user1804599
8:55 PM
Oh right, I have to include some header for this to work.
 
user1804599
Stupid shit.
 
@milleniumbug compiler diagnostics sure need more profanity; "you fucking imbecile twat, template argument deduction failed because you are an ignorant piece of shit; fuck off."
 
@FilipRoséen-refp Hell yes
 
user1804599
Fuck yeah.
 
user1804599
My VM now JIT-compiles hello world.
 
8:58 PM
"A b = A(); It constructs the object b in place, a temporary unnamed object on the right hand side, and then calls operator=() to perform the assignment from the right hand side to the left." Also nonsense. — Lightness Races in Orbit 17 secs ago
 
speaking of default-constructors, the Blackberry NDK documentation/lessons has obviously been written by someone who doesn't know C++. It is filled with T x();
 
Nothing wrong with T x();
#trollolol
It does give a good explanation though, I'll summarize if you let me. — Philip Stuyck 37 mins ago
I give you permission to summarize. (?) — Neil Kirk 35 mins ago
lolol
 
@LightnessRacesinOrbit there's nothing wrong with it, but it probably isn't what you intended (and in regards of the documentation I'm talking about, it is plain wrong)
 
yesterday I heard knocks at the door, I opened it, there were my 2 pet chickens in front of the door ... my girls are so elite!
2
 
@πάνταῥεῖ do you really have to ask?
 
9:04 PM
@sehe I wanted to have more input/attention ;-) ...
 
@chmod711telkitty so you hears chicks at the door
@πάνταῥεῖ /why/
 
@sehe Rep whoring, obviously ;-P ...
 
Is this a useful answer? stackoverflow.com/a/29201862/395461
 
> 2. Who cares if there are multiple answers with the same facts?
we all do
 
Oh boy.
 
9:07 PM
@Shannon I don't see the point in copying an answer.
If someone is interested in more answers they can see the Linked questions in the sidebar and find that answer.
 
Cool, thanks for weighing in. I'll delete the answer.
 
@Shannon I anything, you could ask for merging answers if really one is obviously the canonical and the best answer(s) is at another question
 
To reply to this:
How is this answer factually incorrect? — Shannon 17 mins ago
 
I found the other answer more useful as a c++ noob. The top answer that sbi wrote is a little harder to parse IMHO.
 
9:11 PM
I think sbi might be referring to overloading operator->, which the copied answer doesn't mention it.
 
I write about 130 WPM, and according to the test I just took online (10fastfingers.com) I made 676 keystrokes during the one minute test, that is equivalent to 11 keystrokes per second.. freakin' mind blowing
 
@Rapptz Little logic quiz: If something is !(factually_ correct && good) then either !factually correct` or !good is implied. Not necessarily both.
 
it doesn't feel that fast when you are actually typing things out
oh, that was a previous test result.. 707 keystrokes was the actual result, though it doesn't make much difference anyhow
speaking of nothing; where are all the interesting questions at?
 
@Rapptz Does the lack of operator overloading make the answer incorrect?
 
Yes.
 
9:13 PM
Yes.
 
You yourself defend copying the answer "this is the canonical version". Then make it worth the while.
 
what the.. my Xorg server just quit, and it has happend two times today with no apparent reason
damn it..
 
Anyhoops, you can always suggest useful edits to improve existing answers. Nothing is cast in stone.
@FilipRoséen-refp the purpose is to test your patience
 
@sehe I have no idea why though, it's freakin' annoying
the logs says nothing, just that everything exited successfully - but I do not know what triggered the shutdown
 
@Rapptz Thanks for taking a look.
 
9:15 PM
oh, damn.. it's dwm that segfaults
[10864.878973] dwm[372]: segfault at 7f6b19450ff0 ip 0000000000404bda sp 00007ffd001f7430 error 4 in dwm[400000+a000]
time to investigate
 
user1804599
I think I'll make the comment starter !!.
 
user1804599
Comments must draw attention.
 
@FilipRoséen-refp check disk space and permissions first
 
@Shannon No problem.
The original answer has comments talking about it too:
The list is not comprehensive, nor 100% correct. The scope operator can be used in more situations to qualify an entity, even when they are not static: void derived::f() { base::f(); } even combined with any of the other two: obj.base::f(), and the access operator can be used to access statics: struct test { static const int i = 1; }; test t; int j = t.i;... — David Rodríguez - dribeas Aug 10 '12 at 14:12
 
@sehe do you think that could make dwm segfault?
 
9:16 PM
I know. Software testing is vastly underrated
 
@LightnessRacesinOrbit it calls the copy constructor.
not the assignment operator.
 
@DonLarynx Yes, thank you, I am aware of the very basics of C++.
 
@LightnessRacesinOrbit Except it doesn't do anything.
 
@DonLarynx It declares a function. That is certainly not "nothing".
 
@LightnessRacesinOrbit Shocked.
 
9:18 PM
@LightnessRacesinOrbit Don took it as a pop-quiz. After all you posted it to the lounge.
 
I got 50% on the pop quiz, so far
 
Aim higher.
 
@LightnessRacesinOrbit That's way off, from what I've ever considered from you :-) ...
 
You can do it.
 
@DonLarynx I don't believe you.
 
9:20 PM
Time for symbolic math.
 
lol
 
@DonLarynx What does this make up actually?
 
I could probably take my expression template thing and then uglify it with pure virtual functions.
 
Any further responses to LRIO's messages
:22257225
(I have to stop that.)
 
user4330208
There's only one table element in my page. It has 24 tr elements inside it. when i do var table = document.getElementsByTagName( 'table'); and then var rows = table.childNodes; I only get "2" for rows.length. Why not "24" ?
 
user4330208
9:21 PM
riddle me that.
 
@carb0nshel1 because you're using a dynamically-typed language lol
 
@carb0nshel1 "riddle me that." Riddle!
 
user4330208
i knew this room would make fun of my lang. You can talk about me, my family, my friends, my religion, my political views, etc. but not my programming language.
 
@DonLarynx what
@carb0nshel1 what
 
@carb0nshel1 What's riddling in particular?
 
user4330208
9:23 PM
nm lol
 
user4330208
afk
 
Erm.
A JS question in this room?
 
@carb0nshel1 thead and tbody? You're not looking at rows; you're looking at the table's immediate children.
 
@carb0nshel1 xml or html?
@LightnessRacesinOrbit i was supposed to say that.
 
user4330208
@Lightness
 
user4330208
9:24 PM
I think you got it. thead and tbody
 
Simply looking at the DOM will reveal to you what is going on. Yet you haven't done that yet. Riddle me that...
 
user4330208
i forget all of my table rows are inside of an invisible tbody that browsers decide to randomly put in
 
@carb0nshel1 How's this c++ related?
 
Also don't you mean table[0].childNodes?
 
recompiled dwm with debugging enabled, now I just have to sit back and wait for it to crash again.. blargh
 
9:25 PM
Think about it. Your grandfather's children != your father's children
 
user4330208
its c++ related cause JS room wouldn't answer me :/
 
@carb0nshel1 It's hardly "random". It's a completely well-formed and well-specified correction for your randomly broken HTML.
 
user4330208
anyway, thank you!
 
@carb0nshel1 That logic is absurd.
Don't do it again.
@carb0nshel1 np ;p
 
user4330208
lol
 
user4330208
9:25 PM
afk.
 
@carb0nshel1 Look, no. Don't do that.
 
@LightnessRacesinOrbit I seem to have ignored it, until you discussed it again. Don't do that again.
 
as well as trying to figure it out without the debugging
I'm in for a night of fun..
 
@DonLarynx Ignored what? What the hell are you talking about
 
His logic
 
9:26 PM
lol people still say "afk" when they leave?
thought that ended in the 1870s
 
No, only when they're ignoring you
;)
 
@LightnessRacesinOrbit Sheldon does :) ...
 
@LightnessRacesinOrbit These days they just rage quit.
 
@carb0nshel1 lol
 
@EtiennedeMartel I hope so :-P ...
@carb0nshel1 lel
 
user4330208
9:31 PM
afk just means i'm coding in a different window.
 
user4330208
A true coder does not simply "afk"
 
user1804599
I am AWK.
 
@carb0nshel1 A true coder, eh?
Kids these days.
 
user4330208
you say that cause I use JS?
 
user4330208
I defend JS with my life. Its best language.
 
user4330208
9:37 PM
My opinion ofcourse, but I have my reasons.
 
Reminds me of when I thought PHP was good.
 
JS is awful.
 
user4330208
Its possible to create C++ in JS
 
@Rapptz How's your troll-o-meter going?
 
Good luck.
 
user4330208
9:40 PM
No, i always get accused of trolling, Thats just how I am I promise
 
@EtiennedeMartel Pretty good.
@carb0nshel1 Maybe that should lead to some introspection.
 
user4330208
I have the rep to prove it.
 
user1804599
Alright, tomorrow I will implement function definitions.
 
@carb0nshel1 "JS with my life. Its best language." Aww! That's giving me physical pain. But well, go on with your personal opinions.
@Rapptz ... and terrible and awkward as well!
 
user1804599
9:46 PM
AWK > JS
 
user1804599
I want a Perl-like language that compiles to JS code.
 
^ awk is a tons better!
 
@LightnessRacesinOrbit But what about JavaScript to LLVM?
 
@Rapptz Shudder! Why one should want to have such?
 
user1804599
9:49 PM
@Rapptz LLVM IR is Turing-complete, and Turing machines are powerful enough to interpret any JavaScript code, so you can compile any JavaScript code to LLVM IR.
 
@πάνταῥεῖ i lol'd
 
@DonLarynx That was purposed so ;-) ...
 
user1804599
I hope LLVM supports single-source phi instructions.
 
user1804599
It probably does.
 

« first day (1619 days earlier)      last day (3314 days later) »