« first day (1819 days earlier)      last day (3122 days later) » 

1:00 PM
@AndyProwl That just sounds weird.
Also, I saw that in the GSL.
Also, eww, StaticBounds in the GSL.
I don't even know if that actually works.
 
Still, references can be owning, and in fact Clang uses them (ew)
 
@Jaden My brain has a dedicated processing unit for being a dick which doesn't require thought as input.
 
I mean, the implementation of Clang
 
@AndyProwl well... they are bound to the scope that created them... mostly... sort of
 
@Jaden The thought is that this suggestion is not exactly idiomatic in C++
@thecoshman they're just like pointers, except they can't be rebound and they can't be null (modulo UB)
 
1:02 PM
I've really got to stop thinking the computer can somehow know what window I am looking at and thus where to send input :(
 
@AndyProwl wait, you mean they have owning references to heap objects?
 
@Griwes yep
 
ewwwww
that's just ewwwwww
 
@BartekBanachewicz I cannot google
 
I'm a bit lazy to go and find the few instances I found back then when working with it but definitely they do
 
Xeo
1:03 PM
@Griwes Not really.
 
@AndyProwl but also the fact that you wouldn't expect to ever need anything to delete a reference
 
Xeo
Unreal has 'em too, as TSharedRef<T>
It just has a narrower contract than TSharedPtr<T> - it can't be null or rebound.
That's useful, if you ask me.
 
Hi, can anyone tell me how do I determine whether a number has a prime factor of form 4k+1 ?
 
WTB binding_ref.
 
efficiently
 
1:04 PM
@thecoshman it's just like a pointer for what concerns ownership
granted, you don't see that often, but you shouldn't even see owning pointers often
 
@AnukulSangwan Subtract one, check if its divisible by four.....?????
 
Xeo
@AndyProwl They're all over the place in Unreal's UI code :<
 
@AndyProwl You mean raw references, right?
 
@Griwes yeah, T&
 
@Xeo dynamically allocate ALL THE THINGS!
 
1:05 PM
@Xeo ah, TIL - never seen Unreal's code
 
Xeo
@thecoshman eh, it kinda makes sense
 
@Xeo kind of yeah :P
 
Unreal ;~;
 
> Error: the string "The second parameter must be the name of the function!" was thrown, throw an Error :)
lol
the smiley at the end
 
Unreal stahp unreal plz
 
Xeo
1:06 PM
since widgets can be transferred between parents, and those parents then own the child widget
 
@BartekBanachewicz jabbascript?
 
@Griwes like, functions take a T& to a dynamically allocated T and you as a client are not expected to delete that object. Whether they store a T& rather than a T* I'm not sure, but anyway it's still an owning reference when the function takes it
 
@Xeo well, moves exist now
 
@Griwes yes. Mocha.
 
@ThePhD Will all 'n' such that n-1 is divisible by 4 necessarily have a prime factor of the form 4k+1? e.g. 9
 
1:07 PM
@AnukulSangwan Why don't you use some math and find out!
 
@Griwes Unreal's codebase is basically an atrocity that has dragged on since before Y2K.
 
@BartekBanachewicz mmm
 
Xeo
@Griwes Yes. And so do non-owning references to child-widgets, which would break with that.
 
this is cruel Alex
 
and now I want a mocha.
 
1:08 PM
I like the mocha frappuccinos at starbucks
 
why
 
they have chocoflakes in them
 
@AndyProwl well yeah... fairly normal to take a T& for that...
 
@ThePhD ?
 
Now I want to leave and go get something to eat...
Also, I forgot how to do matrix multiplication.
Send help.
 
1:09 PM
user image
8
 
@jaggedSpire not me right now unless hot
 
Xeo
@AndyProwl It's not really owning, since you're not expected to delete it
 
@ElimGarak Niiice
 
it's cold here and my throat is acting up already
 
@AndyProwl what's the idea again? I'm cumfuzzed
 
1:09 PM
there was a coffee shop back home that made mochas with crushed ice and whipped cream and cocoa powder. I miss it so.
 
@Xeo the referenced object is dynamically allocated, so it will have to be deleted. Just not by the caller. That makes it an owning ref
 
"owning ref"
 
user1804599
In the Netherlands a coffeeshop is a place where you buy harddrugs, not coffee. :P
 
@Xeo well 'owning' basically means 'I am the thing that should delete this at some point'
 
what is even this vocabulary
 
Xeo
1:10 PM
@AndyProwl No. When something owns something else, that thing is responsible for cleanup.
 
@ThePhD the kind that makes you horrified.
 
