« first day (1341 days earlier)      last day (3623 days later) » 

5:01 PM
No the idea is that I create a class derived from an abstract class that implements everything needed to do something when a Timer goes off and pass that to a Timer class....
 
user1804599
Just have it take a function. :v
 
@rightfold I've implemented that already, but I want it to be able to be more flexible.
 
user1804599
How is an abstract class more flexible?
 
more flexible than doing whatever you want?
 
user1804599
Does it have multiple members?
 
5:04 PM
See: http://coliru.stacked-crooked.com/a/f4c4be20142ec813
The idea is that you can pass any arbitrary data ( right now just an int, but later a void pointer or something ) to a TimerEvent and have access to that data from a POSIX signal generated from a timer....
 
user1804599
Ugh stop writing Java.
 
user1804599
Lemme rewrite that for you.
 
NOTICE: THIS WILL BE CRAP CODE.
 
user1804599
Huh, what the fuck.
 
user1804599
Your design is horribly broken.
 
5:07 PM
lol
 
@rightfold It's what I would do - a 'Tiimeout' base class with an 'OnTimeout(Timer timer) abstract method. Is that too javerish?
 
Generally when a POSIX signal callback is called you don't have access to user defined data.. So this is something I thought of to get around that issue...
 
Oh, signals:(
 
@rightfold How so?
 
user1804599
What is Timer?
 
5:08 PM
Isn't code running in signal handlers full of restrictions anyway?
 
user1804599
What does it exactly do?
 
@R.MartinhoFernandes Yeah - hence 'Oh, signals:('
 
user1804599
Does it invoke something after some time?
 
@rightfold Timer will eventually actually contain code to create a POSIX timer...
 
user1804599
Yes, and what else?
 
5:09 PM
I always thought signal handlers should just post work somewhere to be done outside the signal handler.
Or at least that was how my paranoid self did it in Operating Systems class.
 
@R. Me too
 
But I had some rum, so don't trust my judgement.
I should go home.
 
@R.MartinhoFernandes Yes, but I wanted to encapsulate that handler into a member function with access to some user defined data.. ie.. that data could be the mechanism of posting the event.
 
@R.MartinhoFernandes That implies that I would do anyway.
also, seriously, set an alarm or something.
 
@R.MartinhoFernandes write a char to a pipe
 
5:11 PM
I'm hungry.
 
@Chimera All of which is achieved just fine by std::function.
 
user1804599
@Chimera “the data could be the mechanism of posting the event” makes no sense.
 
write is async-signal-safe
 
@DeadMG I'm not working. I'm drinking rum.
 
oh right.
in that case don't bother going home
 
5:12 PM
In the workplace, but that's not relevant.
 
ah, how are people supposed to debug a shader >_<
 
Use a shader debugger.
I'm not joking.
 
I'm not drinking anything alcoholic this week except at those events where it is socially unacceptable not to. I have too many of those this week.
 
@MartinJames Do you ever to go any other kind of event?
 
@R.MartinhoFernandes where to get one
 
user1804599
5:13 PM
@Chimera coliru.stacked-crooked.com/a/d4e6126d05ee4109 maybe with std::function instead dunno what you want exactly.
 
user1804599
onTimeout can contain as much user data as the user desires.
 
@JohnPoison OpenGL or Direct3D?
 
@JohnPoison write debug values directly to color and look at it
 
I used this one before gremedy.com/download.php but it seems to be getting old now.
 
@R.MartinhoFernandes Hmm.. sometimes I go shopping, or on work trips. Other than that, I guess not:)
 
5:15 PM
@R.MartinhoFernandes OpenGL
 
if only unit testing for android wasn't such a chore to set up...
 
Oh, dammit. I forgot I am supposed to bring Blade Runner to watch at my friend's.
runs out the door
 
user1804599
Woo 2–2.
 
instead of making it easier with android studio, google made it even more of a chore and also a more of an undocumented chore
 
@rightfold ok thanks.. I will look into that method.
 
user1804599
5:16 PM
Speaking of programming, time to write more parser.
 
user1804599
And refactor this shit to use escodegen.
 
@doug65536 ah ( my values won't fit to color components
 
@rightfold How would I use that in a full program? I'm not yet verse with templates....
 
user1804599
auto timer = makeTimer([] {
   // this is called when timer fires
});
 
user1804599
You can also pass function pointers or other callables.
 
5:20 PM
@LightnessRacesinOrbit That was mean. :-)
@rightfold ok thanks.
 
