« first day (1320 days earlier)      last day (3644 days later) » 

6:01 PM
@BartekBanachewicz, given a function Int -> Int (like (+3)) is there an easy way to say "apply this function n times starting from this value"? My current solution is a combination of foldr, (.) and replicate.
I guess I'll write it myself.
 
g++ how can you have optimized out a member variable.
 
cause it's not used
I've only seen g++ do it for static ones though
 
@Rapptz It probably inlined this method, I feel.
but now I can't print llvm::ArrayRef<T>::size() because T has no size() member... thanks GDB.
 
@sehe Oh wow.
 
@DeadMG -O0
 
6:11 PM
Also I was going through some old posts of DevSolar today. GNU also does (or did) some stupid shit.
 
Dammit. Forgot to buy new shoes.
 
@DeadMG you can print the object itself
set print pretty
 
@Rapptz Yeah, I thought about that, but I didn't want to kill myself building LLVM and Clang again
@StackedCrooked Doesn't matter, it's a constant and I found the source and it explains the bug.
 
printf can print constants. printf > gdb
 
gdb has printf!
 
Xeo
6:17 PM
@R.MartinhoFernandes That's not-good
 
but it can't printf(x) if x is optimized out
 
well this is the first time I ever wanted std::string to have another member.
 
@Xeo can't even get them tomorrow morning because it's a holiday.
 
Xeo
Which is why I said it's not-good
 
6:22 PM
Guess I'll have to run the ones I have to the ground.
Get new ones in Oranienburg on Friday.
 
> “Thank you for being a part of our incredible journey and thanks for all the support. P.S. Your data will be deleted in two weeks.” the guy has some self-relativation
@R.MartinhoFernandes Mine are in their spare time already. Still have to find/take a moment to replace them. They officially have holes in the sides and sole since for some weeks (months) now
 
Mine are about to die at any moment.
Like, soles catastrophically falling off or something.
 
It doesn't help that I walked the "Avondvierdaagse" on them and my kid is (still) learning to ride his own bike, so I'm often running along
@R.MartinhoFernandes Oh, it's rarely catastrophic for me. I can still walk with them if the front of the sole had completely flipped off and bent backwards... Just, bend it back and adjust the walk so it doesn't happen :)
 
I got dismissed from jury duty. Guess I'm headed to work.
 
If the weather is not too bad, I'll just wear sandals, I guess.
Can't "adjust the walk". That's a synonym for falling.
I can handle untied shoelaces out of decades of practice, but that's it.
 
6:32 PM
@Mysticial Oh wow. I didn't catch that episode. So, did you "jure"?
@R.MartinhoFernandes I wouldn't attempt to for longer stretches, but I can sure neglect my footwear for a while. Well, any wear, really
 
if (llvm::Triple(clangopts.TargetOptions.Triple).getArch() == llvm::Triple::ArchType::x86)
    clangopts.TargetOptions.Triple[3] == '-';
fuckin' genius, I am.
 
user1804599
Okay.
 
user1804599
What shall I make today.
 
the trick is to make the same thing every day for many days in a row
 
user1804599
I already did that.
 
6:35 PM
@Xeo there's only one manga I've ever read; Nodame Cantabile :D
 
what'd you make
 
user1804599
A small part of a bug tracker.
 
user1804599
Every time.
 
Xeo
@ScarletAmaranth Right, which is why I wondered why you sounded like you read the new chapter already :P
(Context: The manga was on hiatus for an eternity)
 
@ScarletAmaranth wut? what's the point of reading it? you should watch anime and listen
 
Xeo
6:37 PM
wat
We're talking about manga, not much do listen to there
 
yeah that's the point. Nodame Cantabile is all about music. you can't read that
 
@Xeo because gon turned into a big bad killer :D
 
user1804599
@Jefffrey foldl (\x _ -> f x) i [1..n]
 
Xeo
@ScarletAmaranth Chapter, as in, manga chapter. :P
Gon didn't even appear in that one
 
user1804599
@BartekBanachewicz that would be sad towards the people who love them.
 
6:40 PM
@Xeo still a rather exciting episode o' anime; they went full retard with his jajanken
NEW NGNL!!!!! off I go
 
Xeo
New NGNL is just so increadibly awesome
Soooooo good
 
6:57 PM
lol Visual C++ legacy code is so bad
 
holy shit
the Wide tests run in like, 2 seconds on noobuntu
and it takes like, nearly a minute to run them all on Windows
 
Linux is so fast.
amazing
 
Xeo
@DeadMG That sounds weird
 
