« first day (1686 days earlier)      last day (3265 days later) » 

user1804599
2:00 PM
btw @Ven I read an incredibly good OTP tutorial yesterday.
 
@BartekBanachewicz Nope. No, that's not the same thing here.
 
@Jefffrey why? where's the differnece?
 
You are actually returning your monad, with your error context here.
So you can have your error context with and without logging.
So you are not "automatically" logging the error.
 
user1804599
I wrote a logging library recently.
 
Only if you call fail.
 
user1804599
2:01 PM
It was type Logger = Record => Unit.
 
@Jefffrey how else can you fail without calling fail?
 
Left "error" for example
 
@Jefffrey but you can do the same with exceptions!
it's identical.
 
No?
 
you can't return Either from a function that can throw?
you're "bypassing" the system by packing your own value in your own mechanism
 
2:03 PM
fail "error", in the Either monad returns Left "error". And you can return Left "error" directly, without passing via fail.
 
user1804599
I like Go's way of error handling.
 
@Jefffrey that's a different monad, clearly.
 
@BartekBanachewicz What. I'm using the monad they way I'm allowed to. And the monad is the exception mechanism. It's not the same as ignoring the whole exception mechanism at all.
 
I thought you meant MyMonad (Either ...)
 
user1804599
ٳٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٳٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٳٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٳٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٳٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰٰ
 
2:04 PM
@Rerito Ping me when you have it, hopefully I can help
 
@Jefffrey so don't add Either to that. Assume you're in my logging monad.
 
@rightfold I wonder if using similar tricks it is possible to strike part of another user's message
 
I'm talking about Either. Say you want to prepend the string "Error: " to your error message (instead of logging). Same functionality, just easier to talk about.
 
Why are you talking about Either.
 
Your monad is Either String Int.
 
2:05 PM
It represents a different approach to what we talked about.
 
That doesn't represent an error context?
 
that's a different error context to what I had in mind
that's a monadic wrapper over an explicit error context
 
What did you have in mind.
 
user1804599
@AndyProwl what do you mean with "strike"?
 
@AndyProwl coliru.stacked-crooked.com/a/23810f9685a0e703 Unfortunately, I cannot reproduce the "file stuff" that breaks things up
 
2:06 PM
@Jefffrey Well, a trivial example would be BartekEither where constructors aren't exposed, for example, to combat your idea.
 
@rightfold strike
 
@rightfold like this
 
user1804599
:p
 
user1804599
Perhaps.
 
Hopefully you'll get my problem from the comments
 
2:06 PM
you only get return and fail
 
user1804599
fail is an epic fail.
 
@BartekBanachewicz Great. Then I can log my exception via a factory function make_exception which logs the error and then returns the exception object and can be used via throw make_exception(...);
 
@Rerito Do you know the required specializations in advance?
 
Yes
 
And I don't expose the exception class.
 
2:07 PM
@Rerito then you can use explicit instantiations
 
user1804599
Only works with exceptions you construct yourself.
 
I was slacker today whole day
 
@Jefffrey what if you want that factory to be stateful? You'd need to pass the instance around. That brings you closer to monads, but starts to become painful.
 
time to go home
 
@rightfold Yup. Same as BartekEither.
 
user1804599
2:08 PM
@BartekBanachewicz thread-local!
 
Can you show me? I thought full specialization of function template wasn't possible when nested in a class template
 
@BartekBanachewicz What do you mean by stateful? And how is that painful?
 
Ell
one of my uni choices sent me chocolate in the post
 
user1804599
 
