« first day (848 days earlier)      last day (4098 days later) » 

6:27 AM
Hm.
 
@Rapptz Ommmm...moni padme ommmmmmmm....
 
aha what.
 
Confuzed.
Blargha.
 
@Rapptz That's (at least vaguely similar to) the standard mantra chanted during buddhist meditation.
 
Now I need to define more types.
RowMajor ColumnMajor <--- I guess I'll just call it MatrixMajorness
It seems fitting at least.
 
user1357851
6:35 AM
There are 11 types of people in this Chatroom: vets, newbs & everyone in between.
 
@Telkitty ...and 10 kinds of people in the world: those who understand binary, and those who don't.
 
TIL: R and Matlab use Column-Major ordering for accessing memory.
 
@JerryCoffin On that scale, I'm the 4th type of person who understands it.
 
user1357851
@JerryCoffin true ^_^
 
Going from T* to void* would be termed erasure, I think.
So the trait that does that should just be called erase_type ?
or maybe erasure_trait
.... erased_type ?
Or just erased.
 
6:41 AM
terminated
 
OOH
remove_type
Clear, concise, and a verb. :D
 
Why not just use void* directly?
 
@R.MartinhoFernandes It's possible to have a T* or T** in there, so I'm just templating out the potential cases.
 
And T** should become what?
void*?
 
void**
 
6:43 AM
T** is not convertible to void**.
 
It isn't? o_O
 
Of course not.
 
... I might be doing something terrible undefined then...
 
Imagine it can.
T** tpp;
void** vpp = tpp;
U* up;
void* vup = up;
*vpp = vup;
So, it cannot.
 
... I'm confused. @__@
 
