« first day (1434 days earlier)      last day (3513 days later) » 

9:01 AM
it gives me confidence though ... knowing you can read 100 pages of engineering/maths related stuff & still get a credit/distinction average
it says something about your ability, not your knowledge
actual knowledge is what you get after years of work experience
 
a += b, c;   // Does this add b or c to a?
 
@chmod711telkitty Well, define knowledge; there's textbook knowledge and experience knowledge. They are different beasts.
 
@FredOverflow that does 'a+=b' then 'c', right?
oooh
 
I would think so...
 
it'd add 'c' I think...
 
Xeo
9:06 AM
@FredOverflow (a += b), c
 
University broadens your horizons and gives you means to do more stuff. The degree itself is not worth that much except in situations where not having the degree bars you from entering. What is valuable is the way/path to the degree. I do not have a degree but I have gone almost the whole way to one. (Do not ask why, sad story.) I find quite a lot of things I have learned (and already forgotten) valuable.
3
 
Xeo
comma has lowest precedence
 
@Xeo oooh, so I was right first time.
a+=(b,c) would ignore the b, right?
@VáclavZeman this is lost on most people kids here.
 
@rubenvb knowledge is knowledge, textbooks suppose to teach you what would be obtained through years of experience
 
@thecoshman Well, at least I have tried. :)
 
9:08 AM
@VáclavZeman we all have :P
@VáclavZeman also, why? SCNR
 
@chmod711telkitty How much experience would you need to devise, say Maxwell's equations? That's not something people come up with from scratch. That's textbook knowledge. How to handle the equations is taught in very basic terms, and then experience picks up on ways to deal with them. But you can't deal with some principle if you don't know what that is.
 
> (talking about masturbation) I tried the watermelon thing when I was a teen. It didn't work well but then I freaked out because i thought it was suspicious if an entire watermelon vanished from the kitchen in one day, with only me home alone. So i chopped off the section with the hole in it and put it in the fridge, with the goal of removing chunks over the next few days until the evidence was gone. We had it with dinner that night. The whole family plus my grandma.
I don't know what the "watermelon thing" is, but this is just hilarious.
 
lol, I'd guess something related to the apple pie thing.
 
@Xeo Okay, just making sure I get my facts right before I file a bug about this bug explanation:
 
@Jefffrey ... cut a hole in the 'skin'... and dip in.
 
9:10 AM
 
@thecoshman Too cold for my taste.
 
The correct explanation is:
q1_allocatedbspmem += Q1_MAX_MAP_EDGES;
sizeof(q1_dedge_t);
 
@Jefffrey you can warm it I am sure...
 
@FredOverflow You can also easily show that through Coliru.
 
I find it somewhat amusing to find a bug in a bug report :)
 
9:11 AM
@FredOverflow as I understand it, yes.
 
That would then make the watermelon sour
 
@rubenvb Sure, or I could just look it up :)
66
Q: How does the Comma Operator work

Joe SchneiderHow does the comma operator work in C++? For instance, if I do: a = b, c; Does a end up equaling b or c? (Yes, I know this is easy to test - just documenting on here for someone to find the answer quickly.) Update: This question has exposed a nuance when using the comma operator. Just to...

But I prefer chatting with you guys ;)
 
Argh.
Why the fuck can you not unpack in a list literal in Python.
 
@thecoshman Why I have not finished with a degree?
 
@FredOverflow but that would be less convincing to the people you are arguing against? Unless they are as academic as you are.
 
9:13 AM
@VáclavZeman you baited me alright!
what's a decent use case for the comma operator?
 
Xeo
Abuse.
Really, nothing else.
Well, for overloading anyways.
 
@thecoshman Well, I am not the smartest kid and I simply took too much time to go through all the courses that I basically spent 8 years to go through what was supposed to be 5 years worth of courses. About last two years I think I was kinda depressed by the lack of progress (and by not having any luck with girls) and I had some kind of burnout syndrome, I think.
@thecoshman In the end, I did not manage to get at least 15 credits in the last year and they simply kicked me out of the university. Though I was working a junior programming job last three years at the university as well.
 
Xeo
> Edits must be at least 6 characters.
Tch
 
@thecoshman deleting every single fucking use of it.
 
@thecoshman It is useful in macros and in for(;;).
 
Xeo
9:18 AM
Fuck you, somebody forgot 4 characters in a sentence (that are rather important), let me add them. :|
 
@PolymorphicPotato I like how in Scala you can simulate a,b,c with {a;b;c} :)
 
That reminds me of a guy who posted only a link to jsfiddle, and got an error that he must add code to the post itself, so he put the jsfiddle link in a code block.
 
@PolymorphicPotato lol, nice.
 
@FredOverflow And x * (y + z) with x * {y + z}!
 
9:20 AM
@PolymorphicPotato I can totally see that is something only a coder/programmer would do.
 
No, only an idiot.
A non-idiot would add actual code to the post.
 
@PolymorphicPotato Interesting, so no more need for parens in expressions!
 