@Jefffrey let's say that every fail in a given factory appends the number of failure too
how do you access such factory (it can't be static now)?
you'd need to dependency-inject it
 
2:09 PM
Just have a static int x = 0; and then x++ in your make_exception.
 
37 secs ago, by Bartek Banachewicz
how do you access such factory (it can't be static now)?
 
Why can't it contain a static object?
 
because you might want different counters for different parts
you can do that with monads obviously.
 
Can you make an example? I'm not sure I follow.
 
@Jefffrey Just assume that the factory can't be static.
 
2:11 PM
@Rerito Not talking about full specialization, but explicit instantiation. Like this:
 
You can pass an enum to make_exception that will take a type of counter and it will use one of the static counters inside.
 
template class Blob<int>; // Explicit instantiation of class template
template int Blob<int>::blib(bool); // Explicit instantitation of member function
You have to put these in the .cpp file where the definitions are visible
 
@BartekBanachewicz That's an arbitrary limitation. How do you justify that?
 
Trying it right away
 
@Jefffrey then that's limited to compile-time number of counters. What if I want a runtime number of counters?
@Jefffrey The example is far-fetched anyway and I know that, but that doesn't make my point invalid.
What I'm trying to show is that monads are strictly superior to exceptions
 
2:12 PM
@Rerito (more info)
 
Everything you can do with exceptions you can do with monads but not vice versa.
 
@BartekBanachewicz Then store a static std::vector<int> of counters inside the function.
 
Ell
why not vice versa? (or is that in the transcript?)
 
@BartekBanachewicz We have yet to see about that.
 
and if you pass an instance of Exception factory function then you have a monad
 
2:13 PM
@Ell Not yet, it's not.
 
@Jefffrey that's pretty much the same as just passing the instance
 
Passing what instance?
 
which, yes, gives you the same options!
but.
@Jefffrey a particular instance of a factory object
that creates and throws exceptions.
 
It only creates exception objects.
It doesn't throw them.
 
if that object has higher-order functions then it essentially becomes a monad
whatever. You can extend that to throwing
that's how you get to the same functionality as monads
 
2:14 PM
That's pretty terrible.
 
but it gets unwieldy, painfully explicit...
 
@AndyProwl Can go with external instantiations, too.
 
@Jefffrey exactly.
 
@BartekBanachewicz No, I mean your proposed solution.
 
So you can just dump the whole idea, use monads, get clean code with all that power.
 
2:15 PM
Not the exception mechanism.
 
@Jefffrey there's no other solution.
 
@BartekBanachewicz woah woah there man.
 
Simply put, what you're proposing is more limited.
 
user3790646
lol my mom is talking with her boss about shemales
 
@BartekBanachewicz Yes there is. It's called "don't throw inside make_exception". And we have been discussing it until now.
 
2:16 PM
there's no "programmable semicolon"
 
@AndyProwl Perfect this is exactly what I needed, problem solved. Thank you!
 
@LucDanton extern you mean?
 
@BartekBanachewicz No, you have yet to prove that.
 
yeah
 
@Jefffrey oh come on, really?
 
2:16 PM
@Rerito No problem
 
sigh, okay, well.
@Jefffrey Are we past the staticality of that factory yet or do I have to go back to that too?
 
Ven
@rightfold fwiw, it seems hatsu would love to chat again with you, hehehe
 
@BartekBanachewicz Yes. You just took my "that's pretty terrible" from the context of your proposal of "throwing exceptions inside make_exception" and tried to turn it around as if I was confessing that exceptions are terrible.
That behaviour is pretty terrible too.
 
@LucDanton Aren't those just meant to prevent implicit instantiations?
 
@Jefffrey what you proposed was a static mutable variable which was as bad vOv
 
2:18 PM
No.
 
@BartekBanachewicz Oh dear master, please will you go back to that too? My peasant brain have yet to see how that's irrelevant. Please, master. Go ahead.
 
I'm confused
 
@Jefffrey When you said vector<int> did you mean an int key?
 
> An entity that is the subject of an explicit instantiation declaration and that is also used in a way that would otherwise cause an implicit instantiation (14.7.1) in the translation unit shall be the subject of an explicit instantiation definition somewhere in the program; otherwise the program is ill-formed, no diagnostic required.
 
What's an int key.
 
2:19 PM
6 mins ago, by Jefffrey
@BartekBanachewicz Then store a static std::vector<int> of counters inside the function.
this.
In short, how would you use that vector?
 
Seems to me the extern declaration isn't enough
 
That doesn't answer "What's an int key?"
 
@Jefffrey if you answer me you'll answer both questions.
 
@BartekBanachewicz Depends on how you want to choose which counter to increment.
 
@Jefffrey can I assume I specify that by a position in said vector?
 
2:20 PM
For simplicity I assumed an integer or an enum. But if you want you can have std::unordered_map or whatever.
 
@Jefffrey so an integer is a key to get that counter, am I right? (in the vector example)
 
user1804599
@Ven ok :V
 
Yeah, std::vector<int> is accessed via an std::size_t key. Just as well as std::vector<std::string> is.
 
user1804599
I'll be BBQ'ing the whole evening. vOv
 
Arrays in general are accessed via a std::size_t key.
 
2:21 PM
@Jefffrey okay. What if I wanted my key to be MyFactoryObject*? Can I do that?
 
Sure. std::unordered_map<MyFactoryObject*, int>. Dunno why you call that MyFactoryObject though.
Or std::map<...>
 
How do you guys feel about the 'in' 'out' and 'inout' qualifiers in glsl
I think they are pretty cool
 
@Jefffrey Oh brilliant. Could I skip the map though and just access the instance via pointer dereference instead of map lookup?
 
Why don't you want a map lookup?
 
that map is really funny
 
2:23 PM
@Jefffrey Why would I want it?
 
std::unordered_map has basically O(1) map lookup.
 
user1804599
Maps are functions!
 
@Jefffrey So does pointer dereference, no?
 
@Prismatic about the same as I feel about microsofts In Out annotations. meh.
 
Yes. So I don't see why you want to restrict yourself to using the pointer instead.
 
user1804599
2:24 PM
out parameters are nice.
 
@Jefffrey But I could do that?
 
@rightfold NO
 
user1804599
I wish Scala supported taking by-reference.
 
@LucDanton Just to be sure, you're not confusing it with the no-longer-existing export thing, right? Sorry if it sounds like I'm underestimating you but I really don't understand how an extern declaration would be enough
 
why not just return, rather than having out parameters?
 
2:24 PM
I like the idea of in parameters being implicitly const
 
@BartekBanachewicz I honestly don't know. What's your point?
 
user1804599
There are places where tuples are inconvenient and out parameters are convenient.
 
@Jefffrey I would be essentially Dependency-Injecting the Exception Factory into my code then, right?
 
inconvenient syntactically?
 
@rightfold surely thou jesteth
 
2:25 PM
What the fuck
How did you even...
 
I tried to go slowly to make you realize that.
 
@BartekBanachewicz is bartek writing java
 
user1804599
Dependency injection is good.
 
user1804599
Consider the following.
 
@Jefffrey there's no difference between having an integer key to a static map and having a pointer to an instance.
 
user1804599
2:26 PM
Classes are factory functions.
 
except the map is a totally not needed complication you overengineered
 
user1804599
Single-method objects are functions.
 
No, my astonishment is how the hell did you just moved from std::unordered_map<T*, int> not being able to access the counter without a direct access (for which you have yet to give a reason not to), to "you need dependency injection" then.
 
user1804599
Single-method classes are curried functions!
 
@rightfold if you can pattern match on return, doing (_, ham) <- stuff kind of thing is dandier than out params
 
2:27 PM
@Jefffrey There's no design difference between using that T* to access a static map and using that T* to access the object directly, except you don't have to use the (completely useless) map.
Is that still unclear?
 
user1804599
DI can be achieved with curried functions!
 
The map is used to map some kind of identifier to one of the counters you want to increment per exception.
 
I think I felt like using out params once
there was this collection I had to iterate through to populate two other collections with different items
 
@Jefffrey why don't you simply pass a pointer to that counter instance then?
 
What counter instance?
 
2:28 PM
but I think in the end I went with std::foreach that gets a lambda that captures both collections by reference
 
@AlexM. that's partition and transform
 
The counter is just an int.
 
@Jefffrey so an instance is just an int. So the pointer to it is int*. Why don't you just pass that?
 
user3790646
virtual inheritance didn't solve my "kind of" diamond problem
 
Why bother with the map at all?
 
user1804599
2:29 PM
@ScarletAmaranth define "transform".
 
@BartekBanachewicz Pass what to what?
Pass the int* to the exception factory function?
 
@rightfold fmap on list functor kind of transform
 
std::foreach(some collection, lambda {
    if (some element condition {
          add to first collection;
    } else {
          add to 2nd collection;
    }})
 
Ugh VMware Tools can change /etc/network/interfaces, but don't reload the fucking interface
 
user1804599
@ScarletAmaranth What if the output for one value depends on earlier values in the collection?
 
2:29 PM
@Jefffrey If you used a map, you'd need to pass the map key to the exception factory. Alternatively you can pass a pointer to the counter.
@Jefffrey yes.
 
user3790646
@AlexM. There's a missing semicolon?
 
fuck it I hate indenting
 
@BartekBanachewicz You can have the map being a static object inside the make_exception function.
 
user1804599
@AlexM. (a, b) = partition(xs, f)
 
@rightfold then it would fail :) but hey look, Alex has just posted what he had meant!
 
2:30 PM
@BartekBanachewicz You said you wanted an example without dependency injection.
 
@Jefffrey where do you get the key from then?
 
What the fuck man.
 
@rightfold is that C++
 
@AlexM. that's partition
 
user1804599
No.
 
2:30 PM
you still have partition in C++
 
user1804599
But you can trivially implement partition in C++.
 
@BartekBanachewicz From the parameter to the function?
 
there IS partition in C++
stable_partition at that
 
user1804599
It would take two input iterators and two output iterators and a predicate.
 
std::partition - non-stable partition
 
2:31 PM
@Jefffrey Now I'm pointing out this example is functionally equivalent to dependency injection, but more convoluted.
 
Also use ranges
 
@BartekBanachewicz Then passing any argument to any function is dependency injection.
 
you are trying to work around the fact that you actually have to DI by a totally nonsensical (sorry) way
 
What. The. Actual. Fuck.
 
user1804599
2:31 PM
@ScarletAmaranth incredibly wrong.
 
user1804599
That's partition f x & uncurry (++)
 
@Jefffrey well, if it's used in a static map<Object*, Object>... that's what RAM is. You pass a pointer, you get a value. No?
 
lolwat
 
That static map is equivalent to a regular variable. You're not escaping from DI, you're convoluting and overengineering its presence
 
@ScarletAmaranth I'll try it the next time I'm in its neighborhood
AYYYYYYY
 
2:32 PM
@rightfold huh? since when does it ++?
 
Why would you use a map there?
 
@Jefffrey Precisely.
 
When you have a pointer to the object.
 
user1804599
> Reorders the elements in the range [first, last) in such a way that all elements for which the predicate p returns true precede the elements for which predicate p returns false.
 
PRECISELY WHAT
 
user1804599
2:32 PM
Alex wants to populate two collections as can be clearly observed from his example.
 
Precisely you wouldn't. That's my point.
 
user3790646
I'm having a problem when deriving a class...
 
but then you're having DI
 
ugh... 1500 lines and my editor is getting sluggish
 
@rightfold that's why I said "followed by transform", although that should be followed by copy or he can use copy_partition which I believe does that
 
2:33 PM
You are coming up with terrible examples, and when I point out how terrible your examples are and that nobody would do that you say fucking "exactly" or "precisely".
 
@rightfold so partition then put one partition in one collection, and the other in the other :p
 
and if you're having DI then you're taking what a monad does and making it explicit.
 
@Prismatic That's not(-yet) usable editor then
 
user1804599
DI is good.
 
@Jefffrey Don't get angry at me, I'm trying as best as I can. Do we agree that a map was a retarded idea?
 
2:34 PM
@BartekBanachewicz Given auto fn = [](int i) { return i + 1; }, is 12 in fn(12) what you call "dependency injection"?
@BartekBanachewicz No.
 
static whatever is a retarded idea.
 
Your specific case is a retarded idea.
Not std::unordered_map<someidentifier, counter>.
 
Oh well.
 
Too many implementation details
 
user1804599
DI is a fancy word for partial application.
 
@milleniumbug I am trying right.
 
user3790646
oh damn object slicing is killing me.
 
@milleniumbug Imusing QtCreator. I think its a bug since I've worked with larger files and it wasn't slow before
 
but I think @Jefffrey just got angry at me at this point
 
user1804599
Which is the same as constructor application, since constructors are curried functions.
 
2:35 PM
for whatever reason
well.
 
@BartekBanachewicz I see. Well, I'm trying to learn Haskell too, so I'm bit interested in this discussion.
 
Because it's fucking fifth time you are trying to win the argument by completely revolting everything.
 
Ell
I don't think it's about haskell
 
And it's fucking insulting.
 
I wasn't trying to win an argument
 
user3790646
2:35 PM
calm your tits
 
Ell
it's about exceptions vs Either as far as I can tell
 
I was trying to explain something you don't understand to you.
 
@rightfold constructors are curried functions? curried to what? the type of object they're constructing?
 
@BartekBanachewicz lol, ok we are done.
 
If you find that insulting, oh well.
People pay me to explain things to them. I just wanted to do that to you because I consider you a friend.
 
user1804599
2:36 PM
> I totally love Ruby on Rails.
 
user1804599
Blog post ignored.
 
Ven
@rightfold what was it
 
Instead, what I get is you becoming insulted by the fact I can know more than you about something or understand something better.
 
@rightfold lol
 
2:37 PM
I didn't even see Bartek's example code
 
Ven
@rightfold oh yes, read it a long time ago
 
@milleniumbug I didn't write too much of it.
I can write an example if you want
I think Javascript would be nice for it
 
user1804599
@ScarletAmaranth T(x) creates an object, and objects are functions.
 
user3790646
@BartekBanachewicz c++ is life, c++ is love
2
 
Monads in JS have the very specific property I wanted to showcase here
Specifically this.
and how it can bounce between being explicit and implicit.
 
I'm a bit slow, are there monads in JS?
 
@AndreyErick and this is relevant to what I said how?
 
user3790646
calm down boy
 
Ven
@milleniumbug a monad is anything that satisfies the 3 monadic laws
 
@rightfold I don't understand what you mean by the "curried" part tho; as in, why would constructors by specifically curried already?
 
2:39 PM
@milleniumbug Well, there are (sorta) implicit contexts in JS. And those contexts are a tad closer to monads than typical OOP instances. Have you read my article about monads expressing context?
 
user1804599
@ScarletAmaranth curried functions are pretty much functions that return functions.
 
Ven
@BartekBanachewicz and fuck eta-expansion, right??
 
Bartek link pls
 
> Solution: Think in bed, fap in shower. All your problems washed away.
protip from Alex M: use menthol based shampoo
 
@BartekBanachewicz Not yet, is it this?
 
2:40 PM
@milleniumbug yeah @Blob
 
Ven
"monad tutorial" =(
 
Real talk Lounge how long do you think it'd take to become pretty good in JS
 
Ven
just teach people monads are laws
 
user1804599
class T { private int x; public T(int x) { this.x = x; } public int apply(int y) { return x + y; } };

T :: int -> int -> int
T(42) :: int -> int
T(42).apply(12) :: int
 
@Ven yeah shouldn't call it that
 
Ven
2:40 PM
@Prismatic not long
 
user1804599
It's just hideous syntax but otherwise completely equivalent.
 
Maybe I should write a followup article about how the context idea translates to exceptions
Would anyone be interested in reading that? I already know @Jefffrey wouldn't.
 
By pretty good I mean working on fairly involved JS projects like Cesium
 
@BartekBanachewicz I am.
 
@rightfold I understand how currying works; it's just you can have the equivalency of f : a -> b -> c to something like f : (a, b) -> c (the uncurried version), at it would still be a valid constructor... or wouldn't it?
 
user1804599
2:42 PM
@Ven the best monad tutorial: hackage.haskell.org/package/base-4.8.0.0/docs/… (after the first few sentences)
 
@Prismatic That depends on whether you're smart enough to realize you don't want to write JS first.
 
user1804599
@ScarletAmaranth sure.
 
user1804599
Functions are value constructors!
 
that I agree with
 
@JerryCoffin Its all just degrees of things I don't want to do. I don't want to program at all if I can help it :p
 
2:42 PM
@rightfold You stopped recommending your monad tutorial "1. Just fucking use them."?
3
 
user1804599
OOP constructors are also value constructors!
 
Ven
@Prismatic o-o why?
 
but I don't understand why you said that "constructors are curried functions", why specifically curried?
 
This is cesium btw: cesiumjs.org
 
user1804599
> js
 
user1804599
2:43 PM
terrible
 
http://stackoverflow.com/questions/30532448/what-is-the-name-of-cmakes-default-build-target

Easy cmake question :)
 
@Ven Because programming sucks? Idunno man, to me its just a means to an end. I don't really get any satisfaction out of it and I'm not one of those people that get caught up in the 'beauty' of elegant solutions (re: @rightfold)
I like the end result but the journey isn't that exciting imo
 
Ven
Fair enough, to each their own. I enjoy writing code :)
 
Give it few more years
 
I used to be a rightfold some time ago
now I'm mostly focused on how the product will look like at the end
 
user1804599
2:45 PM
Wrong.
 
user1804599
You never were as awesome as me.
 
as long as I get my result it's ok
 
Ven
@AlexM. what's wrong with having a little fun during the journey? :)
 
nothing
 
Ven
if programming is going to be my job, I want to enjoy it.
 
2:46 PM
There's no time for fun
 
Ven
there's always
 
that's why I keep on exploring and learning stuff
 
lol
You can't spell deadline without dead
 
also, back to the JS question. Anyone worked with it long enough to provide a timeframe on how long it takes to be strongly competent in it?
 
6 hours
 
Ven
2:47 PM
@Prismatic which languages do you know?
 
And that's mostly learning that this is crap
 
it's just that I only focus on how things look like on the inside as long as they don't have a negative impact on the end result
 
Yay, my pizza arrived.
 
user3790646
your what
 
if something takes too long to do in one way, I just choose the compromise
 
2:48 PM
@Ven rip
 
Ven
@AlexM. sure :). I think there's something inbetween
 