6:45 AM
@ThePhD After that last assignment, *tpp is a pointer to U.
(It's basically the same issue with T** to T const**)
 
*vpp is a void*, and it's assigning it to vup, ... which I guess can work?
Wait, no maybe it can't... I'm probably messing this up. D:
 
@ThePhD What cannot work is the second line, because it allows the rest to work.
*vpp and *tpp would be the same object.
And *vpp allows assigning a lot of things that cannot go in a T* (which is what *tpp actually is)
 
Oh. So it breaks everything.
Now I understand.
Technically it could be done, but there'd probably be horrible undefined behavior.
And explosions would happen.
So far I'm using it in my ubuquitous_ptr class to be able to convert a ptrptr from a std::unique_ptr into a void** for a COM call.
 
Is your ptrptr the one the puppy came up with?
 
Uh. Maybe? I don't know. I made the first iteration, MooingDuck improved it a shitload, and ever since I've been tweaking it until its at its current iteration.
 
6:53 AM
wasn't there a proposal for dumb_ptr?
and a bunch of other names?
I liked that :(
 
dumb_ptr?
What'd that be for? o_O;
 
@ThePhD Hmm, that might work fine. The safest way to do it is to make a version that to stores a void* instead of a T* and add the appropriate static_casts. (maybe just add a template parameter or something)
 
@JerryCoffin Yeah! That's it.
 
@Rapptz Why?
 
6:55 AM
@Rapptz Nope. Never happened. Really.
 
@R.MartinhoFernandes humour, it made me laugh
you know, "haha that's funny"
:(
 
its the alternative names to be honest, mostly because the timing of its existent was coincidental to the timing when ThePhD and DeadMG made their ptrptrptrptr etc
 
DeadMG's original design is a lot older.
 
I only store T*, though maybe storing a void* too would be less bad.
.. I just realized I don't use ptrptr in that example.
Herppppppppppppa derppaaa.
I need some sleep. ._.
 
7:03 AM
Oooh, I think I finally tracked down the big bug. It's in the C#.
 
But yeah, that's really what it's used for. Hopefully I'm not doing something evil by using reinterpret_cast to void* and void**
 
Well, I think I'm off to bed. Have a fine morning all.
 
@JerryCoffin Niight!
Don't let the bed wasps bite!
 
... o_O
What
what magic is this
... Fascinating.
 
7:17 AM
And I'm still not drunk
What is wrong with me?
 
have you been drinking?
 
@EtiennedeMartel Talk to Cat and drink Brandy together.
It's always better with a friend!
 
@ThePhD I don't like brandy.
I drink beer.
@JohanLarsson Yes. Still not enough.
 
Are you developing a tolerance?
 
Developing?
I already have one.
 
7:24 AM
That is not a good thing my friend
 
Maybe you are drunk enough to believe you are not drunk.
 
Drunkception.
 
@R.MartinhoFernandes No. I know when I'm drunk, and this is not it.
Actually, I'm tired.
So I'm gonna get some sleep.
Good night everybody.
 
nite'
 
TIL C++ has 15 containers. Whoops.. 16 now.
 
7:32 AM
what is a container? :D
 
it contains things.
 
like List<T> in C#?
 
map unordered_map set unordered_set vector deque queue
 
yes
 
Those are all the ones I can think of.
Oh and list
 
7:33 AM
well there are 16.
 
TIL I learned what a container is and it is stille really early
 
map/set, unordered map/set, multimap/multiset, unordered multimap/multiset, array, vector, list, queue, stack, deque, priority queue, forward list
17 if you count string.
 
std::stack & friends are usually referred to as 'container adapters'.
 
string doesn't count.
 
@LucDanton Ah.
 
7:35 AM
@LucDanton True, they just operate using vector deque etc. on the inside.
 
I've never used them.
 
I've used queue once.
 
You guys find use for linked list often?
 
And then I didn't bother because the exposed API is so flimsy I might as well just have a std::vector
@JohanLarsson Never.
 
not really
 
7:36 AM
At one point I did game objects with Linked Lists
Just because removal was easy.
Now, I do never-shrink lazy-deletion with a std::vector<size_t> to keep a list of indices that are free.
If I want to be fancy, I make it a sorted array instead of just a std::vector.
That way when I iterate over the list I only have to compare the iths element to see if its been lazy-deleted in the list.
 
Must... remember... to... register script functions... after I write the body.
 
I've been coding js for the first time this weekend, can't say I like it. Wtf at tool support and debugging. Hand coded a unit testing "framework".
 
Are we getting Concepts in C++14/17?
Seemed like a cool idea.
 
All I recall is that Stroustrup and one of his associates (students?) were working on that. I could see it for C++17 but not C++14.
We'd want some papers that we can try to implement before committing to anything.
 
Eh. All I really want is a decent module system.
 
7:55 AM
@JohanLarsson Rarely. I used one when I wrote a cache.
 
I want to be able to using namespace in my code and not open Hell's Gate.
 
@JohanLarsson one cosmetic reason for a linked list is that you can emplace_back uncopyable and unmoveable types into it, which looks cleaner than a vector of unique_ptrs if you don't need random access.
 
@bamboon ok, I also very rarely find use for linked lists.
 
OH GOD
MY CUBE IS GONE
WHAT HAVE I DONE ;~;
 
What.. a waste of money.
 
I will laugh if they actually succeed.
 
Did 73 persons give $580 on average?
 
Quuuick design question, guis.
@DeadMG Recommended I make my ShaderParameter class have an operator= for setting the value of a shader parameter. Should I also support going backwards?
modelshader->Parameters[ "View" ] = camera.GetView();
view = modelshader->Parameters[ "View" ];
^ Kinda like that.
 
Oh fuck. Sequences of starters may need to be composed :( FUCK YOU BENGALI
@ThePhD Is it easily doable?
 
8:33 AM
Uh. Well, not really, because operator= is currently templated.
Template arguments are inferred one way
 
Oh, it has type erasure?
 
the other way.... I don't think arguments can be inferred the other way.
 
Meh, I wouldn't do it.
 
WELP, okay.
I mean, it's no skin off my back. :D
 
They can just keep the original values around if they want them.
You could have a templated Get function and require giving the type.
Or return a proxy with a templated conversion operator, but that may end badly.
 
8:38 AM
I have both templated Get and Set functions.
the operator= just calls Set.
Also, uh.
How does one template-specialize an operator= ?
I'm failing miserably at the moment. x3
 
but you have a very nice rep number
 
OH, derp.
I was doing ti right, I just forgot to add the stuff to the headers.
Man, fuck headers. ._.
 
anyone checked out AMD Bolt? same C++ code can run GPU and CPU
 
Looks like fun.
Not really interested.
Damn.
I can't really implement the Getter using implicit conversions.
Because you can't pass template arguments to an implicit conversion operator. ;~;
I can write specific overloads for many PoD types, though
...Or I can just do Parameter.GetValue<matrix>() and save myself the headache.
 
implicit conversions are a pain anyway
 
8:52 AM
@ThePhD Make a proxy with template <typename T> operator T() const;. Return that proxy
 
That might work...
... Let's give it a shot!
 
Arrgh, who the fuck puts hebrew accents in latin letters.
 
Unicode? :3c
 
Zalgo?
 
@R.MartinhoFernandes You?
 
8:56 AM
@ThePhD My code is failing one of the official normalization tests: a lowercase A with a comma above right, a grave accent, and hebrew accent zinor, and an overline. Just crazy.
 
...
Who the fuck thought that that was a good idea.
... Who writes like that?
 
@ThePhD No one, but the tests are full of crazy corner cases.
 
>_>
<_<
 
I had issues with umlauts on colons for example.
 
( Just Skimp on it, nobody will notice. :D )
 
9:07 AM
Yay! I managed to get my SQL query to count votes on CW posts if they were cast before it went wiki.
This is the same one I made from way back. It's just that I'm a bit more familiar with SQL now.
 
Skeet and Mysticial, at the top.
 
Jon Skeet is impossible to beat.
 
How surprising.
Well, he owns every C# question.
Even the simple ones.
And C#/.NET have so many easy google-bait questions.
 
Like I would literally need to put an answer on the top of Reddit every single day for a year to beat Jon Skeet's 235% loss.
 
I onyl ever really started seeing DeadMG, Mysticial, Robot, Rapptz, Stacked-Crooked, and sbi / sehe answers when I was doing C++.
But C#? Jon Skeet here, Jon Skeet there, and an occasional leppie.
 
9:11 AM
@ThePhD Not even me. I've mostly disappeared from that.
 
Can you believe that at one point DeadMG's answers were really nice and weren't nearly as venemous as they are now?
Especially on gamedev.stackexchange
 
I've never seen Stacked-Crooked, Robot, or sehe post on C++ tag
 
He's got some really nice, polite, even friendly answers.
 
I've been posting mostly on Meta and Anime now. I haven't posted anything on SO in almost a month.
 
Well I see the Robot now and then.
but sehe only posts on boost::spirit now
and sbi hasn't posted an answer in a very very long time
maybe since September 2012
 
9:13 AM
In one he even invited someone to the Lounge<C++> chatroom.
 
WTF I don't understand this test.
 
@ThePhD but maybe he had the insta-bin ready?
 
@JohanLarsson Who knows. I didn't check the chatroom at that date, and I don't think I want to go back that far. Dx
 
2
A: Python - how to create a random string 8 bytes long?

Rapptzimport os rand_string = os.urandom(8) Would create a random string that is 8 characters long.

my first answer ^
:D
 
I don't speak python so can not vote
 
9:15 AM
I don't use Python as much anymore.
I didn't start browsing the C++ tag until later
 
My first answer is sad. =[
> What's up with those ugly semicolons? yuck!
Lol
Having too much C-based fun, are we? :3c
 
yes
 
sbi
@Zoidberg When @sehe wrote that, I was either out in Berlin with Tony or curled up in my bed reading, so if what you say is true, then it was accidental.
 
My first answer turned out to be useful. Registered the account just to post it.
@Rapptz why do you study medicine? You seem geek enough to go for a career in programming.
 
@ThePhD Well you only have 5.
@JohanLarsson Because when I was little I wanted to do a lot of things, i.e. polymath, so I tried to do that. Programming is easy enough (sorry) to be a hobby and as a second thing to pursue. I don't need a degree in programming to say I'm a good programmer, but I can't say the same thing for medicine.
 
9:20 AM
@Rapptz Soon, I will have 6!
... if I can get a decent C++ question to answer. D:
Also, zspace.com <--- Interesting shit
I get to meet some of their reps on Tuesday
When I have to go to that silly Unity Group meeting.
 
@ThePhD Site won't load.
> You attempted to reach zspace.com, but the server presented a certificate issued by an entity that is not trusted by your computer's operating system. This may mean that the server has generated its own security credentials, which Google Chrome cannot rely on for identity information, or an attacker may be trying to intercept your communications.
 
That's a shame.
Hm...
Maybe there's another way around it..
^ Go there, then head south to get to the zspace links
Maybe SO doesn't like it when I post links. =[
Mysticial has way better rep / post than Jon Skeet, though.
 
@sbi hey, I forgot to ask. Where are we meeting?
 
I was toying around with a query and I got something somewhat interesting...
It basically filters out all the really short answers.
 
Post length is rigged.
It includes code as well.
and a lot of code can be seen as a long post but is it really?
 
9:26 AM
I just updated the query to include the post owner.
 
Sometimes the meat of the post is the code provided.
 
And holy shit...
e-satis dominates...
He's got 3 long answers with over 1k up there.
 
e-statis and BalusC
 
263
A: What are extern variables in C?

Jonathan LefflerUsing extern is only of relevance when the program you're building consists of multiple source files linked together, where some of the variables defined, for example, in source file file1.c need to be referenced in other source files, such as file2.c. It is important to understand the differenc...

 
Lol, damnit.
 
9:28 AM
^^ damn...
 
I got stuck.
I can define a conversion operator on ShaderParameter, but I have to return the ShaderParameterValueProxy, not the actual type itself.
I wonder if it'll work regardless..
 
Data structure with at least O(ln N) on random access and at least O(ln N) on delete [NOT DUPLICATE] [duplicate]
lol
 
And here's the non-wiki version:
woah tchirst has two of them up there now.
 
is votes * post length really a measure of it?
 
@Rapptz It's just an idea I found in another query.
That one was only limited to your posts, so I forked it and made it global.
Of course it's not "real" measure since length can be gamed.
But at least it provides an alternate ranking that filters out all the short Google bait stuff.
And look what I discovered:
457
A: Regular expression pattern not matching anywhere in string

tchristOh Yes You Can Use Regexes to Parse HTML! ⁠ For the task you are attempting, regexes are perfectly fine! It is true that most people underestimate the difficulty of parsing HTML with regular expressions and therefore do so poorly. But this is not some fundamental flaw related to computationa...

457 votes would have been buried in the pure votes ranking.
 
9:37 AM
I.. um..
I have a confession.
I.. parse HTML with regex.
I know.. barbaric.. but..
I had to do it.
 
AHAHAHAHAHAHAHAHAHAHAHA
 
@Mysticial He's a famous author.
 
@R.MartinhoFernandes Yeah I know.
 
I would parse HTML with regex too.
I mean, why not?
 
Mawning
 
9:38 AM
My use case isn't stupid though.
 
It's mostly tag-based.
Might as well have a blast with regex.
 
I use regex to get <image and <td>key</td>
 
Kekekeke.
@TonyTheLion Moooorning.
 
Hi
How's things?
 
9:40 AM
@Rapptz That sounds like something trivial for a DOM library.
 
Some like to give themselves a hard time :P
 
@TonyTheLion Terrible, I lost my cube.
 
What cube?
 
The cube I was rendering in 3D.
I made a change and the bug that had been plaguing me for a week that I had fixed came back.
 
Oh I see
 
9:42 AM
@R.MartinhoFernandes There's more to it obviously.
 
@R.MartinhoFernandes Looks like I can't get enough implicit conversions going to go from a ShaderParameter to an arbitrary T . I might be doing something wrong though.
 
Last day in Berlin
 
@ThePhD You have a proxy for op=, right?
 
Right now I have an operator ShaderParameterValueProxy () on ShaderParameter, and that has an template <typename T> operator T () on it.
Oh no, this isn't for operator=. MyParameter = SomeValue works. I'm trying SomeValue = MyParameter, the reverse.
 
9:44 AM
@ThePhD No, no, no.
Just tack the templated thing on your existing proxy with op=.
 
What???
 
this thing is rigged
the highest scoring one is a Java question.
 
Lol
 
and the second and third and fourth
It isn't until #12 that I land on C++ :(
 
9:47 AM
I... I think I don't quite understand. ><
 
user1357851
I have been suspended for 3 mins ... why?
 
Cause you suck, obviously :P
 
Snap
 
user1357851
How so? I was here for like an hour, did nothing, then all of sudden suspended for 3 mins
 
user1357851
>_<
 
9:50 AM
While fucking around with the data explorer I found this, lol
 
Lol
He can review his own question.
And an edit about his own question.
Robot OP.
Damnit.
Perhaps it's just my Matrix class, but it won't work.
I wrote the templated operator T correctly on the existing proxy, but ADL can't resolve which function I want to call of all the operator= on the matrices.
This, however, makes it work as intended:
view = (Matrix)modelshader->Parameters[ "View" ];
Gotta have dat cast.
It's probably because I'm bad at writing operator= stuff.
I guess I could do without a few of these operators...
 

« first day (848 days earlier)      last day (4098 days later) »