And a true non-idiot would never add that restriction to the software in the first place.
@FredOverflow Except for argument lists. :P
 
An argument list is not an expression. (ALINAE)
 
It is part of an expression.
f(1, 2, 3) is an expression, and you need parentheses in said expression.
 
9:23 AM
right
 
f{1, 2, 3} doesn't work, I think.
 
@thecoshman stream << a, b, c;
 
> I drank my friend's sperm and lube mixture out of his fleshlight because I still don't know why like six days later.
Eww
 
0
Q: C++ pointer compared with integer compile error

Taylor SpencerMy professor asks that we use the while function in c++ for a code we are writing. I keep returning the same error, so I wrote a simple simple code to understand the while loop. Still stuck at this part. It obviously isn't the end of my program, I just gets stuck at the while function. Any ideas?...

response ();
while (response=='y')
return 0;
omfglol
 
Why does the guy fuck a flashlight?
 
9:27 AM
Can you remember who you were, before the world told you what you should be?
 
@FredOverflow List{1}.toSet{} does work. :)
 
oh wait
fleshlight
wat
 
@PolymorphicPotato Is that a Scala puzzler?
@LightnessRacesinOrbit No, but I remember that I always wanted to become a bus driver.
 
oh (nsfw i guess)
 
@FredOverflow Yup. It returns false.
 
9:29 AM
How come?
 
{1} is equivalent to 1, so List{1} is equivalent to List 1 which is equivalent to List(1), and List(1).toSet takes no argument lists, but Set.apply takes a single argument. {} is equivalent to (), so () is passed to Set.apply which returns false because () is not an element of Set(1).
 
fuck Scala, srsly :)
 
You can be a moron in any language, not just in Scala.
No sane person writes code like this. :P
 
Maybe Scala could be used for sanity checks in nuthouses?
 
Is Unit a subtype of Product?
 
9:31 AM
That's Irrenanstalt or Klapsmühle in German :)
 
abstract final class Unit extends AnyVal beh
 
@PolymorphicPotato I don't know what Product is.
 
Base class for product types.
Tuples extend it.
 
What else extends it?
 
I don't know.
 
9:32 AM
@VáclavZeman Where did you study?
 
I bet at least a dozen different types.
 
@R.MartinhoFernandes Past Me, you're such a dumbass. What would you do with your incredibly smart Present Me.
 
At least these do:
::, Call, CompositeThrowable, Cont, Deadline, DocBreak, DocCons, DocGroup, DocNest, DocNil, DocText, Done, End, Failure, Found, Include, Index, InsertionPoint, Left, LeftProjection, List, Nil, NoLo, None, Option, Product1, Product10, Product11, Product12, Product13, Product14, Product15, Product16, Product17, Product18, Product19, Product2, Product20, Product21, Product22, Product3, Product4, Product5, Product6, Product7, Product8, Product9, Remove, Reset, Right, RightProjection, ScalaReflectionException, ScanLeaf, ScanNode, Some, Start, StringContext, Success, Tuple1, Tu
 
is dynamic_cast test in C++ similar to instanceof test in java?
 
And I guessed "a dozen". Silly me :)
9
Q: Lost in the inheritance graph of Scala's collections

FredOverflowToday I wanted to learn about the supertypes of List: sealed abstract class List[+A] extends AbstractSeq[A] with LinearSeq[A] with Product with GenericTraversableTemplate[A, List] ...

 
9:33 AM
@Xarn CTU FEE
 
@chmod711telkitty It is similar to instanceof + downcast, yes.
 
@FredOverflow in my JDBC wrapper, Record extends Product.
 
@FredOverflow You could write networking drivers
 
Java
if (x instanceof Foo)
{
    Foo y = (Foo) x;
    // ...
}

C++
if (Foo* y = dynamic_cast<Foo*>(x))
{
    // ...
}
 
@R.MartinhoFernandes Did you fix it
 
9:35 AM
@R.MartinhoFernandes I'd love to meet past me. It genuinely makes me sad that I know I never will (alternate past mes do not count). I do still keep an eye out on street corners just in case a future me is observing from a distance, so I'd know that it'll happen one day.
 
@FredOverflow C++ ftw!
 
@FredOverflow Perfect example of C++ suckage, in a way
 
@VáclavZeman Could be worse, could've failed University of Economics. :-D
 
// Scala :D
x match {
    case y: Foo => ...
    case _ => ()
}
 
@LightnessRacesinOrbit In what way?
 
9:36 AM
@FredOverflow In another way, that we must explicitly do this stuff is better
 
@PolymorphicPotato Lovely. It even makes the implementation of equals look half-decent :)
 
@FredOverflow That pretty much everything you do is a "hack" and not expressed by the language per se but by co-opting constructs essentially used for something else
Woah I just realised I miss my C++ codebase at work
wtf
I suppose when you're a programmer and you haven't written a line of code in 4 weeks...
 
@LightnessRacesinOrbit So what is dynamic_cast supposed to be used for if not this?
 
