« first day (1419 days earlier)      last day (3522 days later) » 

6:00 AM
how long do delete votes last?
 
user1646075
this will be hosed down by J or APL, but only 3 people on the planet will understand each solution:

http://codegolf.stackexchange.com/questions/37217/rosetta-stone-challenge-whats-average-anyways
 
user1646075
an entry for J: %a,^.a,]a,*:a,]a@:*:%]a=.+/%#&.:

The prosecution rests.
 
@Borgleader "Normandy" was actually the first thing I "saw" in that image.
 
6:12 AM
@aclarke exactly only 3?
 
user1646075
do you understand it without the explabnation? or even WITH?
 
user1646075
there's also another equally insane one further down...
 
user1646075
actually, an APL entry looks pretty
 
user1646075
{A←+/⍵÷N←⍴⍵
Q←+/(⍵*2)÷N
(N÷+/÷⍵)(×/⍵*÷N)A(Q*.5)(Q÷A)}
 
user1646075
How's the labouring going today? Got the roof on?
 
user1646075
6:23 AM
wow! I just read that APL - after 20 years! only took 5 minutes
 
@aclarke I see lots of butts in there.
 
user1646075
heh - i saw them as sacks
 
user1646075
that's a new symbol to me - I think it symbolises the input parameter to the { } code-block
 
user1646075
for which { } as a kind-of lambda is also new to me
 
That time of the month, I feel cranky ...
 
user1646075
6:26 AM
you should have a great day in 'ere then...
 
haha, do have nurofen in my car ... sadness great
 
user1646075
also they could have made it a one-liner if they used the old diamond operator to glue the lines together (same as ; in most normal languages)
 
user1646075
@chmod711telkitty am I remembering correctly - you're the avatar rebuilding your own home?
 
@aclarke secondary dwelling
currently renting the one in the front
 
user1646075
ok. what state is it in? still tearing down, or fighting contractors to complete the rebuild?
 
user1646075
6:35 AM
how much are you doing y'self?
 
I am keeping the old (fibro) house, then building a granny flat at the back
 
user1646075
fun
 
Current stage: DA approved, got owner builder certificate from fair trading and is waiting for CC
 
user1646075
i have to get 1/3 my place burnt down then replaced with something fresher and bigger, but I won't be touching a hammer... I'd like it to be done properly
 
user1646075
oooooh. You already skilled, or going to learn as you go along?
 
user1646075
6:37 AM
you do know that 'The Block' is staged.....
 
I am a newblet
 
user1646075
good luck then!
 
But my parents have just got one built in their backyard, my dad said he has something experience, I believed him ... I was wrong ...
 
user1646075
hah - he struggled hey?
 
Also currently I am renovating the bathroom in the old house
 
user1646075
6:40 AM
when it's done, you can invite the entire lounge for a house-warming
 
user1646075
they'll fly in from everywhere.
 
you are welcome to visit my site, so I can brag about the new bathroom ~_~ (then I get laughed at ... of course that's the part we don't put on the internet)
 
user1646075
as long as the taps are nearly over the sink etc, you'll be doing well
 
user1646075
shhh!
 
It's on my company website
But I don't live there ...
 
user1646075
6:43 AM
not quite on my line, but if I have a spare 20 mins on the trip home
 
user1646075
then I'll post pics in the lounge - closeups of the gaps in the tiling, etc
 
Aug 18 at 14:19, by chmod 711 telkitty
funny thing, I once paid a plumber $1000 to fix a few issues. He came back 3 timed for this one issue that kept haunting the tenant because he could not fix it properly. At the end I was tired of his incompetence so my dad went & fix it once for all ... my dad, as you might know was a lecturer turned firmware engineer, he did a better job than a licensed plumber
@aclarke evil ~_~
 
user1646075
that's tragic - probably in too much of a hurry to do it properly OR to then fix it.
 
we did not replace the old wall, so it is not perfectly flat reasonable
 
user1646075
6:46 AM
or just incompetent
 
you don't need great intelligence or been highly educated to be a plumber
 
user1646075
we got our bathroom done about 3 years ago; the guy who did the wall tiles was a Master. I mean, a MASTER. The guy who did the floor ..... kid with a crayon i think
 
user1646075
no, just a crack and a pair of King Gees
 
I might not be a master, but I have a master degree, does that count? :p
 
user1646075
Master in mosaics? sure!
 
6:48 AM
in business
 
user1646075
just found your biz - check your logs and you'll see mine ;-)
 
rental property ... doesn't matter how great the bathroom is, as long as I get good rental return </cheeky>
 
user1646075
so i herd u liek catz
 
user1646075
nice n stylish site.
 
thanks ... I paid ' professionals' to do it, sure I hope it looks okay :p
 