> This is not the first time the Redskins name had come into question from an offensive standpoint
 
@LightnessRacesinOrbit Which is odd because the Native Americans don't think the term is disparaging.
 
lol, after almost 2 months, this kind of stuff looks even worse than I thought it looked before
 
lol; someone should proof read this article
 
         new Notification.Builder(ctx)
        .setContentTitle(core.getName())
        .setContentText(message)
        .setSmallIcon(R.drawable.ic_launcher)
        .setLargeIcon(null)
        .build();
 
5:22 PM
@Chimera tell that to the Native American that filed the suit
 
user3010322
@AlexM. I hate that syntax with a passion.
 
user3010322
But there's no alternatives, except maybe @Rapptz's kwargs
 
yeah, it's currently the "proper" way to build a notification with Google's APIs
google really loves concentrating on end results more than the quality of the building materials used
 
http://espn.go.com/nfl/story/_/id/9689220/redskins-name-change-not-easy-sounds

Not all Native Americans find it objectionable.
 
as long as something works, it's fine, even if it's ugly as fuck
 
user1804599
5:26 PM
Woooo 2–3.
 
@rightfold Would you mind mind writing a complete simple example program showing me how to use your template stuff? I'm still a bit unclear... I know it's asking a lot, so no worries if you don't want to.
 
user3010322
Using @Rapptz's kwargs, you could do...
 
user3010322
using named_args::Notifications:
Notification::Build(
Title = core.getName(), ContextText = message, SmallIcon = R.drawable.ic_launcher, LargIcon = std::nullopt );
 
user3010322
@AlexM. ^^ Like that.
 
user3010322
I think that's the syntax I'm going to be using when I make my GUI framework.
 
user3010322
5:27 PM
It's clear, concise, feels right, and will do initialization properly. I can probably change it from using Notification::Build to just using a plain constructor.
 
@ThePhD can you do something like that in java?
 
@ThePhD How easy is it to ensure the caller doesn't supply a keyword that isn't used?
 
it reminds me of C#'s named parameters
 
user3010322
@AlexM. Don't know. I would hope Java would have a feature like that.
 
like, for the function foo(int a, int b)
you could call it like foo(a: 5, b: 6)
 
5:29 PM
@Chimera No, I'm sure not all do. That would be ridiculous if 18 million people all thought the same thing.
 
user3010322
@ecatmur Very easy: kwargs uses variadic templates. The only things the function internals would respond to is the ones you tell it to.
 
user1804599
@Ven woo it works with escodegen.
 
user3010322
If you pass an invalid, it'd probably just get ignored entirely.
 
user3010322
@ecatmur Also, it's a typo but note this line:
 
@LightnessRacesinOrbit There's always room for question about whether he/they honestly find it disparaging, or just see an opportunity to get some easy money. And no, I'm not making an accusation, just pointing out an (admittedly obvious) possibility.
 
user3010322
5:30 PM
using namespace named_args::Notifications;
 
user3010322
This means the named args are put into a namespace for use.
 
@thecoshman I'm having buckwheat right now. I didn't know it was so delicious!
 
user3010322
If you don't include that specific namespace, you're not getting those named arguments unless you fully qualify it.
 
user3010322
This further allows you to separate out allowed from un-allowed arguments.
 
@ThePhD probably not
best I can do is wrap that builder thing in an easier to use function
 
5:34 PM
@JerryCoffin Of course
 
java feels so empty compared to C#
 
anyone use pycharm at all while developing in python? I am trying to figure out if there's a way to configure quick formatting like there is in vim.
 
seriously, nothing like delegates or function pointers
I have to go the other way around using interfaces to make events
like the listener implements an interface, and the broadcaster keeps a reference to a listener, and calls the appropriate messages when an event is supposed to fire
 
user1804599
Use Scala.
 
does Scala get turned into Java?
that might work with Android
 
5:38 PM
@AlexM. It runs on JVM, yes.
 
user1804599
@AlexM. You can use it with Java.
 
user1804599
@AlexM. No idea about Android.
 
user1804599
scalac generates class files.
 
The telkitties are playing well, but not well enough: Australia 2 - Netherlands 3
 
5:48 PM
@rightfold I'll take a look
 