@milleniumbug I want one too
but I have to sit here for
actually not for that much longer
today went by fast
 
Ven
You only need to learn about prototypes if you never did any Self (or languages using prototypal inheritance), how this works (+ eta expansion), and that this shit is verbose.
 
@Ven I said that once. I was disabused of that idea rather quickly
 
Ven
@TonyTheLion Cool. I already worked tho. I have an idea of where I'm going
 
2:49 PM
@Ven A little bit of C and a little bit of C++
 
Ignore prototypes, use a library that hides this nonsense
 
I'm not a beginner in either language, but good enough to have a rough idea of what I don't know, if that makes any sense
 
Ven
@Prismatic get used to non-static types, eh.
@CatPlusPlus or much better – don't use OO!
 
Open types are shit
 
Ven
you'll make the camlers cry.
 
user1804599
2:50 PM
camltoe
 
Ven
rightfold psl
 
I hope that’s relevant to the conversation, I couldn’t pay full attention
 
Ven
it is
 
yay I found a practical use for std::bind for the first time :D
 
@AlexM. you shouldn't have; replace with polymorphic lambdas
 
Ven
2:52 PM
replace with asm
 
isn't that a C++14 feature
 
don't be a wuss
 
we'll probably switch to C++14 in 10 years
 
@BartekBanachewicz No Bartek. I was not angry at you because I think you know more than me about something. I was angry at you, again, because you become condescending to people. And this time not only that, but you were also twisting my phrases in such a clear way that it was astonishing. Truly astonishing.
Today I made the mistake of entering a discussion with you, and this resulted in a complete waste of time on both ends. And as always I keep forgetting why I shouldn't do that in the first place.
 
