« first day (986 days earlier)      last day (3964 days later) » 

Xeo
11:00 PM
STAHP THE PLINKS D:
 
template<typename F, typename Arg>
void call(F&& f, Arg&& arg) {
    [=]{ f(arg); }(); // can't use move or forward here
}
How should I capture F and Arg?
 
@Xeo plink
=p
 
Xeo
@MonadNewb fuck off :|
 
inb4 @MonadNewb plonk
 
Xeo
@StackedCrooked std::bind
 
11:02 PM
Ah, to enable move or forwarding..
Interesting. I first thought to avoid bind because of the type-erasure cost.
However, it must be use if Arg can be non-copyable.
I hadn't considered that.
 
what type-erasure cost?
bind isn't type-erased.
 
bind returns std::function, which uses type erasure... afik
 
nope
returns undefined type.
 
It doesn't return std::function.
It's implementation defined.
 
there's a std::is_bind_result or something like that.
and also
bind could never, ever return std::function.
 
11:04 PM
wow, some people are touchy around here today...
 
because it supports polymorphic function objects
fuck
why am I so afraid of vomiting
 
Emetophobia.
 
that's a thing?
 
@MonadNewb Feely yesterday, touchy today.
 
@DeadMG Yeah. I have it.
It's my only phobia.
 
11:06 PM
I totally get you
 
I guess my memory of boost::bind corrupted me.
 
@StackedCrooked They operated the exact same way.
 
I guess I just suck then.
 
so
if I go to my doctor and beg for the surgery, I wonder what the chances are that a), he would actually agree, and b), I would be left with chronic diarrhoea or other long-term unpleasant side effects?
 
user142019
Damn.
 
user142019
11:11 PM
Korpiklaani is such good music to wake up with.
 
@DeadMG a) I'd say about even odds. b) Very low (as long as you think in terms of "life is short", so side effects the rest of your life still qualify as "short term").
 
Xeo
Yay, using-aliases in VS13 RTM
 
lol
at this rate, the rest of my life is going to be very short
either my stomach problem will turn out to be cancer or something, or maybe I'll kill myself to stop suffering
 
user142019
> lol
 
11:20 PM
@BenjaminGruenbaum accepted answer: "Yes."
wut
 
@melak47 I flagged as not an answer
What a joke language
 
Ooh, I got "nice-answer". <3
 
@melak47 wtf? 151 upvotes for that answer, too?
 
@MonadNewb Java -_-
 
that user basically got all his rep from that
 
11:24 PM
@BenjaminGruenbaum umm...sure, that explains it
 
user142019
> TransactionAwarePersistenceManagerFactoryProxy
 
@rightfold That's why I posted it here, to show how awesome Java is, in case everyone was forgetting -_-
 
user142019
This stuff is either generated or the guys who wrote these classes are heavily brainwashed.
 
Meat Loaf (born Marvin Lee Aday; September 27, 1947) is an American musician and actor. He is noted for the Bat Out of Hell album trilogy consisting of Bat Out of Hell, Bat Out of Hell II: Back Into Hell and Bat Out of Hell III: The Monster is Loose. Bat Out of Hell has sold more than 43 million copies worldwide. After 35 years, it still sells an estimated 200,000 copies annually and stayed on the charts for over nine years, making it one of the best selling albums of all time. Although he enjoyed success with Bat Out of Hell and Bat Out of Hell II: Back Into Hell and earned a Grammy Awa...
dat name
 
user142019
Spring also has AbstractSingletonProxyFactoryBean.
 
11:33 PM
Front page HN. Nuked under a minute ago.
 
@rightfold You've got to be kidding me
15 mins ago, by Benjamin Gruenbaum
 
user142019
@BenjaminGruenbaum It is a "convenient proxy factory bean superclass for proxy factory beans that create only singletons."
 
@BenjaminGruenbaum damn, I missed it
 
@rightfold Holy shit , I'm abandoning all hope and going to drown myself now or something.
 
user142019
And this is why PHP > Java.
 
user142019
11:37 PM
Inconsistent terribleness > over-engineered bullshit.
 
user142019
SQLAlchemy is nice.
 
user142019
Especially its autoloading feature.
 
Yeah, I enjoy it :)
I think C# mappers are ahead though.
 
user142019
Never used them.
 
user142019
But as long as I cannot use my own schema I set up using SQL, I don't want it.
 
user142019
11:40 PM
RoR's ORM is so pathetic compared to SQLAlchemy it's hilarious.
 
@Mysticial is Google good/fun thus far?
 
@JohanLarsson yeah
 
they don't make you write java?
 
@rightfold Of course you can, you just add it to the project and it automagically generates classes for you with all the right relations. Also, it generates SQL on the fly but caches and compiles it - it's pretty sweet, you get to write functional style.
 
user142019
What if I change my schema?
 
11:43 PM
You run a file and it updates on its own
 
user142019
Can I add my own methods to the generated classes?
 
Of course, C# has partial classes
SELECT a.user,b.postTitle FROM dbo.users as a WHERE userid=15
LEFT JOIN dbo.posts as b on postid = 15
 
user142019
Awesome.
 
user142019
Three more questions: does it support PostgreSQL, can I use it with LINQ and what's it called?
 
Becomes:
Users.First(x=>x.id==15).Select(y=>new {user=y.user,post=y.post.postTitle});
 
user142019
11:44 PM
Okay, it supports LINQ. :P
 
Yeah, just plain ol' linq with C# lambdas
You can't do LINQ to objects and it has to be a lambda expression (and not a function)
 
user142019
Ah.
 
(Because it has to be able to convert it to SQL)
 
user142019
Seems logical.
 
You obviously also can't call methods from your program unless they're all expressions
 
user142019
11:46 PM
You cannot create expression trees from arbitrary methods.
 
Yeah, exactly
 
user142019
Does it support PostgreSQL? Because that's the only RDBMS I use. xD
 
Yeah, I'm stuck with mssql but afaik both NHibernate and EntityFramework support PGSql
(PGSql 7 and above iirc, but that shouldn't be a problem)
 
user142019
The last time I looked at NHibernate it required XML.
 
also it does not short circuit (x!=null && x.Name ="Johan") can * I think*
 
11:47 PM
Alchemy is pretty sweet too though.
 
user142019
I'd rather kill myself.
 
@rightfold Not since lambdas, what are we? Java coders?
I'd probably use Entity first, it's very simple to set up
 
user142019
If I can use EF with Mono and PostgreSQL I will use it.
 
I have no idea about Mono
 
user142019
> As of Mono 2.11.3, Microsoft's open sourced EntityFramework is part of Mono's distribution.
 
user142019
11:48 PM
:orgasm:
 
user142019
Let's check this shit out.
 
user142019
I like C# more than Python anyway. Also F#.
 
Lol, it has its problems, you have to watch for stuff like "select n+1" but that's true for every mapper. I always hand optimize the spikes into stored procedures.
Yeah, you can use EF with F# :)
 
user142019
How does the generation work? You just invoke a program that reads SQL and generates C#? :v
 
You get the POCO generator and run it
Apparently it's not even needed anymore
 

« first day (986 days earlier)      last day (3964 days later) »