user1646075
6:51 AM
speaking of trips home, I have to get cracking. Good luck with the nurafen - I find that washing it down with a nice glass of wine enhances the effect.
 
user1646075
oh - not the style that will end up on the apps? don't say that!
 
I am back to work :p
 
user1646075
cheers
 
7:11 AM
auto&& result = [&blah]<std::size_t... Indices>(std::index_sequence<Indices...>)
{
    return some_pack_expansion<Indices>(blah)...;
}(std::make_index_sequence<N> {});
^inside a template<std::size_t N> void foo(); kind of function template. Feelings?
Essentially a for<N>, is what I’m getting at. static for? Nevermind.
 
Xeo
Wait, I thought []<template-parameters>(...) wasn't allowed after all?
 
Yeah I’m not up-to-date on that :/ GCC has yet to remove it though (well… I’m using a month-old snapshot).
On the one hand I wanted to spare myself from defining a class template (esp. the declare primary, define specialization dance), but OTOH I’m never too fond of gratuitously entering lambda expressions.
 
-3
Q: I can't seem to figure out what i did wrong

UberCoderMr C++ Complier, Could you please make me an awesome game that has guns and missiles and multilayer? I know we just met but i really think we could make a lot of money together. You can contact me on my email if you wish or if you prefer to call then that is okay. This could be the start of som...

 
Xeo
> multilayer
 
lawl, easily inspecting such a sequence is hilarious though
Memory usage steadily climbing and climbing…
 
Xeo
7:21 AM
@LucDanton Oh yeah, also, return <pack>...; doesn't work, unless there's an extension for that?
 
What do you mean, it's supposed to compile whatever i want right? — UberCoder 1 min ago
I don't even know...
 
Yow, it also hate my home partition. I need to disable ccache.
 
@MarkGarcia lol
 
Perhaps a troll. An existing (probably experienced) Stack Overflow user.
 
Xeo
@MarkGarcia Sure it is - you just need to communicate in the compiler's language
@MarkGarcia likely
Or maybe just a Meta test to demonstrate something for a question
who knows
 
7:23 AM
@Xeo Ya, it was meant to be a meta-expression but I got it wrong. Something like …expansion involving Indices…. I was worried the ellipses would be confusing though.
 
Xeo
ah, ok
 
Title of the day:
-2
Q: Please Help Nobody is taking me seriously

UberCoderMr C++ Complier, Could you please make me an awesome game that has guns and missiles and multilayer? I know we just met but i really think we could make a lot of money together. You can contact me on my email if you wish or if you prefer to call then that is okay. This could be the start of som...

oh, same user
 
Here we go again, compiled fired up
 
Yay! Free downvotes!
 
Hello noobs.
 
Xeo
7:26 AM
@Mysticial Oh, dupe vote was a good idea
 
That dupe vote felt good. :)
 
you're just jealous of my dope lifestyle — UberCoder 28 secs ago
Sounds like someone from the Lounge...
 
could probably flag for mod attention and delete the user
 
do eeeeet
 
Noooo!!! I want to know who's all behind this.
 
Xeo
7:27 AM
@Rapptz Already did
 
OOM
 
Xeo
lol
wtf are you doing
 
@Xeo I’m having fun!
 
@LucDanton Good thing you haven't included the compile results.
 
Xeo
@LucDanton lol
1 min ago, by Luc Danton
OOM
 
7:28 AM
I wanted some figures before I try improving the dispatching code. Now I want the figures to be graphs…
@MarkGarcia Which online compiler would have that header? :Þ
 
Xeo
His compiler is out of mana and can't cast any more compile spells
 
Time to brew a potion
 
@Xeo Um, I don't understand. Some kind of compiler error BOOM-ish sound?
 
Out of Memory.
 
lol
 
7:30 AM
Neat, I had some more in my teapot.
Since I’m going all-in I think I’ll take into account both the number of variant members (as I’m doing here), but also the number of variant operands. What do I call that last parameter?
Variant width and variant count.
 
Xeo
I'd have just gone with size and count
Or maybe size and arity?
 
ooo I like arity
 
Xeo
Hm, Amazon Fire TV for 49eur (for Prime users).
 
Eh, I’ll ditch the cute hack and expand the index sequences into a class template.
@Xeo For e-reading TV?
 
Xeo
(Just the UK version, I think every amazon site has that)
 
7:36 AM
> Amazon Fire TV is a tiny box you connect to your HDTV. It's an easy way to enjoy Netflix, Amazon Prime Instant Video, low-cost movie rentals, music and much more
 
Xeo
But... bwahahaaha, 49 pounds for prime members in the UK. This means Germans will actually get it cheaper than Brits for once.
 
A tuner-killer, so to speak.
 
Xeo
@LucDanton A cute little box with a 1.7GHz Quad Core, 2GB RAM, dual-band WiFi, a USB 2.0 and an ethernet port.
oh, and 8GB internal memory
Should be nice, with XMBC on it
 
