« first day (885 days earlier)      last day (4289 days later) » 

00:00
so sorry, mostly the hard parts are in C++
hello
@JerryCoffin nonsense, I'm a pessimist. Compiler telling me I missed a ; is totally par for the course.
@JerryCoffin "Hey duck you got a second?" "bah. What'd I break this time?"
Don't talk about ponies ponies are ruined forever by the internet
@DeadMG The reverse of what?
00:06
@R.MartinhoFernandes The reverse of you dumping your drama on me would be me dumping my drama on you.
WTF. Don't invite random people to a room without asking them about it.
oh
Why not?
00:07
@Dave it's against chat-etiquette
Because it's annoying.
ah. My bad
I have no idea who you are.
was just gonna say I like your site
I didn't ask you on a date, I invited you to a chat lol
@MooingDuck I probably should have included the other part: despite actually being optimists, most programmers also sound to most others like they're pessimists, and often even think they are (but they're wrong).
00:09
It feels a bit like getting unsolicited calls from random people.
@Dave But thank you :)
@JerryCoffin I totally disagree
@R.MartinhoFernandes I'm almost (but only almost) tempted to see how you react to such an invitation from somebody you (at least sort of) do know.
Hmmm. I think they picked a bad name. robrhinehart.com/?p=474
@MooingDuck That's certainly your prerogative.
would anyone familiar with std::async happen to be bored enough to want to critique an async-like class that you can control the number of threads of? I need some input
00:21
@JerryCoffin Did I mention I have trouble relating to strangers? :/
@Dave Show it.
(on gist or something, not pasted here, please)
@R.MartinhoFernandes ok just a minute
Cool, you don't replicate the broken behaviour of std::async.
ya, I could've implemented using async with launch deferred to get the same broken futures... but thought that would be, well broken
Though, have you considered packaged_task?
(no need to std::move here: gist.github.com/eevad/5192412#file-async-hpp-L63, unless MSVC)
MSVC, but even MSVC moves in that case - I'll fix it thanks
In concept do you think it's worthwhile? My main use case that inspired it are streaming tasks that are basically all fileio and want to happen asynchronously but sequentially
So I wanted basically std::async that only used 1 thread
00:32
@R.MartinhoFernandes AFAIK, the quirk with MSVC is that move constructors are never automatically generated.
@MooingDuck ya that's correct
and a major quirk at that. It's annoying as hell
@MooingDuck I thought VS10 did not do automatic moves on return.
@R.MartinhoFernandes oh, I wasn't aware of that bug. nevermind me then
10 and 11 both do, but this is on 11 with the compiler preview (needed variadic templates)
@MooingDuck I could be wrong, but I seem to recall people complaining about it.
00:34
@R.MartinhoFernandes for a heartbeat I was about to test with ideone >.<
wow that's useful.
Oh, wait, that only supports 2012.
But looks fine to me, except for reinventing packaged_task.
I've gotta let that sink in - I had an earlier version which used packaged_task
Xeo
Xeo
@R.MartinhoFernandes Do you know where the standard describes the transformations applied to function parameters (T[N] -> T*, R(Args...) -> R(*)(Args...))?
Xeo
Xeo
Dang
@Xeo I vaguely remember that...
Xeo
Xeo
I also can't find it :/
isn't it section four standard conversions?
why do you need that at 2AM
00:41
Yeah, play Super Hexagon instead
Xeo
Xeo
@MooingDuck Conversions deal with objects, not type transformations.
@R.MartinhoFernandes SO answer - I just woke up from a nap
@CatPlusPlus Later, maybe.
@Xeo 4.1 is lvalue to rvalue, 4.2 is array-to-pointer, 4.3 is function-to-pointer....
Xeo
Xeo
Btw, did you see the two lambda papers?
@MooingDuck That's still different.
Note how there are no "rvalue" or "lvalue" types.
@Xeo then... I have no idea what you're asking :( sorry.
@MooingDuck He's talking about void f(int[N]) being the same as void f(int*).
00:42
@R.MartinhoFernandes oooops
There are no conversions involved there.
§ 8.3.5/5 "After determining the type of each parameter, any parameter of type “array of T” or “function returning T” is adjusted to be “pointer to T” or “pointer to function returning T,” respectively."
Xeo
Xeo
Ah, cool, thanks
I was skimming through the standard searching "function parameter", which skipped that.
it was ~5th hit when searching for "(*)". Lucky guess :D
is there a way in Python to quickly replace a 1 or 0 character/string to boolalpha? :(
I should search SO. I can't be the only one wondering!
Can't find. :(
00:49
@Rapptz a search for "Python boolalpha" links to a C++ page. What's boolalpha?
$ python -q
>>> "foo 1 bar 0".replace('1', 'true').replace('0', 'false')
'foo true bar false'
>>>
@MooingDuck replacing 1 with "true" and 0 with "false"
@BartekBanachewicz @Xeo 88s on Hexagoner
Xeo
Xeo
@CatPlusPlus You crazy.
00:50
@R.MartinhoFernandes yeah, I thought there was something simpler like passing std::boolalpha in C++
@Rapptz right, that makes sense. :/ Wish I were smart.
After 15 tries on Hexagonest Hexagoner seems too slow
Xeo
Xeo
@CatPlusPlus As I said, the worst is switching from Hexagonest to the other two
I feel like I could Alt-Tab and chat in-between patterns
Xeo
Xeo
lol
00:52
I don't feel tired and yet I have to go to bed
dilemma
Bah I went in the wrong direction
88.59
if you have operator<< overloaded as a member, do you still need to pass the type as an arg to it of the class you're overloading it on?
@TonyTheLion if an operator is a member, the left side is inferred. But I'm told it also prevents being selected if the left side requires a conversion.
@R.MartinhoFernandes I used packaged_tasks in an earlier very different iteration, I'm not sure I can use them anymore to any benefit. Or at least I don't see it
00:57
Though for iostreams that's probably not a concern.
Well yeah it's not a concern because you can't use member operator<< for iostreams
@Dave A packaged_task is a type erased functor + a promise. Exactly what you have there.
I have never really seen it being overloaded as a member function, mostly it's friend
@TonyTheLion that's because it would have to be a member of the stream class, and usually one isn't writing the stream class.
01:01
@R.MartinhoFernandes But I would still have to type erase the packaged task to store them in a queue
well, computer's frozen, I guess I'll just go home
Yes, you have to store them in a queue, but they're type erased already.
Your unique_ptr<TaskInterface> is pretty much packaged_task<void()>.
Right except a packaged_task<void()> will only produce future<void> and I need future<otherthing> when appropriate
Xeo
Xeo
0
A: Why does std::result_of take an (unrelated) function type as a type argument?

XeoHaving a function-type as the parameter allows you to have an unrestricted "variadic" class template even in C++03. Think about it: In C++03, we didn't have variadic templates. And you can't "overload" a class template like you can with function templates - so how would it be otherwise possible t...

Robot: ^ Is what I was working on
I did kind of wrote a nearly-packaged_task thing though. I'm still trying to see how to use it as optimally
Xeo
Xeo
01:05
@Dave Then have a packaged_task<otherthing()>?
otherthing varies every call to operator()
Xeo
Xeo
What
oh sorry, it relates to: gist.github.com/eevad/5192412
Xeo
Xeo
Make it a std::queue<std::function<void()>>, then. The signature of operator() for packaged_task<onething()> and packaged_task<otherthing()> is both times void(), only the associated future type differs.
lolwut, @Cicada got banned?
01:12
???
Xeo
Xeo
Wat
3 hours ago, by sbi
@Drise Ah. Must have been bad, for this room to ban her.
idk, i just read this (its on the *board btw)
@Xeo I can store a packaged_task<onething()> in a function<void()>? I think I didn't follow
Xeo
Xeo
@Dave Yes
Since all packaged_task types return void when invoked.
Since you get their result from a future.
01:14
oh, right
stackoverflow.com/users/2167978/amber-roxanna <-- Suspected Cicada sockpuppet? Now I'm confused
user1357851
who banned Cicada? then maybe we could find out why
@Doorknob I don't think so.
that's what it said in the transcript
@Xeo Not exactly sure why, but it doesn't work on VS2012: rise4fun.com/Vcpp/hSG
01:20
Nobody banned Cicada
Bug?
Agggh
Fuck bone animations
I'll fix this shit later. ._.
Xeo
Xeo
@Dave I have to admit, I'm confused.
@Xeo doesn't work in gcc-4.7.2 either
Xeo
Xeo
libstdc++ and libc++ also don't compile, but for another reason - they copy the packaged_task somewhere in their internals. Wtf.
@R.MartinhoFernandes Halp
01:28
Oh, I remember this.
Yeah, std::function sucks.
Don't bother, they're all conformant.
Xeo
Xeo
Meh, MSVC fails for another reason though :P
I could still put a packaged_task in Task, instead of the function + promise, and have the same base class setup as now. Why can't std::function store it?
Xeo
Xeo
> Requires: F shall be CopyConstructible
Meh, suckers.
@LucDanton should've submitted a paper for unique_function.
I never followed why it couldn't just be moveable but needed to be copyable... I'm sure there's a reason
Xeo
Xeo
01:32
@LucDanton You're the reason why we can't have nice things in the stdlib. :P
No I am not.
That the SC accepts papers without the author needing to champion it is fairly recent, isn't it?
Xeo
Xeo
I think it was for the whole library Call for Papers this time that just somebody had to champion it, but I'm not entirely sure tbh.
So how could I prepare in time?
Actually what I'm currently doing would be slightly more optimal than a function of packaged_task or an allocated wrapper of packaged_task isn't it? packaged_task needs another allocation, for 2 total per task in my setup, where I currently have 1 and it's already optimally small I think
Xeo
Xeo
@LucDanton Like me, 1 day before the deadline. :D Also, 'twas a joke.
01:41
@Xeo So was it
02:08
@Xeo, on my std::result_of question, do you mind elaborating a bit on why the array one wasn't a problem in C++03? slightly confused
the cv-thing makes sense
Xeo
Xeo
@StephenLin There simply are no rvalue arrays in C++03 :)
The restriction was lifted in C++11
yes...but, I don't follow exactly still, sorry...i guess I can play around with it myself, but what if it were bool operator()(int (&arr)[3]); instead? I thought you could pass a regular reference to an array as well as a paramter
isn't it the same problem?
yeah, i tried it, seems to be the same problem
Xeo
Xeo
@StephenLin Ah, sure can, but the thing is, when you have result_of<F(int)>, int logically represents an rvalue - otherwise, you'd have int&, and then the transformation wouldn't apply anyways with int (&)[3] for example - as opposed to int[3].
It's a conceptual problem in C++03.
@AmberRoxanna You do know that he dropped out of school at the age of 14 to pursue his "musical career"? And speaking of that musical career, here are some of the highlights:
And also, when did we get teenage fangirls in here?
@Xeo, ah, ok, I guess I didn't realize result_of's semantics implicit assume rvalue arguments
Xeo
Xeo
02:19
@StephenLin Well, how else would you represent rvalues (which can bind to T const& but not T&) from lvalues in C++03?
The only sensible option is T vs T&, as far as I can see.
@DomagojPandža No Lil'wayne, a police siren is not an instrument.
@Xeo, ok that makes sense...it's not so much a problem in C++11 anyway because you can still explicitly get the result_of<X(int (&&)[3]>::type, but it does mean the behavior is inconsistent between arrays and scalar types
Xeo
Xeo
yep
And then again, there's the const issue too
02:23
yeah, no, i understand that
Xeo
Xeo
Btw, thinking about it, partial specialization would've worked for C++03 result_of
so if they were doing this again with real varadic support, there's no other reason you can think of it to do it?
Xeo
Xeo
result_of<F, _Nil>, result_of<F, A0, _Nil>, ...
yeah, just like tuple, but it would have been ugly
Xeo
Xeo
Nah, it wouldn't be much different than it is now, to be honest.
02:24
anyway, I feel like the real reason is because some boost developer thought it was cute and it ended up being standardized
you mean you think they still would have standardized it with the function-type syntax even without the prior precedent and with real varadic support? why?
Xeo
Xeo
Huh? I didn't say that, did I?
"Nah, it wouldn't be much different than it is now, to be honest."...probably misunderstood what that was about
Xeo
Xeo
2 mins ago, by Stephen Lin
yeah, just like tuple, but it would have been ugly
Was a reply to that
And with "now" I meant C++03, sorry
02:26
ok
so actually, there isn't much reason except that it looks cute
Xeo
Xeo
^ actual C++03 version
@StephenLin Yeah, it feels more like function invokation.
::shrug::, feels wrong to abuse types like that
oh well, whatever
Xeo
Xeo
There's still an advantage to the function-type version, btw
If you wrap other stuff around it, it doesn't have to do the same partial specialization hacks
It can just take a single Fty parameter, and pass that along
yeah, i saw that argument somewhere
i don't really buy it because i haven't seen a good use case for it
but i guess it makes sense
Xeo
Xeo
Still, result_of reporting wrong things sucks.
02:34
can anyone teach me the fundamentals of a hash map or a binary tree and its workings under the hood, or point me to a place where i can learn them? (I have an interview soon)
@DomagojPandža ok you win
@AgainstASicilian do you have questions beyond what wikipedia has?
the wiki kinda confuses me
@AgainstASicilian having a specific question would help
I just want streamlined explanations that don't require reading through huge gobs of unnecessary details
02:35
more specific?
i guess the images aren't loading for the first, though
Wow.
I think this is BY FAR my most favorite Compiler error to date.
graphicsdevice.inl(105): error C2446: '!=' : no conversion from 'ID3D11Buffer *' to 'ID3D11Buffer *'
Clap. Clap. Clap.
how did that happen?
I'm comparing 2 pointers of the same type.
@StephenLin Quick advice: ignore codeguru. It was once quite a good site, but the original developers sold it to people good as SEO, but not much else. Meanwhile, the original developers started CodeProject, which is now a much better site.
02:46
@ThePhD huh, what were you expecting
... FOr it to compare two pointers with !=.
@AgainstASicilian Hashmap: take a key. Treat it as a number. Use that as an array index. If the key's too big (usually will be) mix its bytes together into a smaller number (e.g., a really simple one is to just XOR all the bytes together to get a one-byte result).
@JerryCoffin never used it myself, was just googling for a digestible intro
@ThePhD Whoa holy shit.
You're using .inl files
Crazy, I know.
02:50
You really are crazy
You know what's even crazier?
The extension doesn't matter at all?
Binary tree: have a node like: struct node { struct node *left, *right; key_type key; }; The key contains the key for that node. The left pointer points to a tree of nodes with keys less than this one. The right points to nodes with keys greater than this one.
graphicsdevice.decl.h(22): err
@CatPlusPlus yeah but conventions!
02:51
@Rapptz Fuck the police~
Why split up code more than necessary?
user1357851
@JerryCoffin why the basic jerry :D
I'm not splitting it up more than is absolutely necessary, actually.
user1357851
and then you have red-black tree
Don't write red-black trees
You'll just fuck it up
user1357851
02:52
I wonder how often does the search engineer balance those trees
user1357851
@CatPlusPlus I know it is easy
user1357851
beside it is more often asked to search a tree than to construct a tree
@Telkitty ...and AVL trees and 2-3 trees and B-trees and binary B-trees and balanced binary B-trees, and ...
Using a single code path to both test events and build context sensitive help. Neat visualization of programmatic path complexity.
What is he going on about?
02:56
I wouldn't know.
user1357851
@JerryCoffin yeah you might be asked the basic of B-Trees or how to construct a balanced binary tree. But often then not, you have to write code to search a binary tree
user1357851
which I remember the easiest way by heart now
@ThePhD, so what's with "no conversion from 'ID3D11Buffer *' to 'ID3D11Buffer *'"?
@StephenLin Beats me. I just deleted all the code and rewrote it, after nuking all the processes.
Fixed my problem, so donnnnnn't care.
@AmberRoxanna Sorry for disappearing on ya. Those "curvy things" are called integrals. You'll learn all about them ;-)
03:00
@Code-Guru that is so @Cicada
@Code-Guru oh ok, yeah, they looked intimidating
@AmberRoxanna You're still here?
@Borgleader ack
@Code-Guru just came in
Um. quick question to anyone who's familair with COM
When IUnknown->Release() returns 0,
does that mean the object has been freed?
@AmberRoxanna ahh
03:01
Or is it only when it returns a number less than 0?
@AmberRoxanna changed your pic already I see
@ThePhD COM /shudder
... Hm.
This is deeply troubling.
I purposefully called Release() on a backbuffer pointer 5 times until the ref count went negative and overflowed to a positive 554353454545654656354645654654654
I've only ever read about it and it scares me...never had a reason to actually use it.
The object is not crashing D3D.
I am confused.
@Code-Guru lol
03:05
what sites might you guys recommend for learning about the inner workings of hash maps, hash tables, red/black trees, binary trees, suffix trees, AVL trees, linked lists etc
@ThePhD I think it's supposed to return the new ref count which means that if it is zero it should already be freed, but it's all convention anyway and the implementation might do something different
(all of this for interview). I know how to use pre-existing implementations if I need to but I don't know them cold/how to make them from scratch/how they work
Comforting.
@ThePhD every object implements its own ref counting and is responsible for doing a delete this on itself
So I've gathered.
Unfortunately, I just smashed something's ref count from 1, to 0, to something less than 0
And the object did not die. In fact, the backbuffer survived.
And I am watching myself render on it right now...
.... Hm.
WELP whatever out of my hands.
03:08
no idea, maybe there's some kind of internal reference count for internal consistency purposes
anyone familiar with git here?
sort of
How do I go about "cloning" my repo without creating a new repo? I want just the files without all the VC stuff so that I can package it for a release.
I mean I want a working directory without the .git subdir.
Copy all the files? :)
well...that might work...except I'll have to clean out all the generated files first...
and ignore the .git dir
776
Q: How to do a "git export" (like "svn export")