user1804599
2:52 PM
Condescending Bartek.
 
user1804599
lol angry on internet
 
@LucDanton Oh, sure, but there you do have the explicit instantiation as well (in hello.cpp). At that point I don't think it makes any difference if you just remove the extern declaration
 
Ven
funny how the "load more" loads no more of that drama.
 
@Jefffrey Again, I wasn't really discussing at the end. I was trying to present my point. You, otoh, took that as a personal attack again.
 
@Jefffrey jeffrey bambino
imagine if you turned the effort of writing that shakespearian novel
into effort of eating pizza
 
2:53 PM
@milleniumbug envy++
 
@BartekBanachewicz You fail to see what I mean, yet again.
 
user3790646
@AlexM. +1
 
@AndyProwl ewww; what if envys default constructor takes 7 minutes to execute?
 
@ScarletAmaranth I knew someone would come up with that :D
 
@AndyProwl Try it.
 
2:54 PM
@AndyProwl ^^ - couldn't resist :D
 
@ScarletAmaranth I think lambdas would've worked here too, even regulars
 
@AlexM. then use that; well, or to put it differently: I personally think it's clearer
 
I really just used bind to bind this to a member function to store inside a std::function<void(void)>
 
why I'm getting this error Parsor Error Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CSASPNETSearchEngine.Default" %>
 