this is not a deadline driven project so I can experiment with new stuff
 
@Rapptz yeah but Lua has closures
 
user1804599
If you’re into dynamic typing there’s also Clojure.
 
user1804599
And Groovy. Although I’m not sure how Groovy deals with higher-order functions.
 
Xeo
5:48 PM
/cc @StackedCrooked @ScarletAmaranth @AlexM. @Mysticial ^
did I forget someone?
 
@Xeo o_O
 
> the U.S. Patent Office released the news today that it is cancelling the trademark of the Washington Redskins, the NFL’s third most value franchise.
obviously, it's the VALUE of the team that matters here.
nothing else.
 
@Xeo never heard of gargantia before
looks cool
 
Xeo
whaaat
 
5:50 PM
the anime that is, I should probably check the game after checking the anime
is it really that famous?
 
Xeo
Didn't watch Suisei no Gargantia?
 
nope
 
@Xeo cool, I saw that anime
 
Xeo
I liked it
animation and character wise
 
neat, it's on bakabt
 
Xeo
5:51 PM
Though I probably would've preferred a more action-oriented story, it was still a fine anime
 
I'll give it a go
 
Seems that I missed a flamewar between jalf and nightcracker.
 
Xeo
@Mysticial You also missed NGNL being released.
Superb episode again, this week.
 
oh Xeo
you have to remind him each time, don't you?
 
@Xeo Yeah ok. Fuck you. :)
 
user1804599
5:52 PM
// val x = true; var y = await @x; return y; return;
const x = true;
let y = yield x;
return y;
return;
 
Xeo
@TonyTheLion もちろん!
 
user1804599
Yay for no more superfluous parentheses in generated code!
 
@rightfold seems Clojure for android is pretty mature clojure-android.info
 
Xeo
(of course)
 
also clojure is one of those lisp-y languages, neat
 
5:53 PM
@Xeo I don't read Japanese
 
Xeo
40 secs ago, by Xeo
(of course)
 
user1804599
ばんざい!
 
user1804599
We won!
 
There is absolutely no way Twitter will regret this http://twitter.com/DoubleJake/status/479319899358392320/photo/1
 
user1804599
5:54 PM
@LightnessRacesinOrbit Tumblr 2.0.
 
@Mysticial :)
@Xeo ah ok
 
@rightfold Huh I didn't know you played football! Well done.
 
Xeo
@Mysticial I like how all of your latest 'fuck you' are directed at me
 
user1804599
@LightnessRacesinOrbit “We” as in the team of the Netherlands, dumbass.
 
Xeo
Hm, I started with Ep3, eh?
 
@LightnessRacesinOrbit At least, when it's in your feed, you have to click the GIF to play it.
 
user1804599
@AlexM. Meh, if you have to do anything with Android you’re already screwed to death anyway.
 