Greg HewgillI've been wondering whether there is a good "git export" solution that creates a copy of a tree without the .git repository directory. There are at least three methods I know of: git clone followed by removing the .git repository directory. git checkout-index alludes to this functionality but s...

03:16
So you can't just get the executable?
this might answer my Q...just had to find the right words for google
no, I want just the source
making an OSS release for my project.
0
Q: How are compilers different from one another?

Jake BymanThis may seem like a rather ignorant question, but it's been bothering me. I've been told that Java is "slower" than languages like C++, C, and C#, but I never really understood what that meant. I understand that it compiles slower, but how does that actually work? Shouldn't there theoretically b...

Vote to reopen?
no
shitty question
True.
03:24
well git archive master didn't quite do what I want...it spit out binary to stdout (the console)
@Telkitty You do have a good point -- they can't expect you to have memorized every possible thing, and they certainly can't expect you to re-invent (say) extensible hashing from the ground up (including an implementation) in an hour or even two.
I really should post SHA or MD5 hashes for my project's files...even better I need to figure out how to automate creating all that stuff.
@Rapptz Although he didn't ask it very well, the question itself isn't all that bad. Quite a few people have a poor understanding (at best) of what he's talking about, and although most probably don't need to know all that much, having at least a general idea would be a good thing for most people.
These types of questions are asked a lot though
03:27
@Code-Guru Assuming you have command line utilities to do it, you should be able to add it to your makefile pretty easily.
Can anyone direct me to some good resources?
@AgainstASicilian I'm particularly fond of a book named Algorithms + Data Structures = Programs, but it's unfortunately been out of print for a long time. I believe a successor to it is available online, but offhand I'm not sure where.
hey, how is everyone
@Rapptz If it were honestly an exact dupe, closing as such would make sense (but that's not what happened, and I'm not at all sure it really is a dupe either).
03:33
@JerryCoffin or to my Ant script...I'll probably do that eventually
or else I'll just make a bash script to do it
one more thing to add to my TODO list!
@Code-Guru Yet another task to occupy your copious free time!
zactly
of course, this particular task will save time in the long run...
user1357851
@JerryCoffin yeah, they sure should ask their candidate to write a working red-black tree in a 45 mins interview, code must be working properly. Whoever can do that will be considered for the role :p
thanks anyway guys
user1357851
Speaking of which, if you have amble experience, I think that is possible
03:40
@Telkitty R-B in 45 minutes? Might be possible with some luck, but I wouldn't count on most people being able to do it routinely. Then again, I've always had this semi-bad feeling about R-B -- always seemed like kind of a kludge to me (and AVL only marginally less so). If you want a balanced tree, something that's inherently balanced (e.g., B-tree) seems cleaner to me.
user1357851
@Code-Guru next time you should write a AI for a sexdroid who looks like a 16 britney spears (with 34DD breasts)
sounds like you have your own project to work on =p
@Telkitty wtf ?
user1357851
@AmberRoxanna yes?
03:47
@Telkitty that's just weird
@AmberRoxanna Telkitty quite often just begs to get plonked
@Doorknob ping
@Code-Guru lol
user1357851
@JerryCoffin I did a few 'hard' interviews. Once I was asked like 12 questions in 45mins. From recursion to multithread, to logic questions to b-trees to IQ questions to almost write code to solve a entire case
user1357851
good times
@Telkitty hope i never have that kind of interview
03:50
Was it worth it? Sometimes I wonder why interviewers put such emphasis on things that truthfully aren't part of the job.
user1357851
I actually passed that round of interview
I guess maybe it's different for CS, where they have to "weed" out more people than usual; however I don't think that this is the way to do it.
well, I guess creating MD5 hashes isn't as time consuming as I thought...
Now I need to go back and do that for my previously released files.
@Rapptz yeah, the best programming interviews I've had (on both sides) have always been open-ended discussions; I think the whole brainteaser and logic question thing is stupid
user1357851
@Rapptz it is a senior position with one of the biggest software/ecommerce company, they can ask whatever they want
03:54
Nice appeal to authority I guess
@StephenLin Yeah I can see that.
sure...
@Rapptz Filtering, mostly.
so if anyone knows somebody that collects baseball cards, tell them about my app!
See if you're the kind of person who likes to wander out of your comfort zone.
@EtiennedeMartel And if you fail due to restricted limits you're labeled an idiot and not considered?
03:57
@Rapptz You can never "win" in an interview.
It's all about damage control.
user1357851
@StephenLin I like brainteasers and logic questions
user1357851
they are fun - probably because I can almost always solve them (and they always give you hints)
lol, I just noticed my most recent starred message...that's freakin awesome
Xeo
Xeo
@EtiennedeMartel Ha, just yesterday, my bosses asked my if I would be willing to help with the client refactoring of another project. The client is written in ActionScript. Talk about outside the comfort zone...
But I think you can't hate a language without having delved into it once atleast. :>

« first day (885 days earlier)      last day (4289 days later) »