but I could've stored a lambda in the function anyway
with this captured
@ScarletAmaranth 2late4dat now deadline today
 
2:55 PM
@Jefffrey I think you're a bit too harsh when it comes to anyone explaining anything to you. I'd really like for us both to get out of that smarter. That's why I asked so many "why" questions, which you weren't really able to answer. I had to construct an ad-hoc example of a concept I knew you don't fully understand as it is, which in turn appeared twisted in order for me to somehow show you the correspondence between what you wanted and what, in general sense, become an explicit context.
 
Some day in the future you'll realize you are not as special as you think you are, and you'll begin to actually listen to people. I'm sure of that. It will be painful at first, but then it will open a whole new world for you.
 
@AndyProwl what?
 
@AlexM. How did you capture this out of curiosity?
 
it was a quick fix that made something run on a separate thread
 
1 message moved from JavaScript
MY BAD
damn seach lag and touch pad
selected the wrong room
 
2:56 PM
@melak47 envy++ vs ++envy
 
user1804599
get out
 
@Jefffrey Now you're just being mean, and I don't think I deserve that.
 
@LucDanton by calling std::bind inside a method that had this available
i.e. a member
 
@rlemon You saying C++ and C# are equivalent?
 
Ven
 
2:57 PM
@BartekBanachewicz Let me ask you something. I promise I won't enter this discussion again, and you win. Do you truly believe, what you just said there? I want you to take few minutes and really think about what you just said and then tell me yes or no.
 