Android is my only choice :( it's the only handheld OS that allows me to just randomly install .apks thus making it easy to write and test my own software at any time
I thought about iOS first but with that one I have to use iTunes, be a registered developer, and constantly keep the iDevice linked for the app to run (not sure about this last bit tho)
 
user1804599
I should watch The Matrix.
 
pity they never made any sequels
 
user1804599
6:00 PM
@AlexM. You can debug writelessly AFAIK.
 
user1804599
Anyway make a web app. It’s a slightly less terrible platform and works on all smartphones.
 
since the virtual assistant will be communicating with a server running on a PC, I thought about just turning the android counterpart into something that looks like dumb terminal
but that felt like way more work than needed
 
user1804599
A smart terminal disguised as a dumb terminal.
 
My vote for the new DC NFL team name. Via: https://www.etsy.com/listing/183161779/washington-redshirts-uniform-look-mens http://t.co/wP58YOXBH7
^ /cc @JerryCoffin
 
right now its main functions are to provide location and time based reminders, and some shopping list stuff
since this depends on the GPS stuff on the phone, I can't make the server do all the work
 
6:03 PM
old and you've all seen it
but I don't know if it said that at the time
 
Hey, the Netherlands won.
Again.
 
9 mins ago, by rightfold
We won!
@EtiennedeMartel Apt.
 
@LightnessRacesinOrbit Lol.
 
I always root for the Netherlands whenever there's a World Cup. Because I might as well take a side while I'm at it, and it's not like Canada ever stood a chance of participating in a football tournament.
 
Xeo
6:07 PM
Haha, finally, today's what-if
 
I'll just leave this here...
 
"how much actual real dinosaur is there in a plastic dinosaur?"
ha
 
@LightnessRacesinOrbit The fuck.
 
what the fuck
dynamic resource management and pointers in Haskell
 
Today nurse asked me if I wanted a new tetanus vaccine since my last one was over 10 years ago. I refused because I don't like injections. I'm stupid.
 
6:12 PM
I feel like I'm back to C
this is going to be such a pain in the ass
 
@Jefffrey yep
 
Haskell desperately needs an higher level input/output/audio/window library
 
@TonyTheLion This is so reddit.
 
kinda confused about rvalue refs
 
@Xeo actually, yesterday I received a 75 EUR donation from a unknown person
 
Xeo
6:15 PM
Cool
 
oh, 75% off on Aliens: Colonial Marines on Steam
 
@zounds you're not the first and not the last.
 
Xeo
@zounds Coliru or bust
 
xcode is saying the operator = in the last line is ambiguous
not sure why
 
6:17 PM
can one even assign to *this?
 
you can't assign to this
 
@zounds I assume because both are equally good match
 
user1804599
@TonyTheLion Uh, of course one can.
 
why would you want to?
 
hm, this makes me wonder, can you use std::enable_if inside operator=?
probably not
 
user1804599
6:18 PM
@StackedCrooked You can.
 
user1804599
I don’t see why you could not use std::enable_if inside operator=. :|
 
user1804599
It’s like asking whether you can use std::vector inside main.
 
so um,
i thought what i was trying to do was the move semantics version of copy-and-swap
 
@rightfold error: 'Item& Item::operator=(Item&&, std::enable_if<true>::type*)' must take exactly one argument
 
what's teh correct idiom?
 
Xeo
6:20 PM
@zounds swap automatically moves in C++11
 
ITT: Righfold is a noob
 
Xeo
and 'move and swap' makes no sense
@StackedCrooked return type, template parameter list
 
@Abyx Is that suddenly not shit?
 
user1804599
@StackedCrooked Look, that makes more sense.
 
6:22 PM
@EtiennedeMartel perhaps it is, but I'm a fan of Aliens
 
@LightnessRacesinOrbit We have an XKCDf eed, you know
 
@Abyx The game is utter shit.
 
@xeo the idea was to define the copy assignment in terms of the copy constructor and the move assignment
@xeo or else i'd have to manually write a copy assignment operator
 
@EtiennedeMartel okay =\
 
user1804599
@TonyTheLion Elaborate.
 
6:23 PM
It's buggy, ugly, barely playable, and the biggest insult to the franchise since Alien: Resurrection.
 
Xeo
@zounds copy and swap works fine for that
std::swap uses std::move in C++11
 
@xeo so, just use copy and swap, and the swap will on its own call the move? ok
 
Basically, they tried to scam their publisher of their money so that they could work on Borderlands 2 instead, and in the end had to kick the game out before it was done.
 
Ven
@rightfold grats ;-)
 
user1804599
I can now compile functions!
 
6:24 PM
gratz
 
user1804599
fn f(a, b, c) { val x = true; var y = await @x; return y; return; } generates the correct code.
 
@zounds A& operator=(A rhs) { this->swap(rhs); return *this; } // one operator= to rule them all
 
@rightfold You said the enable_if would work on operator= and it didn't by the error that was posted, so I assumed you had turned into a noob.
 
user1804599
And you can have an extra comma before the closing parentheses because that looks better when you have multiple lines.
 
user1804599
@TonyTheLion StackedCrooked is horrible at adding useful information to his questions.
 
6:25 PM
@StackedCrooked Why the this->?
 
@EtiennedeMartel for emphasis only
 
user1804599
You are able to use std::enable_if inside operator=, just not in this way.
 
Xeo
5 mins ago, by Xeo
@StackedCrooked return type, template parameter list
 
hi
 
6:26 PM
@rightfold I still think you are stupid.
 
@Xeo Yea I saw that, but I had posted and too lazy to remove it again.
 
@DeadMG Yeah, I know. However, I think it's clear from the constant reposts that just because you happened to be here when Feeds posted the latest XKCD, doesn't mean everybody else was. Besides, I would still have reposted it because I thought it was lols in that moment.
 