Good news everyone! I have taken on the task of suffering from random stomach pains! @Puppy you are officially relieved.
 
Ye okay I’ll go with size as well.
 
7:41 AM
@Xeo didn't they take on an official new name?
 
Xeo
@thecoshman dunno
 
@thecoshman :(
 
I know it no longer stands for anything
@TonyTheLion don't eat, hunger pains, eat, other pains.
 
Xeo
@thecoshman Oh right, "kodi"
apparently
 
The only pains I have right now is those from drinking too much last night
 
7:44 AM
Eh, if my goal is to time the compiler then I’ll be measuring the expansion machinery etc. that sets up the whole call to apply as well. I’m notably concerned by the expansion of the count into separate variables.
 
@TonyTheLion lol. Up to much fun?
@Xeo not bad at all really.
@Xeo sort of easier to say I guess...
 
@thecoshman just hanging out with a friend
 
Hi everybody! :) how are y'all?
 
@TonyTheLion good stuff indeed
 
Are lambdas guaranteed to be default constructible?
 
7:53 AM
No.
 
Also, default constructing a lambda feels weird.
 
Dang.
 
Xeo
@Rapptz How would you default-construct a lambda containing a reference capture, or non-default-constructable value-capture?
 
I'm not sure.
I was just hoping for something
 
instance Default members => Default (Lambda members) obv.
 
7:59 AM
I don't like discussing things regarding callables here :v
So I'm just going to assume what I want to do is impossible.
 
Xeo
How boring
 
Define code concisely in one place, have it used in another. Is what you want to do.
 
Mine has to do with interacting with C APIs.
 
Woo import _ from 'underscore';.
Gotta love ES6.
 
Kind of a pain every time.
 
8:03 AM
Time to box the closure and send it through :v
 
Yeah I don't know of a good way to do that :<
 
Xeo
@Rapptz Hoping to pass your code along through a template argument?
 
@Xeo Sorta?
 
thread_local and globals! :P
 
Xeo
8:04 AM
Yeah... captures interfere with that :/
 
@Rapptz If the API is not of the kind void i_eat_callbacks(void (*closure)(void*), void* data); you have to be underhanded.
 
API is basically void i_eat_callbacks(int (*closure)(api_struct_t*, void*), void* data) :c. I'm SOL.
 
Xeo
Eh, that's good enough
 
Ye that’s okay. To clarify your C++ closure becomes the data (hence boxing).
 
The masses agree. void* is good enough.
Hm. What about thread_local statics inside a class...
 
8:08 AM
Doesn’t really matter where you put them, no? :Þ
 
makes snippets to test code
 
Are globals captured by default?
 