@Zirak they are all a subset of C, which, as we know, is just Java simplified.
 
@AlexM. The particular syntax (just for this, not the other parameters if any).
 
does anybody knows the name of cmakes default build target?
 
user1804599
iex(1)> {:ok, agent} = Agent.start_link(fn() -> 1 end)
{:ok, #PID<0.67.0>}
iex(2)> Agent.update(agent, fn(x) -> x + 1 end)
:ok
iex(3)> Agent.get(agent, fn(x) -> x end)
2
 
user1804599
oh my god mutable variables!
 
2:57 PM
the docs are horrible
 
@LucDanton std::function<void(void)> f = std::bind(&Foo::doSomething, this);
 
@Jefffrey The answer is a firm yes.
 
like here
 
42
Q: Using generic std::function objects with member functions in one class

Christian IvicevicFor one class I want to store some function pointers to member functions of the same class in one map storing std::function objects. But I fail right at the beginning with this code: class Foo { public: void doSomething() {} void bindFunction() { // ERROR ...

 
2:57 PM
@LucDanton I tried it and it works as I expected. Am I to blame VC12?
 
@BartekBanachewicz Ok.
 
Optional is not a bad interface in Java, shame I have to shoehorn an equivalent for Java 7
but apart from lack of sugar, seems to work fairly well
 
@Jefffrey Note I how actually remained calm this time, during the whole discussion.
 
@AndyProwl If you can put with it, you can try on Coliru.
 
user1804599
 
user1804599
2:58 PM
Fascinating.
 
@BartekBanachewicz Yes, because I tend not to subtly insult people that are discussing with me.
Well, "subtly" is not proper here. I think you might have thought that's subtle, but it really wasn't.
 
@Prismatic can I play anything there
 

« first day (1686 days earlier)      last day (3265 days later) »