@LightnessRacesinOrbit why does she even have this job then?
 
hahahahah
 
6:28 PM
Those facial expressions.. (new king of Spain)
 
@LightnessRacesinOrbit you've heard the word perfect joke right?
 
@xeo ok i changed it to this and now xcode says it can't find a matching function call for swap
i included <algorithm>
 
Xeo
COLIRU OR BUST
3
 
yeah, and donate much monies
 
Xeo
also, default your move ops
 
6:30 PM
just write it in Wide
 
does Wide allow narrowing conversions
or what's in a name?
 
Ven
@Xeo you mispeled RIOT.
 
not implicitly.
 
@Ven s/mispeled/misspelled
 
Ven
@TonyTheLion you're not very smart, are you ?
 
6:32 PM
 
@Ven I don't know, but I know that I can spell.
 
@StackedCrooked Fix your assembler. :)
 
Ven
@AlexM. okay, I chuckled
 
@Mysticial My assembler is fine.
It doesn't accept blurts like vpxord %zmm0,%zmm0,%zmm0
It's not klingon you know.
 
That's not Klingon. It's x86. :)
 
user1804599
6:34 PM
Yay, async functions work now.
 
user1804599
:D
 
Ven
@rightfold y u no macro
 
user1804599
I don’t like macros.
 
user1804599
(Yes, I do know about hygienic macros and no, I don’t like them.)
 
@Mgetz that's two words
 
user1804599
// async fn f(p) { val x = p; return await x; }
let f = $lasagnascript$async(function* f(p) {
        const x = p;
        return yield x;
    });
 
user1804599
:3
 
@LightnessRacesinOrbit WordPerfect was before my time
 
@StackedCrooked It should be able to assemble it regardless of whether the processor can run it. :D:D:D
 
Ven
6:38 PM
@rightfold you going all lasagna on me
 
@DeadMG apparently klingon is a more accurate match than I realized
 
Ven
@rightfold when I think your feature would be one-line macros :/
 
user1804599
WTF
 
@Mysticial hm, this gcc was also compiled on my vps. perhaps that caused it to drop support for unsupported stuff.
 
user1804599
What is “my feature” and what is “one-line macros?”
 
user1804599
6:40 PM
Be clear please.
 
@StackedCrooked Ah. Or perhaps GCC just hasn't updated their assembler to support them yet.
 
@rightfold your feature is nsfw
 
hmm
 
user1804599
I should add an nsfw keyword that you can use to mark terrible code.
 
Ven
@rightfold your async stuff.
 
user1804599
6:43 PM
I don’t think async generators make much sense.
 
fuck breaking changes
 
Ven
Yay breaking changes
yeah at breaking ALL The things. In one go.
 
SDL 1.2 does not compile on Mavericks because Apple changed something in their C interface or something.
 
use SDL 2.0 chump
or better yet, don't use SDL at all
 
Ven
^
 
6:48 PM
bindings to SDL2 sucks on Haskell
 
Why are you using an outdated library that runs like ass?
 
they literally have pointers and CInt, CString and so on
 
Ven
Use csfml bindings Kappa
 
> in haskell
 
Also, wow, they finally have hardware acceleration.
 
6:49 PM
@Ven wat
I'm using Haskell
 
"SDL 2: now only a decade behind the times!"
 
SFML does not have binding for haskell
 
Ok thanks to @rightfold I was given some template code that I modified and now I'm getting compile errors that I don't understand... mostly I just don't fully grok templated classes yet.

http://coliru.stacked-crooked.com/a/0e3d6c5378b43ff9

What am I doing wrong in trying to return the "timer" in the CreateTimer() function?
 
Ven
@Jefffrey create them
 
Ven
6:49 PM
@Chimera what you're doing wrong ? Listening to @rightfold.
 
10 second search
 
@Rapptz nice
 
awesome
I would probably kiss you if you were here
 
Ven
All your monads are belong to us or some 2008 meme.
 
6:52 PM
and hug you
 
hey Jeffrey
 
hey
 
hows you?
what you been up to?
 
a snake game in haskell, rosalind problems, beer and uni
what about you?
 
work work work
 
@StackedCrooked did you use codespaces?
 
nope, first time I heard of it really
but the fact a hacker made them shut down their business is remarkable
 

« first day (1341 days earlier)      last day (3623 days later) »