@Xeo exactly
 
Xeo
It's no different from void f(T&); T* p = new T(); f(*p);
 
when the function receives a T&, it is responsible for the cleanup
 
I'm still only halfway through the Guidelines. :\
 
Xeo
1:10 PM
The parameter of f is not owning
 
@AndyProwl oh, you want to pass ownership?
 
@Xeo yes it is
 
@AndyProwl not necessarily
 
Xeo
@AndyProwl Eh. I thought it was not expected to be deleted?
 
I didn't bother to read the guidelines.
 
1:11 PM
@Xeo not by the client
 
Xeo
sorry, I don't get your point.
 
user1804599
@AndyProwl that's weird
 
which means f takes ownership
 
user1804599
that'd result in a dangling reference at the call site
 
@elyse it is
 
Xeo
1:11 PM
maybe I'm misunderstanding the scenario
 
@P45Imminent Ooops. Yes, removed the extraneous 0 boundary element. Thanks! — sehe 4 mins ago
LOL. All of us professionals missed the off-by-one I had there
 
@AndyProwl no, f(T&) does not mean f takes ownership
 
I think that Andy is just emphasizing his const nazi badge.
 
Xeo
Who is the client? The one that calls f, or f?
 
@ElimGarak tweet it
 
1:12 PM
the one who calls f
 
Xeo
ah, okay
 
@Morwenn a decent approach. Except for the owner stuff, and also the notnull stuff, it appears to mostly be common good practices so far
 
Xeo
now I understand your complaint
I thought you were talking about f being the client
 
@Xeo I don't :\
 
ah, no
 
Xeo
1:13 PM
so you're supposed to allocate something, and then pass that along (passing ownership over to f). And f takes it as a reference instead of something more appropriate.
 
caller of f() allocates the object but shall not deallocate it. f() takes a reference to that object and will have to delete it
 
stuff like "Use smart pointers when you can, preferring unique to shared." and "Use RAII"
 
I suppose it's done that way to express the fact that the argument cannot be null
 
Xeo
okay.
 
@AndyProwl so you want f() to be able to force the thing to be moved?
 
1:13 PM
@jaggedSpire Why would I need guidelines when my code is already perfect? :D
 
Xeo
That'd be a TSharedRef<T> in Unreal
 
@Morwenn :)
 
@thecoshman not sure what you mean. Just think of it as "a raw owning pointer cannot be null". They use a reference for that.
The only difference is f() will have to do delete &obj instead of delete pObj
(or transfer the ownership to another point in the code which will have to do the deletion)
 
@AndyProwl oh lord, delete &obj just looks wrong...
 
1:15 PM
Guys, if shit doesn't own shit, nekkid pointers. hides
 
@ElimGarak Wait. Why weren't you on my "followed" list. Anyways, amended
 
anyway it's not like I'm arguing you should do that, I'm just saying it exists out there
 
but yeah, I think there are better types for that
 
Ok, truth to be told, some parts of my code are ugly. Like that const member function that mutates one of its members even though it's not mutable.
 
@Xeo GSL also has something similar
raw_shared_owner<T&> I think
 
1:16 PM
@ElimGarak Should have been a reply to make sense on your timeline
 
@sehe Oh, right.
 
You can still fix it. The fanbois will re-retweet :)
 
@Morwenn ewww. Still, I'm sure your intentions were good.
 
@AndyProwl This looks... so wrong.
 
@sehe And also the @opera target :D
 
user1804599
1:18 PM
I'm going to found a startup in France called Agile Software so that my Java package names start with fr.agile
 
@ThePhD it's really the same thing as owning pointers, we're just not used to see it that way
 
@ElimGarak cool
 
user1804599
I can't wait till box patterns become stable in Rust.
 
@AndyProwl Wait. Is it like boost::reference_wrapper, then?
 
@jaggedSpire I already explained it here I guess: it's a class that initializes a reference member when itself when default-constructed so that copies always increment a counter in the original instance.
 
1:19 PM
Dynamic allocation, but presents itself as T& ?
 
@AndyProwl I think there's some media game involved in the little exaggerations there
 
we're just used to think & means "not owning". For me, after I got used to avoid owning raw pointers, seeing owning & is just as weird as seeing owning *
 
@elyse just do it vOv
 
user1804599
:p no
 
I'm going to found a startup in Croatia and call it Esult, so the package names will be hr.esult.*
 
1:20 PM
@sehe yeah, sounds likely
 
@ElimGarak that's gr8
 
@Morwenn ah, that does make sense. Might I ask why not the mutable?
 