Xeo
since they're global, there's nothing to capture
(same for if they're static)
 
Ah. For captures what matters is (function) local vs non-local. Things like namespace scope and static members fall into the latter.
 
wait
 
8:11 AM
Hmm, O(log32 n) lookup.
 
what did you guys think I wanted to do btw?
I didn't explicitly say anything
 
11 mins ago, by Luc Danton
Define code concisely in one place, have it used in another. Is what you want to do.
 
Eh. thread_local doesn't really work when passing among threads.
2
 
you can vomit a stateful callback if the API doesn't provide a void* you can use.
 
tomfoolery I wanted to do
bad/stupid/okay/not bad?
 
Xeo
8:20 AM
works, as long as the callback outlives the api-call
 
pretty typical for this kind of API
 
+1 typical
 
Xeo
if the api-call stores the callback long-term (i.e., for after it returns), you're in trouble
 
I know it doesn't do that (in this particular case), thanks for the warning though.
I'm not sure what I'd do for that case then.
 
Why I mentioned boxing (i.e. put the closure on some piece of memory). There’s the matter of destruction though…
 
Xeo
8:22 AM
usually you new up a handler and pass that, if the callback is call-once - in that case, you can then delete the handler in the callback itself
doesn't quite work for multiple long-term callbacks, though
at that point... you're pretty much fucked anyways, though
unless the API has some kind of mechanism to pass a deletion function for your user data
C APIs are quite annoying when it comes to lifetime
 
@Xeo I went and checked
and iunno
:<
 
Is the call (that needs a callback) synchronous at all? Because if it isn’t, well…
 
ah.. crud
it says it might launch a new thread
 
Xeo
you fucked.
 
Can we just eradicate C APIS? :F
 
8:29 AM
meh
 
@Griwes How do I get my Haskell and C++ fragments to talk to one another? :(
 
So I can't do anything?
 
Xeo
6 mins ago, by Xeo
unless the API has some kind of mechanism to pass a deletion function for your user data
 
no
just a void*
 
Xeo
is it call-once?
 
8:31 AM
no
 
Xeo
well...
 
shared_ptr?
 
Xeo
Do you have any indication of some callback being the last call?
> C API
 
@Xeo Through the void*. Or something.
 
Xeo
Think about it for a bit
 
8:33 AM
the simple example I showed is synchronous
the asynchronous one is the one with the life time
which is kinda weird
meh
oh they're global variables.. kinda weird
 
@Xeo Oh I get it now...
 
this upsets me greatly
ah shit.
this entire time I thought this thing was a struct
but it turns out it's actually a union
dang, inheritance won't help me here
 
@LucDanton Just write C++ vOv
hides
 
8:50 AM
but the 'same common sequence' thing for unions might save my day
 
The first rule of technicality club is: no information pertaining to technicality club can be created by one or more individuals and then by any means acquired by one or more individuals
 
@LucDanton per our previous discussions, this isn't UB right? (assuming the C API does the right thing with the union)
man I hate C APIs
 
@Rapptz It is. The two unions types are different.
 
meh
how?
 
One is ::stuff, the other isn’t.
I think something like union { stuff s; int x; int y }; might be fine, crazily enough.
As a bonus you pass &s, instead of relying on the guarantees for this.
 
9:03 AM
but now I don't have a common initial sequence?
 
The C API receives an actual stuff*. The CIS is necessary for the C++ side.
I.e. touching either x or s.x amounts to the same.
Crazy, right?
 
:s
 
Oh, CIS is for SL structs inside a SL union :(
 
the struct would only have the union + some member functions
6 mins ago, by Rapptz
man I hate C APIs
 
So… union { struct { union s; }; struct { int x; }; struct { int y; }; };… but that’s an extension! It also doesn’t work :Þ
 
9:06 AM
I think I'll pass ._.
I don't have an easy way out of this one
same issue as last time.. no warnings
 
Doesn’t work because e.g. struct { int x; }; doesn’t contain a stuff s;, so no CIS.
@Rapptz Aliasing warnings to the max?
 
yeah
 
Ah, type-punning through a union I imagine. It’s a common extension.
 
but type punning gives a warning for GCC
 
wat
 
9:09 AM
something like 'ISO C++ forbids type punning'
 
…through a union, right?
 
or something similar
 
It’s important :<
 
or reinterpret_cast
nvm I'm wrong about reinterpret_cast
 
it's illegal to type pun through a union but MSVC will never perform any optimizations based on that because all of their legacy code does it, and both GCC and Clang have an option to turn those optimizations off.
 
9:13 AM
30
A: Accessing inactive union member - undefined?

ecatmurThe confusion is that C explicitly permits type-punning through a union, whereas C++ (c++11) has no such permission. c11 6.5.2.3 Structure and union members 95) If the member used to read the contents of a union object is not the same as the member last used to store a value in th...

 
@Puppy No, GCC and Clang both gleefully pun through a union. But that on its own won’t defeat aliasing.
And if you do disable strict aliasing, it’s disabled for everything.
That being said, there’s always -Werror (or its opposite) and honestly there are loads of exotic warning options, at least for GCC.
 
Ye that’s punning through a union. GCC trusts you.
Also, you never access an inactive union member in your example.
 
yeah the C API doesn't either
I just wanted to cast from my_union_wrapper to c_api_union.
 
Damn -Wstrict-aliasing=n is tricky.
int main()
{
    union { float f; int i; };
    f = 18.22;
    return i;
}
^the simplest snippet to understand type-punning through a union: GCC will never complain about this one
 
9:23 AM
yeah that's what I used to test.
 
another day, another broken third-party dependency
why does everything suck so much?
 
is what I want to do actually impossible to do
I guess I should throw in the towel
 
Portably, yes it is impossible. Most people don’t care and live dangerously. There’s something about unions that make their users reckless.
 
@LucDanton Things like this can easily be done with memcpy() instead.
 
@VáclavZeman That won’t make you understand type-punning through a union ;)
 
9:30 AM
I'll just rethink the design.
 
> -ftemplate-depth=1000000
 
@jalf Because people can't program.
 
design rethought etc
I managed to get ~8.1k linker errors
it was unrelated though
I accidentally passed -static
 
@Rapptz lol
 
9:51 AM
Anyone have a dupe?
0
Q: Why do I need "this->" in derived tempate classes?

ThomasIt works fine for non-template classes (the below code with the "template" lines commented out and deriving from Base, not Base<T>. #include<iostream> template<typename T> class Base { public: int i_; }; template<typename T> class Deriv: public Base<T> { public: void foo() { // This...

 
._. where my ipython saved notebook go
 
why are the spellings of 'stack exchange' & 'stock exchange' so close
 
because I believe that was the pun they were going for
 
exchange stackoverflows?
 
9:57 AM
ooo, it’s sensitive to where you start the notebook from
 

« first day (1419 days earlier)      last day (3522 days later) »