@Xeo Honestly, it doesn't seem that odd to me, I mean
 
git runs like 50x faster on linux for me
 
7:00 PM
You could run valgrind --tool=callgrind ./my_test ; kcachegrind callgrind.out*
 
I spawn a new process, load some stuff from a file, perform a pretty complex process on it, then JIT and execute the result
 
@Xeo depends on what the code does. Some operations are tons faster on Linux
 
synchronously
 
Ah yeah, processes and files? That was pretty much what I was going to use as examples :D
 
so the fact that they were slow didn't surprise me
but on Linux it's like, WHOOSH
 
Xeo
7:01 PM
Well, actually, not that unsurprising after all, I guess
 
I'm not sure how they do it, but file system access on Windows is a miserable experience
 
Xeo
Since llvm's main support is Linux
 
indeed it is
 
well it could be that their windows support is just shit
oh yeah
 
But 2 seconds vs 1 minute is too much. There must be something else.
 
7:02 PM
Spawning processes on Windows is extremely expensive
 
it might also be that because MSVC doesn't support linking debug and release code together
then on Linux I have a release LLVM for testing
and on Windows, it's a debug LLVM.
that might have something to do with it, I guess.
 
Xeo
that's likely a big factor
 
What would you use for a circular buffer backed deque for C++ (compiling with clang or gcc only), if you could only use standard library collections? I'm considering rolling my own :/
 
Boost.
there's a boost::circular_buffer somewhere I'm pretty sure.
 
@BenjaminGruenbaum std::vector or std::array
 
7:04 PM
Yes use std::vector for a deque, not std::deque good choice
 
@StackedCrooked As a circular buffer?
 
@BenjaminGruenbaum Yes, but you need to wrap it of course.
 
@BenjaminGruenbaum sure, inside some kind of wrapper
 