@ElimGarak fanbois?! /cc @elyse @Griwes @whoelse possibly @AnalPhabet?
 
@sehe Yes, me
 
@jaggedSpire Because for some reason it works without having to mark the reference as mutable.
 
1:20 PM
@ThePhD don't know boost::reference_wrapper, isn't like std::reference_wrapper? If so, no, that's rebindable
 
Spread that shit on the internet, opera needs to know sehe means business!
 
user1804599
> boi
 
@AnalPhabet According to twitter you haven't moved your bettings
 
user1804599
who the fuck spells boy like that
 
@Morwenn vOv
 
1:21 PM
@ElimGarak rofl
 
@ElimGarak only if you link it here bb <3
 
user1804599
I boicott people who do that.
 
@elyse people who spell it boi
 
1:21 PM
@sehe "moved your bettings" as in "became anally phabetic"?
 
@jaggedSpire To be honest, I could add mutable in order to warn people who read the code.
 
@AndyProwl Oh sorry, boost::recursive_wrapper.
 
0
A: l-value specifies const object when using std::make_pair

thabIt looks like std::make_pair is trying to figure out what types to use in its template and is getting it wrong. Change it to: return std::make_pair<int, std::string>(count++, value); Functions like make_pair are quite tricky as they don't necessarily use the types that you expect...

dat answer
 
@ThePhD I don't know that one
 
1:22 PM
lol, this thing
 
user1804599
@sehe -1 to all of them.
 
@elyse babes, don't me such a grouch
 
@AndyProwl It takes a T and allocates it dynamically, but presents its interface as a regular T. It's meant to be used like a value, even though its dynamically allocated and the internals are T*.
 
TIL Joffrey is Soffia. I catch on quick.
 
Uggh cannot use refs inside lambdas
 
1:25 PM
Why not?
 
user1804599
I wanna become a recruiter.
 
C#?
 
user1804599
And do interviews Guantanamo Bay-style.
 
Allow me to refer you to Butthurt<AgonizingInstigator>.
 
user1804599
1:26 PM
bad code -> waterboard
 
I want to see Edward Snowden in prison, crying like a lil' bitch. <3
 
waterboard -> Grenade!
 
just compiled a project in MSVC. calls abort upon execution.
 
> >MSVC
> >compiled
yeahright
 
@edition Gratz
 
Xeo
1:29 PM
@CatPlusPlus tripping over that one is very annoying, yeah.
 
msvc is a cimploler at most
2
 
Let's hope reflection magic works in Mono 2.0
 
MSVC is like a friend who punches me in the face sometimes.
 
"friend"
 
> >MSVC
> >friend
 
1:30 PM
About as friendly as a bear trap.
 
Are we telling MSVC stories?
 
Xeo
@AndyProwl It's used in recursive variants (declared-only n stuff)
 
@edition A friend is someone who stabs you in the front.
 
MSVC certainly seems to think so
I still can't get over the silent non-generation of move constructors in 2013
 
... Huh
 
if you had a reflection matrix
and you multiplied it twice against itself
would that reflection matrix become identity...?
Let's try it it.
 
@sehe like this then
 
what is a reflection matrix
 
work time. Toodles everyone, see you in nineish hours.
 
a matrix which can examine itself ?
 
1:35 PM
@JohanLarsson not enough eggs
 
But it's really close.
I guess it doesn't count.
 
isn't identity matrix part of Direct2d?
it is.
 
I thought I had figured something fun out...
 
it lets you draw things using screen co-ordinates.
 
1:37 PM
for householder matrix you are supposed to have M² = I
 
I wanted to lel at PhD, but I'll rofl at edition instead. :D
 
@ElimGarak That Heliotrope looks amazing
 
@ElimGarak ;~;
Look, a reflection matrix is a reflection about a line!
 
Why do all the damn signs have visual feedback in the games
 
If you reflect something twice don't you end up with something close to what you had before?!
 
1:40 PM
@ElimGarak sorry, its 2:40AM.
 
@ThePhD if you have a householder matrix yes
 
@edition False
 
@AnalPhabet in my local timezone.
so !false
 
@Xeo oh, that thing. I somehow managed to forget about it
 
@ThePhD You mean, the solution to x x = I?
 
1:42 PM
in fact I've never really known what it does, I've always taken it as "magic" for recursive variant. Very professional
 
@R.MartinhoFernandes Assuming x was a reflection matrix, yes...
I guess I should solve that for
a b
b -a

And see what happens
I really hate spaces being "shortened" between words.
 
@ThePhD There's only one solution to that equation.
 
