« first day (1600 days earlier)      last day (3347 days later) » 

12:00 PM
@thecoshman There's an example right there on the page.
 
Oh while in the blackout of my house I was pondering about strict aliasing.
That sounds much lamer than I thought it would.
Anyway it's a strict aliasing violation if I cast from type A to type B even if they have the same size and alignment right? Assuming they're "unrelated"?
 
lol
 
@LightnessRacesinOrbit lol "Would be more rewarding than fucking you"
 
user3010322
I...think I'm about to use slicing here. o_o
 
12:09 PM
@ThePhD Cucumbers or tomato?
 
user3010322
@MartinJames Kiwis!
 
@ThePhD You should stick to slicing Australians.
 
user3010322
dwdhadhwadwh
 
user3010322
I need variant now to do this properly. :(
 
hm
I'm no longer convinced.
 
user3010322
12:16 PM
... Or I couuuuld just use a uniion.~
 
user3010322
@Rapptz Of what?
 
read above
I'll keep reading I guess.
 
user3010322
@Rapptz If they're both standard layout types with the same member layout then I think it's okay (C++11 rules).
 
Yeah I see that clause but I'm not sure.
I'm actually dereferencing the pointer.
I think that's where the issue lies.
 
12:22 PM
tbh I'm wondering if reinterpret_cast<wchar_t*>(arr) is okay if arr is char16_t* and sizeof(wchar_t) == sizeof(char16_t) && alignof(wchar_t) == alignof(char16_t) (i.e. Windows).
I'm gonna go with a disappointing "No" though
 
IIRC reinterpret_cast is implementation defined anyways
Of course the char* trick exists portably, but yes, that's clearly not this
 
well reinterpret_cast isn't fully implementation defined, it still has some guarantees.
 
fuzziness detected.
 
they're enumerated on § 5.2.10.
§ 5.2.10/3 is the whole "implementation defined" bit while the rest is the guarantees on what is supposed to be a valid cast and (if available) their behaviour.
 
TBH I'd really avoid depending on any of this unless I could cite standard/implementation documentation on this. I'd have to really really need it badly before spending that effort
 
12:26 PM
I don't really feel comfortable using std::wstring to do dirty Windows work and then turn it back to std::u16string for sanity reasons on other platforms.
 
nice
dat lack of interpunction and capitalization though
 
Also I've reached a sort of sunk cost point where I'm trying to find out the answer anyway
 
I don't feel comfortable using wstring for anything (is there anything besides dirty that can be done with it?)
 
yeah std::wstring is essentially dirt work only lol
> The mapping function is implementation-defined. [ Note: It is intended to be unsurprising to those who know the addressing structure of the underlying machine. —end note ]
interesting note.
 
12:29 PM
/cc @Nooble
 
Flash deathtouch 2/2 for 2? At least make it 1/1, or 3CMC, so it isn't so absurdly OP.
 
mmm sunny outside!
 
Xeo
@Griwes nerd
 
AWWWW
it's like a small dog
 
@Xeo vOv
 
Xeo
12:34 PM
right
 
alright I can't find anything about it being illegal to dereference pointers other than void*.
my standard reading skills have deteriorated
 
@Rapptz really? I would have thought it would have been illegal to dereference const void* and function pointers
 
I'm missing something for sure
 
particularly function pointers, which the standard makes quite a big deal about UB concerning
 
Only thing I see w.r.t. function pointers is how difficult it is to cast between them
 
user3010322
12:38 PM
I think I'm doing something bad.
 
@ThePhD join then club
 
user3010322
It's impossible for iterators to handle lua iteration gracefully.
 
user3010322
Not without hard-copying out the values every time.
 
user3010322
Once you remove the things off the stack in the ++ operator, the things after that become invalid because they've been popped off the lua stack.
 
correct
 
user3010322
12:39 PM
... But!
 
user3010322
But maybe we can solve this.
 
@ThePhD why are you destroying the collection? Also I was able to write an iterator for GSList and GList
 
user3010322
@Mgetz The collection is being provided 1 value at a time through a dynamic language's C stack API.
 
@ThePhD ah, no fun then. Does lua itself not have iterators?
 
user3010322
@Mgetz It has a generating range, but C++ has no concept of that.
 
12:41 PM
@ThePhD as in for(auto i : [1 .. 10]) ?
 
user3010322
@Mgetz Yes.
 
user3010322
@Rapptz What if we have a type that on destruction does the popping?
 
user3010322
A temporary produced by dereferencing the iterator, perhaps?
 
see std::vector<bool>
 
user3010322
Then it's decided! We'll do it that way. :D
 
12:46 PM
Hm.
 
3.10/10 defines the strict aliasing rules on using the pointer
seems like a no go
 
@Mgetz americanexpress.com on the list of vulnerable sites. Impressive.
 
wut
 
@R.MartinhoFernandes I of course read that article after I paid my amex bill this morning
 
12:47 PM
people accept amex?
 
@Rapptz still curious what dirty work then. Do you use any libs that take std::wstrings?
@Rapptz I used to have one. 15 years ago
 
Costco doesn't accept American Express anymore and iirc they were one of their biggest acceptors.
 
@Rapptz most places here do
@Rapptz mine definitely does, they are still issuing them with executive memberships
 
Oh it's going to be completely removed in 2016.
 
@Rapptz I needed to get a visa anyway that wasn't my debit card
 
12:49 PM
SKIP-TLS is the best, I guess.
> In other words, the JSSE implementation of TLS has been providing virtually no security guarantee (no authentication, no integrity, no confidentiality) for the past several years.
 
@Rapptz I googled
 
@sehe WinAPI takes wchar_t*.
 
@Rapptz WinAPI is a relic and Microsoft is too lazy to change
 
12:53 PM
Ok, question: which parts of the WinAPI need to know about Unicode?
 
@R.MartinhoFernandes any part that deals with any sort of string
 
user3010322
@R.MartinhoFernandes ... Wat.
 
@Mgetz That's not true.
Strings can be just strings. They don't always need meaning attributed to them.
 
@R.MartinhoFernandes Well I'm using this but if you have an alternative that's cool too.
 
Unicode is for writing, not for strings.
 
user3010322
12:54 PM
The only time it maybe matters is when you're printing the display, to make sure it doesn't appear like garbage.
 
@R.MartinhoFernandes show me an example where it's not? Because the issue is that not all encodings are ASCII compatible
 
user3010322
Because the user isn't going to understand mojibake or random bytes on their computer, since that's not what they input.
 
user3010322
So essentially it only matters for FileExplorer \o/
 
@Mgetz I would have said file names, but then Windows uses those weird case-aware filesystems :S
 
user3010322
I thought UNIX was the case-aware system?
 
12:56 PM
No. No such thing as casing in Linux. It's just bytes.
Bytes don't have casing.
 
Xeo
Windows is case-aware, but case-ignoring.
 
user3010322
(So it orthogonally doesn't flatten case, yay)
 
Fancy way of putting it
 
@Rapptz yeah. well, with ANSI and !MBCS I suppose. Anyhoops, doesn't really necessitate anything to do with wstring, AFAICS
> Nah anyone can swim with a polar bear. It's the staying alive bit that's not so easy
 
Case-tolerant (Windows) vs case-ignorant (Linux)
 
12:58 PM
@sehe If you are inside a polar bear that is swimming, maybe that counts?
 
@Mgetz In general, at the level of syscalls strings are likely to be opaque blobs. No Unicode needs to be involved there.
 
@MartinJames I would certainly count that
 
user3010322
Wait a moment.
 
@R.MartinhoFernandes I'm trying to think of counter examples, but most of them involved MBCS doing weird shit
 
user3010322
If Linux just does bytes,
 
12:59 PM
NTFS does the same. It's the OS layer that interprets the case
 
user3010322
what happens to a string of normalized umalaut over O and a case of umalaut followed by O?
 
Exactly what you think. They're different
 
Xeo
*Umlaut
 
user3010322
So I'd get two different files?
 
NTFS is, again, no different
 
Xeo
1:00 PM
only one 'a' in there
 
Umläute
 
@ThePhD They're different in NTFS too.
 
user3010322
Hm. But most OS layers in linux don't normalize the string first?
 
Filenames are strings.
Not text.
 
Anyhoops. ZFS is (again) the only FS I know that has builtin support for case folding and UTF8 canonicalization (in mixed mode too - so case aware)
 
1:01 PM
A string is a sequence.
 
@ThePhD Indeed
 
user3010322
But the Windows OS always normalizes the string before it ships it to NTFS?
 
Possible. I'd not be surprised
 
user3010322
Now I wanna test this through File Explorer and WinRAR's file manager, to see what happens.
 
user3010322
1:02 PM
Just need to have verified non-normalized and normalized text...
 
Oct 26 '12 at 13:59, by R. Martinho Fernandes
NTFS filenames are null-terminated strings of 16-bit "bytes".
 
> Shut up you pathetic specimen of a homosapion! That shit ain't the logical way of life
 
user3010322
Yeeaah, but does the OS dooo anything with it before it hands it off to NTFS is the question!
 
I guess I'll use std::wstring and then just turn it into std::u16string. :(
 
@ThePhD No. For the I don't know how manyth time.
Why the fuck would it?
 
user3010322
1:04 PM
@R.MartinhoFernandes Well, see. From a user perspective that's a bit misleading, don't you think?
 
Jul 25 '13 at 21:43, by sehe
@ThePhD But! Is there vodka on the dark side of the moon?
 
user3010322
I don't know if I'd call that a feature or if I'd just make it so my application at the highest levels always normalized text gotten from the user.
 
OSes should stick to helping programs communicate with hardware.
Let the users for the programs.
 
@ThePhD Ideally you'd think about all your text domain values. And treat user-assigned filenames / document titles in that same way
@R.MartinhoFernandes I actually love ZFS'es modes here blogs.oracle.com/nico/entry/…
I don't necessarily agree with the message of that article. It's just relevant to the topic
> Examples of protocols/specifications using n-a: stringprep, IMAP/LDAP/XMPP/... via SASL via SASLprepnameprep/IDNA (internationalized domainnames), Net Unicode, e-mail headers, and many others
Insightful:
> NOTE to Linus Torvalds (and various Linux developers) w.r.t this old post on the git list: ZFS does not alter filenames on CREATE nor READDIR operations, ever [UPDATE: Apparently the port of ZFS to MacOS X used to normalize on CREATE to match HFS+ behavior]. ZFS supports case- and normalization-insenstive LOOKUPs -- that's all (compare to HFS+, which normalizes to NFD on CREATE).
 
user3010322
HFS+ normalized?
 
user3010322
1:13 PM
Kinky.
 
user3010322
@Rapptz Does GCC 4.8.1 C++11 mode support inheriting constructors?
 
user3010322
Also, anyone who uses g++ in their software stack and notices no breaking changes when they update their g++ but still refuse to update to a higher level of g++ deserves to burn in a fire.
 
@ThePhD yes, AFAIR
 
user3010322
WOO, MAX LAZY MODE.
 
> notices no breaking changes
haha. Also, most often the reason is ripple effect. Of course it's not about the cost of updating a single dev environment
 
user3010322
1:17 PM
There's at most 3 of us working on this code. It just so happens the chief person in charge man doesn't want to upgrade because...
 
user3010322
.... uh. You know, I'm still trying to figure out why. :l
 
@ThePhD TBH 4.9 (if you are thinking about 4.8->4.9) isn't the greatest release series in GCC's history.
 
user3010322
@Griwes I'm thinking about 4.4 -> 4.8
 
Oh.
 
user3010322
And 4.2 -> 4.8
 
1:19 PM
Heck, even here at Nokia we are at 4.7 already.
 
user3010322
:lllllllllll
 
user3010322
I'm being outclassed by Nokia. What is my life.
 
And at 4.9 in our component's tests.
 
I think we mostly use Clang
but devs work in VS moslty
 
user3010322
Bartek's ahead of me too? ;~;
 
1:20 PM
@ThePhD VS2013 is the lowest denominator atm I think
 
@Bartek Thx for accepting my brilliant answer, I thought it would have been more interesting too wait for actual code samples :)
 
user3010322
q_______________q
 
no plans for upgrade yet and I don't feel a need frankly
 
user3010322
TIL everyone's developing on cooler machines that me.
 
"machines"?
 
user3010322
1:21 PM
A machine is only as good as the software it wields.
 
@ThePhD Has he been able to figure out why you do want to upgrade to... Well. Has he been able to figure out to which version you'd want to upgrade?
 
@ParkYoung-Bae I can always change if SÅ‚awek decides to write his own answer, but since he gave :ok: on yours, welp. If there's a single person in the world who has seen the latest Vulkan APIs, it's him :P
 
@Griwes and yet travis-ci is stuck on 4.6
 
@BartekBanachewicz Why are you giving us his marital status though
 
1:22 PM
:D
 
eh eh idioms
 
@Mgetz Thank God I have TeamCity over which I have full control. lol
 
Hmm.
Py3 is weird.
>>> '\uDBFF\uDFFF'.encode('utf-16-le').decode('utf-16-le')
'\U0010ffff'
 
@Griwes I just install latest from ppa
 
user3010322
@sehe I laid out GCC 4.8. I displayed to them our current ugly shitfaced code, and then I cleaned it up so beautifully to the point that 100+ line functions became 5 function calls. I displayed diffs, gave paragraph-commented functions explaining how they worked, why they worked, what they did, and how they did it. I didn't introduce any new libraries, either: it worked all of existing code, just refactoring it. I gave them small code snippets, they said they understood it, they liked it...
 
user3010322
1:24 PM
And then after all that I just get... stonewalled. "That's not the focus right now. We're just looking to continue support." And then I just... had nothing in my hands. I don't know how to argue against that.
 
lol: '100+ line functions became 5 function calls' - you mean you just moved the shit around a bit?
 
user3010322
@MartinJames These function calls were "these are all the same ridiculous for loop copy-pasted with different variable names" kind of code.
 
>>> '\uDBFF\uDFFF'
'\udbff\udfff'
>>> '\U0010ffff'
'\U0010ffff'
Ugh.
 
user3010322
It was really a low-brow refactoring target, but I didn't just do that stuff.
 
It accepts lone surrogates everywhere.
 
user3010322
1:26 PM
I fixed the everything.
 
@R.MartinhoFernandes \DuHH
 
user3010322
I ported the entire codebase to using the new function calls and systems.
 
> #define p printf
#define s scanf
 
@Mgetz I'd have to create myself a source package.
 
user3010322
@Borgleader After taking Since I'm currently taking CS 110 and CS 240... I understand the kinds of people that write that code now.
 
1:28 PM
Since I'm building clang and libc++ (...and boost) in a quite specific way.
 
@Griwes you use a proprietary GCC?
 
@Mgetz No, look a message up :D
I generally build my stuff (talking about personal things now) with Clang, with libc++ and libc++abi.
Theoretically it's not exactly supported on Linux...
...but works quite well. :P
 
@Griwes I would but for perl, which is not c++11 compatible header wise
 
user3010322
Can I initialize a base class after my own constructor stuff? .-.
 
@ThePhD Why would you want that?
 
1:30 PM
Why would that make any sense
 
user3010322
Well, I want to set a few things up, and THEN call the constructor of the base class.
 
OK but why
 
@ThePhD you have to use that curiously recurring template pattern to do crap like that
 
user3010322
I'm inheriting privately to prevent slicing.
4
 
and I wouldn't encourage it
 
user3010322
1:31 PM
But I export everything but the destructor/constructor of the base class to the current scope.
 
user3010322
Maybe slicing wouldn't be so bad, though...
 
@ThePhD Split off the state part of your class into its own class and inherit it before the base.
 
user3010322
@StackedCrooked Ooh, kinky!
 
@StackedCrooked :/
 
@ThePhD I know :P
 
1:33 PM
I did some template shenanigans to make some "this should not compile" tests. I wonder if I could do some macro and operator->* shenanigans to make the use nicer (and the back-end more shenaniganish).
 
user3010322
Destruction order is in reverse, right?
 
user3010322
Destruct Derived -> Destruct Base -> Destruct Deeper
 
user3010322
Yay.~
 
41
Q: Object destruction in C++

FredOverflowWhen exactly are objects destroyed in C++, and what does that mean? Do I have to destroy them manually, since there is no Garbage Collector? How do exceptions come into play? (Note: This is meant to be an entry to Stack Overflow's C++ FAQ. If you want to critique the idea of providing an FAQ in...

 
user3010322
1:37 PM
I can not store anything on this then and just use the base objects for my nefarious purposes.
 
@ThePhD why?
@StackedCrooked's proposal is sensible
 
user3010322
@BartekBanachewicz I managed to fix the whole thing by eliminating the need to store any state over the thing at all. Instead, I just force semantics in the constructor and the destructor uses its contained objects to get some of the state it needs.
 
user3010322
Everything's sharing! \o/
 
class Base { Base(string); };
class X { string get(); };

class C {
    Base b;
    X x;
    C : x(), b(x.get()) { }
}
 
What the fuck, you have to register to download Intel OpenCL now
 
user3010322
1:41 PM
git rekt, yo
 
@ThePhD fuck OOP
 
> Thank you for your interest in Intel® Integrated Native Developer Experience Starter Edition.
I AM NOT INTERESTED
just give me the fucking headers and libs
 
user3010322
> Integrated Native Developer Experience Starter Edition
 
torrent them
 
user3010322
Wow, talk about a mouthful.
4
 
1:42 PM
@BartekBanachewicz oh, the old 'glid' thing... was thinking... it might be nice if there was some way to pass it like a 'bind only' version... ie a version of glid that doesn't create or delete the gl object, but can bind it. But then how do you ensure that the gl object is still valid :\ not sure if I really need this though... was just mulling the thought over.
@BartekBanachewicz object orientated is ok, object obsessed is where shit starts to fall down.
 
@ThePhD dafuq is dat
 
user3010322
@Borgleader Some Intel bullshit.
 
@thecoshman tying logic to data sounds dumb
 
Why do people keep on using "orientated" instead of "oriented"? </LRiO>
 
@thecoshman what for
 
user3010322
1:45 PM
@ParkYoung-Bae Because English is complimacated.
 
GLID is supposed to act like an opaque value
 
@BartekBanachewicz like I said, don't think I had a valid use for it :P was just thinking it might be nice
 
Binding has a problem because you can bind to different targets
 
@BartekBanachewicz well, you can't copy it, but maybe you need to use shared/weak pointers
 
you might need N classes that inherit from it
You might need BOOST_PP for that
 
1:46 PM
@BartekBanachewicz for what?
 
@thecoshman for saying "glid holding a texture can be bound to texture_2d target"
... and also all other texture targets
 
> unity3d.com/legal/eula Under section 5. This wasn't present in the Unity 4 EULA. That's pretty scarey. Even if you make a free game, you have to tell your players that your game is collecting data from them and sending it to Unity?
 
but if you have a gldr::texture and call .bind() that class will say how to bind it?
 
> Yes, it collects, but only for "Unity Personal" (Free) liscense.
wtf
 
or am I not understanding something
 
user3010322
1:49 PM
@AlexM. LOL
 
user3010322
So that's why they made it free!
 
user3010322
It's going to suck up telemetry data.
 
@thecoshman so the Bindable interface would need to expose 'bind(target)' right?
What's the domain of 'target'?
 
@BartekBanachewicz oh right, for textures...
 
Not only for textures
For buffers as well
 
1:50 PM
yeah, so I guess that is reason enough to not have '.bind()' in the glid (calling T::bind())
 
I am starting to see how Vulkan might be a better alternative :/
Nothing of that crap
 
@ThePhD so not only do the not give you the dark skin
they also do this
man fuck unity
 
though I guess .bind() can call .bind(T::defualtTarget()) and T must offer some sort of something that enumerates the targets for it :\
@BartekBanachewicz if it ain't that crap, it's some other crap
 
No, its not
 
is there an ETA for a ~usable~ Vulkan?
 
1:52 PM
It just doesn't have anything besides "here's raw data"
Tomorrow we might get some more info
I suspect a good few months
 
either way, I think upgrading to Vulkan is something for much further down the line.
 
I am going do get a vulkan back end asap
But I need to finish back end abstraction first, lol
 
at the same time, I clearly don't know gl that well :P
so Vulkan might make sense
 
Sometimes, you can smell a singleton coming:
http://stackoverflow.com/a/28856098/758133
 
@thecoshman doubt it will
well, i mean, if you don't want to finish your game then it might make sense
just like opengl :P
 
1:57 PM
@MartinJames Smells kinda like green tea. ..Oh wait, that's the cup on my desk.
 
@StackedCrooked OK, done. I need to goto the kitchen now.
 
@thecoshman hm hm /cc @ThePhD @Borgleader @melak47
 

« first day (1600 days earlier)      last day (3347 days later) »