Xeo
@R.MartinhoFernandes I take this to mean you solved your problem?
 
# Python:
if isinstance(x, Foo):
    ... # whaha no need to rename x! and even the ellipsis is valid syntax!
 
9:37 AM
this is my last working day off :(
@PolymorphicPotato Meh. Arguably ambiguous operand order when reading without prior knowledge.
 
@PolymorphicPotato What does ... do in Python?
 
the ellipsis is valid syntax? fuck off
 
>>> ...
Ellipsis
 
@LightnessRacesinOrbit In Scala, ??? is valid syntax ;)
 
>>> type(...)
<class 'ellipsis'>
 
9:39 AM
@LightnessRacesinOrbit I have established a private protocol for touching base with Future Me, and for validating Future Me as actual Future Me and not an impostor. The only thing I still haven't figured out how to account for is amnesia.
 
It's special syntax for some matrix libraries so you can do m[1, 2, ..., n] (sic) or something like that. Not completely sure.
 
@CatPlusPlus Working on it. Figured out what was the dumb thing I did.
It's simple and embarrassing.
No details.
 
> (sic) or something like that
awesome :)
 
In Perl, ... throws a not implemented exception.
 
That's what ??? does in Scala :)
 
9:41 AM
Prelude> let (...) = error "not implemented"
Prelude> let f x = (...)
Prelude> f 1
*** Exception: not implemented
I like the parentheses.
 
let f 1 = "grand prix"
 
104
Q: What does the Python Ellipsis object do?

Salim FadhleyWhile idly surfing the namespace I noticed an odd looking object called "Ellipsis", it does not seem to be or do anything special, but it's a globally available builtin. After a search I found that it is used in some obscure variant of the slicing syntax by Numpy and Scipy... but almost nothing...

 
It's hard to devise a protocol that is simple and obvious enough for which you can have some confidence that someone that thinks just like you but does not know the protocol will be able to recreate from scratch.
 
+1 - helpful answer. Also for multi*dementi*onal - freudian slip? :-) — LarsH Jan 6 '13 at 11:45
lol
 
A natural and invariant protocol that is unique to me and can be discovered by "simply" possessing my thought process.
 
9:44 AM
@R.MartinhoFernandes I went to Amnesia on Tuesday night, but I don't remember much of it
@R.MartinhoFernandes what language?
@R.MartinhoFernandes Spinning around 720º on your left leg seems good enough. Or it would have been, had I not just announced my private protocol to the world. Dammit.
 
@LightnessRacesinOrbit Why 720º?
 
@R.MartinhoFernandes Why not?
 
That's the important bit.
 
I think the odds of someone guessing that protocol are fairly slim.
Five sigma slim
 
The goal is not just getting something that is secret.
It's getting something that a copy of myself would get without previous agreement.
Previous agreement relies on shared memories, which you won't have if there's amnesia involved.
 
9:49 AM
Oh, you do want it to be recreateable
I don't see how that's logically possible. Your thought processes depend largely on experience. If you lose your experiences, arguably you're not you any more.
 
If you want to get a protocol nobody will ever understand, you should take inspiration from Mork
 
You'd have to set some threshold for "being you" and base your protocol on that threshold, but even then I don't think you'd find one that could not be guessed by a random, or simply randomly and accidentally recreated.
"Hey, future me looks different!"
 
There's also the argument that future you is never going to be equivalent to present you anyway, so....
 
oh hey, they're moving the HQ closer to my home, I can't complain about that one bit
 
9:51 AM
Fortunately I feel like a future me with abject amnesia is going to have bigger things to worry about than time travelling, so you could safely ignore that outcome. Then again, it might be a useful way to rediscover your old memories!
 
I can sleep even more
 
Who keeps everything on un-backed-up hard drives then carries them to Mexico with them?
Trying so hard not to comment on that [there]
 
@LightnessRacesinOrbit Well, the next step after having discovered such a thing would be to find a slightly more elaborate one that would allow me to find a hidden arbitrary message from Past Me.
 
@VáclavZeman yeah, after I did my placement year found it really hard to focus on doing good in the final year.
 
@R.MartinhoFernandes It still seems unlikely that you with amnesia would get to the point so early on that he even considers such a message could exist. You'd have to know yourself a lot better
In short, you're kinda wasting your time
 
9:55 AM
What annoys me is that even after having such arguably nonexistent protocols, the whole process still relies on Amnesiac Me deciding that Past Me must have figured it out and used it, so Amnesiac Me should dedicate time to figuring it out again.
 
Just make an Ancient-style remote-DNA-sensing coded message
Or, y'know, forget the "encryption" and look out for future you on street corners. Either he looks and walks like you, or he'll be the one who looks like you but is wandering about aimlessly asking arbitrary people whether they know his name.
 
@R.MartinhoFernandes o_0 what are you on about?
 
Thought experiments.
 
@thecoshman MSVC PTSD
 
Anyway, gotta fix that thing.
@CatPlusPlus :(
 

« first day (1434 days earlier)      last day (3513 days later) »