Billhooks, more bills. Fucking travel insurance ran out on 26th, just in time to be useless for unconference. Meh:((
 
@sehe Nope. They put me on telephone standby. A few hours later they dismissed my entire group. So I didn't have to leave home at all.
All I had to do was refresh that status screen.
 
7:05 PM
Cool. that's exactly what I had in mind. I just hate rolling my own collections, and std::deque is slow and this is for a friend who can use std collections but not boost :/
 
@DeadMG yes there is and it's good
 
@BenjaminGruenbaum std::deque is pretty reasonable, if you're not on MSVC
 
Xeo
@BenjaminGruenbaum "can't use boost" is almost never a good excuse - just copy the boost implementation
 
YES I CAN
 
@DeadMG yeah, that's why I said only clang and gcc.
@Xeo that's what I told him
 
Xeo
7:07 PM
@StackedCrooked You can what, watch NGNL? :P
 
so
 
"Luckily" he's in charge of teaching a course in the university and his students are the ones that will suffer :P
 
Xeo
That's horrible
 
I guess I should probably, like, figure out why these tests fail on Linux and not Windows.
 
queen's innuendo has one of the best beginnings I've ever heard
 
7:10 PM
hang on, so you're comparing the performance of failing tests to ones that succeed? :p
 
@Xeo Soon.
 
@jalf Nah, there's ~130 tests and only 11 of them fail on Linux when they succeed on Windows.
running the failures on Windows takes longer than running everything on Linux
 
Save output, diff output with expected
 
you can get a nice diff with meld
 
> Are there too many indie games? Spiderweb Software's Jeff Vogel thinks so. pcgamer.com/2014/05/28/…
I think so too tbh
 
7:13 PM
@Xeo welcome to academia :D
Wanna see his code?
This is the simpler client code, the goal of this exercise is to do networking in C or CPP, the course is 'operating systems', this exercise is 'classic' in the course in that - it was similar when I did the course, I'm giving him some pointers. He's the TA and in charge of the exercise.
 
James McNellis is saying I should prefer enum : uint32_t { my_constant = 10 }; over static const uint32_t my_constant = 10; :v
I don't see why.
 
This is the 'example' client code. That's supposed to be good moodle.cs.huji.ac.il/cs13/file.php/67808/clftp.cpp
I want to cry.
 
g'evening guys
@Rapptz because one will require a definition in certain contexts (static const), where the other one doesn't (the enum).
 
user3010322
@FilipRoséen-refp A stupid rule, to be sure.
 
@BenjaminGruenbaum nice horizontal lines
 
7:17 PM
@BenjaminGruenbaum you are required to login to access the contents of that page
 
ah
 
surely a sign of quality
 
turns out that I did ptr->GetThing()->Function(std::move(ptr)); in a bunch of places.
 
@StackedCrooked The sign of a pro
 
//********************************* VARIABLES *********************************

#define SUCCESS 0
#define ERROR -1
#define EXIT_CODE 1
#define BUFFER_SIZE 1024
^ Those are not variables..
 
7:17 PM
G++ just evaluates it in a less-friendly-order than MSVC.
compiler probably rejects static_cast<A&> and the const_cast is meaningless.
 
@BenjaminGruenbaum Old programming languages required you to use sections. Is he an old guy?
 
wrote it mad wrong
 const_cast<A&> (static_cast<A const&> (A {})).func ();
there we go
 
user3010322
... What happened to A{}.func() ?
 
no, it's not UB, but it's also totally pointless
 
7:19 PM
it's not pointless, at all
 
it's thoroughly pointless
 
@StackedCrooked No, he is a young guy, didn't write a line of code until his BSc, which was like 5 years ago.
 
imagine struct A { void func () &; };
 
He's just culting there probably.
 
Xeo
@Rapptz It's shorter, duh!
 
user1804599
7:19 PM
@FilipRoséen-refp at least it’s confusing.
 
user1804599
Use a variable.
 
Xeo
@FilipRoséen-refp Ewwaitwhat
 
yes, and what I'm imagining is that it's set that way for a reason.
 
c-style cast lets access private bases, sweet
 
you do not randomly circumvent the protections set on a class's interface.
 
Xeo
7:20 PM
@DeadMG fail
 
user1804599
@StackedCrooked as do friends.
 
user3010322
Hm.
 
user3010322
I need to talk to Robot in 1.25 months.
 
@Xeo Yeah.. thinking about refactoring them into static functions. They're not even virtual.
 
@Xeo Oh. You made me realise why it's bad.
 
user3010322
7:21 PM
In other news, @Xeo What's your favorite Anime / Anime Character?
 
He used ptr twice.
 
Xeo
@ThePhD That's a hard question
 
user3010322
Hm.
 
@Xeo Accelerator?)
 
user3010322
Maybe it will be easier to answer if we raised the stakes.
 
7:22 PM
struct A { void func () & { } };

int main () {
  void(A::*p0)() &  = &A::func;

  (A {}.*p0) ();                                          // illegal
  (const_cast<A&> (static_cast<A const&> (A {})).*p0) (); // legal
}
 
Xeo
@Abyx Nah, I like him, but he's not my favourite
My overall favourite, if we only take anime, would probably be Misaka Mikoto
 
@FilipRoséen-refp The first one is illegal for a reason.
 
user3010322
I have no dea who that is.
 
@R.MartinhoFernandes By "ICE" do you mean freeze? As in the compiler hangs?
 
@DeadMG surely
 
Xeo
7:23 PM
@FilipRoséen-refp template<class T> T& as_lvalue(T&& v){ return v; }
 
@Mysticial Internal Compiler Error.
 
Oh
 
lol
 
Xeo
@ThePhD Toaru Majutsu no Index character
 
@Xeo I know
 
user3010322
7:25 PM
@Xeo Hm. Okay, got it. :D
 
@FilipRoséen-refp I don't like you ;) you always come here with some elaborate nonsense you probably always know the answer to prior to asking only to waste some time or some such - shrug
 
Watch it get closed as, "it lacks sufficient information to diagnose the problem." :)
 
I don't have a favourite character
 
how do I un-redirect stderr?
2>&1?
 
@ScarletAmaranth rewriting it into a template is what I know, I asked if it was UB (ie. am I missing something from the Standard) doing such cast
 
7:26 PM
un-redirect?
it's not redirected by default
 
yes, I redirected it
and then I want to un-redirect it
 
user1804599
AFAIK you cannot.
 
user1804599
You first have to duplicate the original file descriptors.
 
user1804599
And then when you want to “unredirect” you duplicate them back to 1 and 2.
 
user1804599
Or something like that.
 
7:28 PM
2>&1 seems to have worked fine
 
user1804599
That redirects 2 to 1.
 
user3010322
WHA
 
user3010322
Deja-vu.
 
user3010322
This exact conversation appeared in my dream.
 
user3010322
If I'm right, something is going to break in the next 20 seconds.
 
user1804599
7:29 PM
Yay first spam comment on my blog.
 
protip: it won't
 
The old fashioned hooks are kinda nice.
 
user1804599
Zitten daar niet veel haken en ogen aan?
 
@StackedCrooked are you also drooling for std::exchange in C++14?
 
7:34 PM
haven't seen that yet
 
user1804599
std::stack_exchange
 
