« first day (1402 days earlier)      last day (3529 days later) » 

5:01 PM
@LucDanton Forced, and the sort of question nobody's ever likely to ask outside of attempting to reproduce "Lambda the ultimate".
 
0
Q: Implementation of instance testing in Java, C++, C#

JakeFor curiosity purposes as well as understanding what they entail in a program, I'm curious as to how instance testing (instanceof/is/using dynamic_cast in c++) works. I've tried to google it (particularly for java) but the only pages that come up are tutorials on how to use the operator. How do...

amazing that this stayed open
 
@JerryCoffin Perhaps surprisingly, I had not realised this was a phrase until you made me look it up.
 
@JerryCoffin i pinged @LouisDionne whose code it was, perhaps he can explain where he got the inspiration
 
@R.MartinhoFernandes If you ever find something that looks interesting, and you feel is not original, where would you ask what it is?
 
5:11 PM
@LucDanton Yes, I am a bit surprised (maybe that's just showing my age though).
 
I hesitated to mention that those papers were before me, yeah. Didn’t want to make it look like I’m calling you old, grandpa.
 
@Xeo All you can eat sushi is definitely a good thing.
 
Xeo
and not just sushi
all those delicious things
Yaki Udon
Tako Yaki
damn it looks so good
 
@LucDanton Careful who you call grandpa (despite my advanced age, my oldest son is ... way too young to be having children).
 
user3010322
5:16 PM
@Xeo There's a Sushi Buffet here. ._.
 
user3010322
I've been trying to avoid going to it but maybe today......
 
posted on August 18, 2014 by Eric Battalio

Today we released Visual Studio "14" CTP 3 and an early build of the .NET Framework (read the announcement on the Visual Studio blog here ). Grab it from the Microsoft Download Center or from MSDN subscriber downloads or save some setup time and use a...(read more)

 
user3010322
Why is that on the Visual C++ blog.
 
user3010322
It's just a new build of the .NET Framework.
 
user3010322
> Rename Symbol - The Rename Symbol extension for VS2013 (titled "Visual C++ Refactoring on VS Gallery") has now been integrated into the product, with additional functionality like being able to cancel the operation if it is taking too long.
 
Xeo
5:21 PM
lol
 
user3010322
Goodie, basic tools I don't have to go download included in the project that forces me to restart when it sneezes.
 
user3010322
> Support for the thread_local
 
user3010322
Snuck that in there.
 
o_o
 
5:25 PM
finally beat level 32 in squares game
 
Xeo
@StackedCrooked took you long enough
 
user3010322
Feels good, man?
 
@Xeo i'm dumb
 
I hope there will be legislation to ban the blood from chessboards.
 
Wtf
Chessboxing is less lethal.
 
5:27 PM
I’m not sure I want to know more about this :s Like were the two players set against each other?
 
user3010322
Chessboxing...?
 
Which pieces were the murder weapons?
@ThePhD yep that's a thing.
 
Originated here in Berlin.
 
Xeo
@LucDanton Heart attack, and death over night - apparently both natural deaths.
 
5:29 PM
Awful.
 
user3010322
Apparently they were playing a lot longer than everyone else...
 
user3010322
But why is it called Chess Boxing?
 
user3010322
Is there some element of actual hitting?
 
Xeo
@ThePhD Chess + Boxing
taking turns with the games
one round boxing, one round chess
 
user3010322
What's the tiebreaker?
 
5:30 PM
You lose by either KO or checkmate.
Whichever happens first.
 
user3010322
Oh.
 
user3010322
I guess that adds higher stakes to the chess game.
 
user3010322
You can maybe rough someone up so much they can't properly play the chess game.
 
user3010322
It does prevent you from being very sedentary, I suppose...
 
user3010322
But I feel like Treadmill Chess could do that just as easily.
 
5:33 PM
It's the manliest sport.
Blend of brawn and brain.
Box champs have tried it and got their asses kicked on the board.
Chess champs have tried it and got their asses kicked in the ring.
Dammit. Can't edit past one message.
One nice thing is that there are virtually no stalemates, unlike in regular chess.
 
> Spinatsalat
yummy
 
Hey anyone got a bit of time?
 
user3010322
Oh god.,
 
Yes?
 
user3010322
I have to apply the VS 2013 patch on this computer too.
 
user3010322
5:40 PM
Gonna make me restart again, even after I closed VS.
 
user3010322
Why me. ;~;
 
Join the vs2010 crowd ;P
 
user3010322
I actually liked VS 2010 for the IDE experience at the time a lot.
 
Xeo
ugh
 
@R.MartinhoFernandes the klitschko brothers are supposed to be rather smart
 
Xeo
5:41 PM
VS2010 was so fucking slow in comparison to 2008.
 
But I'm really trying to get this unicode-reading working.. And the solution to a question helped me a long road.. However I can't seem to get it working for UTF32...
 
user3010322
Or maybe that was VS 2008 Team System...
 
user3010322
@Xeo I think that's when they switched to using WPF.
 
0
Q: std::getline and UTF16 (LE) filestream - not working

paul23Well the following should work - I can't find a reason why it shouldn't: std::fstream f; std::string myoutput; f.imbue(std::locale(f.getloc(), new std::codecvt_utf16<wchar_t, std::little_endian | std::consume_header>)); f.open("c:\\test.txt", std::ios::in); std::getline(f, my...

@xeo actually I found it much faster than 2008
2008's intellisense kept crashing
2010 keeps running smoothly in any size project for me
 
user3010322
2008's intellisense actually worked for C++.
 
user3010322
5:42 PM
Which was mindboggling.
 
user3010322
At least, to me.
 
user3010322
2010+, I had to go to VAX to get any kind of help there.
 
For me I kept having to delete the database, as that kept going corrupt.
 
user3010322
The .SDF file is really annoying.
 
@paul23 The answer is really great.
 
5:44 PM
Well indeed - but I can't seem to get it working for utf32
 
What codecvt have you used?
 
using std::wbuffer_convert<std::codecvt_utf16<char32_t ... (and correct string types) don't seem to work
it keeps interpreting every 2 bytes as a new character
 
Ah yeah that’s not right.
 
commented the problem now :/
 
haha codecvt
 
5:47 PM
-.-
 
AFAICT there is no appropriate standard codecvt. I’ll look into Boost.
 
user3010322
Eugh...
 
@LucDanton There are... but libstdc++ doesn't implement it
 
user3010322
This is why byte reading should be separate from text pulling...
 
Which one would that be?
 
user3010322
5:50 PM
That looks gross as all fuck.
 
@LucDanton all of the ones listed here: en.cppreference.com/w/cpp/locale
they are targeted for implementation in 4.10
some ABI break or somesuch nonsense
 
So, none.
 
@LucDanton what kind of codecvt should one take for this then?
 
I wish to make a UTF8 (fstream) -> UTF32 (converted buffer) conversion right?
 
5:51 PM
@paul23 Slurps in UTF-32 bytes, presents char32_t.
If I’m not mistaken that would inherit from std::codecvt<char32_t>. (But std::codecvt<char32_t> does UTF-8 ↔ UTF-32 already, so not that one.)
 
Quick question about posting to C and C++:
If I'm working in C++ but my question is all valid C, should I also tag as C++?
 
You shouldn't tag C at all
 
You're wokring in C++ - why "consider" it's valid C?
 
Well, the minimal example is basically just SDL calls.
 
C++ compiler behaviour has little to do with C
It's one or the other
 
5:55 PM
This is about SDL, though.
 
You should not tag it with C. Because then there is confusion as to what you have available in your environment
 
Irrelevant
 
@paul23 What matters is the file encoding, and which code units you wish to work with.
 
I'm talking about this, btw: stackoverflow.com/questions/25369043/…
 
If it's C++, tag it C++. If it's C, tag it C. It's really that simple.
 
5:56 PM
Thanks, will do
 
Well consider I have a UTF32 encoding - and hence wish to convert it to UTF8 string... I guess I can just read manually 4 bytes a time, and consider UTF32 fixed length.
 
> ValueError: dict contains fields not in fieldnames
Python's standard csv library is annoying as fuck
 
Boost.Locale recommends against anything that’s not UTF-8. I can’t tell if it supports anything like so.
 
Not only this nonsense, but it also insists on taking encoded bytes instead of strings
Ugh
 
-.- "great" why do all programmers say "use only UTF-8" while in reality you see chinese constantly sending me UTF32...
 
5:59 PM
@paul23 because the majority of programmers you talk to are from Europe and the US in which that makes sense
 
@paul23 Because "all programmers" are fucking morons.
the problem here is that you're blindly doing what other people are telling you to do instead of actually thinking about the problem for yourself.
 
I've been linked a dozen times to "utf8everywhere" site (and googling also keeps showing links as if they are answers)
 
It's shit
Also use ICU
 
But that site is just telling that "utf8 is better"....
hmm I guess that's the only option left?
 
It's better unless it isn't
 
6:01 PM
> gcc -o test main.c $(sdl2-config --cflags --libs) -lSDL2_ttf
 
IIRC gcc is a C compiler
 
@paul23 Again, you're just blindly following the linker's argument without actually thinking about it.
 
@paul23 UTF8 is just a serialization. The answer is use Unicode of some sort and then work in the serialization that makes sense
2
 
it's nothing more than "I'm gonna jump off a cliff because there's a bunch of other people who jumped off a cliff!".
I'll never understand people who just do what other people do or what other people tell them.
 
6:02 PM
linker's argument??
 
> Hammers are all nice and dandy if I'm nailing someone to a cross, but please keep them away from my screws.
No, no, no, no, no, no, no, no. Please, no. No more hammer analogies. For the love of God, please stop it.
 
grr
typical family members
walk in, "I'm gonna use a bunch of your time and hardware, hope you don't mind, by the way, you're substandard".
 
you are a jerk
 
Xeo
Hm, nice, Easter holidays next year fall into the 4 weeks I plan to spend in Japan
 
Is there a tutorial/something for the C++ bindings of ICU?
 
6:05 PM
@paul23 they are part of boost::locale
 
The Boost.Locale docs are so confusing. Only useful mention of codecvt so far is in a file named utils.hpp, and involves std::auto_ptr. This does not bode well.
 
Yes it's called ICU documentation
 
@LucDanton that's because boost::locale doesn't use codecvt
AFAIK
 
what the fuck even is codecvt.
 
IOstreams arcane builtin conversion mechanism
 
6:06 PM
Locale facet to handle byte ↔ char.
 
A problem I see with using boost locale is that "getline" can't be easily used then - so I'd have to manually test character by character?
 
Gimme a sec, this machine doesn’t have Boost anymore.
 
Xeo
okay, wtf.
When I check for a two-way flight, I see prices around 400-500 per ticket.
When I check for a one-way flight, it's 4.4k+
just... what
 
It includes the cost of the plane crashing
 
Hang on further, I don’t want to mess with bytes and so on on Coliru lol.
 
6:15 PM
Reading boost.org/doc/libs/1_55_0/libs/locale/doc/html/… - it seems to only allow conversion to utf8 from "widestring" (whatever that may be)
 
Xeo
hm, I guess what I actually need is a so-called "open jaw" ticket
arriving at one place, and flying back from another
 
?? dependency on libboost_chrono
$ LD_LIBRARY_PATH=~/local/lib:$LD_LIBRARY_PATH ./test
terminate called after throwing an instance of 'std::bad_cast'
  what():  std::bad_cast
Aborted (core dumped)
That’s helpful.
 
user784668
wow
 
user784668
Clang from git runs on Windows.
 
I've been running Clang on Windows for years.
 
user784668
6:27 PM
64-bit?
 
sure
 
user784668
Unpatched, and exceptions worked?
 
@paul23 AFAICT Boost.Locale will not help.
 
exceptions are mostly a stdlib thing, not a compiler thing.
 
XD
You would think that in the last decade or so someone has made a good library for unicode conversions.. To "hide" the encoding details...
 
user784668
6:29 PM
@Puppy Except the tables that contain unwinding info.
 
yes
 
I find it at least a little bit strange that this isn't the case
 
Welp, you can slurp the bytes and get on with it I suppose. Beware endianness.
 
there was never anything incorrect about Clang LLVM's unwind table data.
MinGW just changed the format for 64bit and they didn't implement the new format yet.
 
Officially UTF32 isn't limited to 4 bytes - this is a bit the problem I don't like depending on shortcut bugs
 
6:30 PM
@paul23 It's explicitly limited to 21bits.
 
Uh what
 
@paul23 It’s not a shortcut neither a bug.
 
Your last question said you were a "college level student"... — crashmstr 4 mins ago
 
IDK if 3.5 officially contains the new SEH unwinders or not.
 
user784668
@Puppy More like, used the format that was already there.
 
6:31 PM
I read somewhere that a character in UTF32 can also be made of 8 bytes...
 
@Fanael They switched from Itanium on 32bit to MSVC-style on 64bit.
 
@paul23 No
UTF-32 is fixed-size encoding
 
@paul23 Then you read it wrong. Again, you're taking random articles or links as authorities. They are not.
 
@chris College-level high school student, no contradiction here!
 
user784668
@Puppy Exactly.
 
6:33 PM
@LucDanton Why would you even say college-level?
 
Not my words.
I can’t access Coliru from here.
 
@Fanael The format that was already there was Itanium. Itanium and Windows don't play together particularly well, though.
 
It's down
 
apparently MinGW 32 did some nasty linker hacks to make it work
but for MinGW x64 they scrapped at least some of them
 
@CatPlusPlus I deny any and all allegations that my using it not 10 minutes ago had anything to do with it.
 
user784668
6:36 PM
At any rate, this works on LLVM from git.
 
user784668
Now I have to figure out how to tell LLVM that __gxx_personality_seh0 is the personality function.
 
@Fanael That's... that's very bad.
@Fanael Not LLVM, Clang.
 
@LucDanton You may not deny allegations that have not be leveled for not using it not 10 minutes ago.
 
user784668
@Puppy Both, actually.
 
@Fanael No, definitely Clang.
 
user784668
6:39 PM
@Puppy No, definitely both.
 
Clang tells LLVM which personality function to use.
 
@chris lol
 
and I've seen the associated Clang patch, it's tiny, and it just changes the personality function name that it tells LLVM to use.
 
user784668
@Puppy And one of the optimizations contains hardcoded names of possible personality functions.
 
@Fanael It's not an optimization. It's part of the fundamental mechanism. They have to hardcode the names. It's part of the compiler -> library interface.
 
user784668
6:42 PM
@Puppy Instruction combining is not an optimization?
 
no.
instcombine is part of the LLVM implementation details and it's not an optimization pass.
 
your mom is not an optimization
 
although personally it does surprise me that LLVM knows any personality function names.
AFAIK the hardcoded list should mostly be in Clang.
 
@jalf But she's a premature optimization. wut now?
So what exactly did I walk into?
 
A bar
You're the horse
 
user784668
6:46 PM
@Mysticial Anti-tank mine.
 
> C++11/14 Idioms I Use Every Day [...] * auto type deduction everywhere!
jesus
 
Infer errything
 
"auto everywhere" people really make me sad
 
Xeo
auto autowhere!
 
Does it?
 
6:47 PM
@Jefffrey sometimes... I really don't care what the type is... only that it does what I want...
 
user784668
auto int x = 5;
 
"sometimes" is the keyword
inb4 auto is the keyword
 
XD
 
Xeo
sometimes x = 5;
yeah, that doesn't quite work
 
@Jefffrey no you were right the first time... usually it's with things like local facets that have insanely long type signatures
 
6:48 PM
Signatures only for documentation
 
just remember the reader also needs to infer the type sometimes
 
Infer errything
 
Well often you know something is "just a numeric" or "just a reference" - and don't care about what it is.
 
@Jefffrey yep
 
decltype(mufunction() ) value = myfunction();
 
user784668
6:50 PM
@Puppy So why is it run only when optimizations are enabled?
 
Ugh my code is bad and I feel bad.
 
"Oh wait, what's this `x`?"

auto x = func()

"Let's see what `func` returns..."

auto func() { return other(); }
and so on
 
user784668
@chris As you should.
 
I wouldn't type signatures on trivial functions like that either
 
user784668
@Jefffrey And in the end it turns out it's just an int.
 
6:51 PM
multiline markdown is so broken
 
I'm coming back after this next study term, so I'm planning on doing a lot of refactoring before then.
 
user784668
@Jefffrey yes
 
oh wait, someone was fighting on that side already
> In my emacs, goto definition is one key press and another key press to go back, any capable editor can do this.
Oh well, if in your emacs it's easy, then it must be easy everywhere.
 
Xeo
meh
 
It is easy in any non-broken editor
 
Xeo
6:55 PM
even VS has that
 
my VIM does not
 
:help tag
 
ok, it might be that easy
the problem remains
 
There is no problem
 
user784668
Programming is the problem.
 
user784668
6:57 PM
No programming, no problem!
 

« first day (1402 days earlier)      last day (3529 days later) »