Stupid fucking chat room processors on LOTS of platforms do that.
 
> Yup. worked like charm. [...]
 
@R.MartinhoFernandes A and the inverse of A, yes... so I guess that's false, then.
 
1:44 PM
cool, thanks for not accepting
 
@ThePhD A * B = A iff B = I
 
Fuck you Markdown.
Also, fuck you Wolfram Alpha.
 
Ahaha.
I get it, though.
... Wonder what happens to that line, though.
 
No, I'm wrong.
In mathematics, an involutory matrix is a matrix that is its own inverse. That is, multiplication by matrix A is an involution if and only if A2 = I. Involutory matrices are all square roots of the identity matrix. This is simply a consequence of the fact that any nonsingular matrix multiplied by its inverse is the identity. == Examples == The 2 × 2 real matrix is involutory provided that One of the three classes of elementary matrix is involutory, namely the row-interchange elementary matrix. A special case of another class of elementary matrix, that which represents multiplication of a row...
 
That's...
... Huh, that's the definition of a reflection matrix.
 
1:47 PM
@R.MartinhoFernandes I like that name of that
 
The equation a2 + bc = 1, that is.
 
@ElimGarak or if A = 0 :P
 
like these matrices are sentient
 
It doesn't sound like "involuntary" at all.
 
Oh look! My ASCII 'result.txt' file contains '䐾㬱㠲㬲㘷†㈻†††††;⌀㬀″;〻㌱㬱㬀″吻䥒啂䕔†㬠″唻敳㑲'. Methinks I have a unicode issue:(
 
1:49 PM
@MartinJames Notepad?
 
@R.MartinhoFernandes Yeah, UTF16, I suspect. It'll just be a misdeclaration of a string type in my code, no biggie..
 
Bush hid the facts is a common name for a bug present in some Microsoft Windows applications, which causes a file of text encoded in ASCII or its superset (such as in a Windows code page) to be interpreted as if it were UTF-16LE, resulting in mojibake. When "Bush hid the facts" (without newline or quotes) is put in a new (pre-Vista) Notepad document and saved, closed, and reopened, the nonsensical words "畂桳栠摩琠敨映捡獴" (pinyin: Liù bèn rěn mó tiǎn tǒu yìng jiǎn měng) appear instead. While "Bush hid the facts" is the sentence most commonly presented on the Internet to induce the error, the bug can be...
 
@ThePhD a reflection matrix seems to be for you a householder matrix the fact that M²=I is not a definition it's a property
In linear algebra, a Householder transformation (also known as Householder reflection or elementary reflector) is a linear transformation that describes a reflection about a plane or hyperplane containing the origin. Householder transformations are widely used in numerical linear algebra, to perform QR decompositions and in the first step of the QR algorithm. The Householder transformation was introduced in 1958 by Alston Scott Householder. Its analogue over general inner product spaces is the Householder operator. == Definition and propertiesEdit == The reflection hyperplane can be defined by...
 
@R.MartinhoFernandes lol
 
@R.MartinhoFernandes lolwut
 
Xeo
1:54 PM
@AndyProwl It's really not all that magical
just the usual "you can have pointers to undefined types"
 
@Xeo I can imagine, it's just me being really not all that good :P
or rather, professional - I just kept using the thing "coz it workz"
 
Xeo
recursive_wrapper<T> is really just a std::unique_ptr<T>, 'cept it doesn't expose pointer-like stuff.
 
@Griwes Unicode-related bugs best bugs.
 
Xeo
or maybe more like a value_ptr<T>?
 
Wrote 4 variants for 4x4 matrix inversion on top of ARM NEON today (and hefty bits in asm). I am too tired to test them now.
 
1:56 PM
@Xeo I was about to ask that, but then I thought that value_ptr actually exposes its "pointership"
it just deep-copies
 
Xeo
yeah. It's an owning pointer of some shape without exposing the pointy bits directly
 
in fact I think recursive_wrapper looks like what a variable of virtual concept type will have to be
 
Xeo
eh, why?
 
because you don't know the size of the erased object, so you'll have to dynamically allocate it
Concept c = foo();
 
@AndyProwl Isn't it just a vtable?
 
1:58 PM
@R.MartinhoFernandes you probably know better but as I'm seeing it atm a variable of concept type is a vtable ptr + an object ptr
 
@R.MartinhoFernandes So ironic that notepad tries to do unreliable encoding guesses, but it doesn't bother with recognising LFs
 
user1804599
lol comments (warning: webdesigner didn't understand scrolling)
 

« first day (1819 days earlier)      last day (3122 days later) »