who wants to help DeadMG spot why this sample returns false?
 
@StackedCrooked turns your set_fun into return std::exchange (fun, new_fun);
 
Xeo
@DeadMG Vtable wrong?
 
7:35 PM
@Xeo I don't believe so.
 
@Mysticial and you have a lot of pratice refreshing status screens ;)
@DeadMG several, there's circular_buffer and there is a lock-free thing (spsc_queue) which is basically the same concept /cc @StackedCrooked
 
@DeadMG arg1 := b1.lvalue => is this by reference? or is slicing possible?
 
@StackedCrooked It's an lvalue.
 
ok, so ref
 
I'm de-mangling the LLVM IR right now trying to simplify it, since it's hard to read anything in that junk
 
7:39 PM
@StackedCrooked never mind that //********************************* VARIABLES *************** style comments were a thing in ASM, Cobol and BASIC, maybe
 
the sources of Gothic 1 and Gothic 2 (and implicitly any Piranha Games game) were littered with such comments
 
hmm
it's hard to see what's what since there's a bunch of unnecessary stack-allocated temporaries littering the code of f().
 
I found it funny when I heard that even the composer (Kai Rosenkranz) wrote some of the code in Gothic 1
he now abandoned his music career and started working on some IT job
//#####################################################################
//##
//##							KAPITEL 3
//##							=========
//##	Der Spieler hat alle vier fehlenden Foci abgeliefert und
//##	seine zweiteilige Belohnung abgeholt.
//##
//#####################################################################
haha, it's been a while since I last saw this
I still have no idea what the german comments mean but hey
 
Ask @Xeo :v
 
Xeo
Wait, what
 
7:46 PM
Woah. Evan Carroll posted an answer on meta that isn't downvoted.
That's impressive.
 
user1804599
@AlexM. Das Kapitel
 
Xeo
@AlexM. "Chapter 3 - The player delivered all four foci and received his two-part reward."
 
@Xeo The calls haven't been virtualized.
 
I didn't do very well at German in school.
Barely passed.
 
if you look at the code generated for f(), it should issue calls to function pointers it's loaded from the vtable, but instead they're all to concrete functions.
 
Xeo
7:48 PM
@DeadMG See, something about the vtable!
 
@Xeo ooh
here's some more code samples: pastebin.com/WdU9S9xA
it was written in a custom C-like language
it's funny because I can't criticize it without making huge efforts
 
@Xeo And they haven't been virtualized because I did this:
return GetSignature()->BuildCall(Wide::Memory::MakeUnique<Self>(this, !args.empty() ? args[0].get() : nullptr, std::move(val)), std::move(args), c);
 
modding Gothic 1 was one of my first attempts at programming
 
surprise: Self always receives nullptr as it's first parameter.
 
Xeo
ew
 
7:50 PM
so I can't think their approach could be bad; I mean back then it was the approach
 
Xeo
@DeadMG you mean second
 
yes
 
Xeo
and this time it's "argument"
 
user1804599
and “its” as well.
 
Guys, I guess you know about tree structures
 
7:51 PM
watever
 
user1804599
No, we don’t.
 
Xeo
I know they grow tall and need sunlight
 
user1804599
We only know about arrays.
 
There's this question I don't quite understand
 
Xeo
May 25 at 9:48, by sbi
Welcome to the Lounge. Please read these rules first.
careful
 
user1804599
7:52 PM
Time to write a video game.
2
 
@rightfold Noob, I also know about dequeues.
 
user1804599
No, you don’t.
 
user1804599
You’re part of “we.”
 
@Xeo So I'm gonna bet that this bug caused test failures on all tests testing dynamic calls, because they'll all be devirtualized incorrectly.
 
did anyone get g++-4.9 work with clang 3.5 on ubuntu?
it can't find max_align_t =\
 
@Rapptz repost of a repost of an ars article reposting a bbc article reposting practically the whole fuckin' interwebs
 
cool
Why use scope guards instead of unique_ptr?
 
dunno
scope guards are for noobs, in general.
I've only used one once and it was because I was too lazy C++ can't handle the void.
 
Xeo
void sucks.
Did you remove it in Wide btw? I think you were contemplating
 
it's on my low-prio pile
 
Xeo
7:58 PM
A quickfix might be to automagically convert void to Unit if it's used as an argument
That way your C++ support won't be fucked over
Which was, IIRC, your main gripe with getting rid of void
 
nah
C++ support should be pretty easy to arrange as long as you don't ever pass void to C++ and expect it to behave like Wide's does.
 

« first day (1320 days earlier)      last day (3644 days later) »