« first day (585 days earlier)      last day (4349 days later) » 

3:00 PM
… works
thanks
 
Yeah, I remember sharing that here a few weeks ago.
 
I also like how the Feckers Fleckers keep responding without raising many eye brows
 
So, what is this new fancy auto () -> function syntax good for except for maybe declaring return type for lambdas ?
 
@ScarletAmaranth If you want to use the parameter names in a decltype for the return type, for example.
 
3:03 PM
The third point can be solved rather elegantly by using a make_array function, similar to make_pair etc. Hat-tip to @R. Martinho. — Konrad Rudolph 10 secs ago
 
@RMartinhoFernandes Ooooo, dat makes sense, one time pass compilers are dumb :)
 
auto f(T x, T y) -> decltype(x + y) { return x + y; }
 
@RMartinhoFernandes Right, thanks :)
 
@ScarletAmaranth LOL, what a timing. Look at the link I just posted, there’s an example for you
 
@KonradRudolph What guild of sorcery are you in ^^ ?
 
3:04 PM
@KonradRudolph Oh, gawd so many typenames.
 
:q wrong window
 
I think C++ is losing it's <bazooka++> charm with all these nice generic factories. We are in need of a grow_pair utility function.
 
I'm too used to aliases.
 
Mother of god, that's a good stack of templates you have got there @KonradRudolph ... :)
 
auto xs = array(1, 2, 3); // PHP in C++!
 
3:06 PM
@sehe To be honest, I find those endlessly nested templates horribly convoluted and complicated. When I’m not writing them myself (and the make_array return type is a simple example!) I don’t understand them at all
 
@KonradRudolph Aliases man, aliases.
 
@RMartinhoFernandes Aliases o_O ? Fancy to elaborate :P ?
 
@RMartinhoFernandes And yes, having aliases instead of structs with nested typedefs would help a lot. Missed opportunity for the standard library. :(
 
@KonradRudolph std::grow_pair to the rescue.
 
Aliases man? Is that a super hero?
 
3:07 PM
template <typename... T,
          typename Result = std::array<Decay<CommonType<T...>>, sizeof...(T)>>
Result make_array(T&&... values) {
    return Result {std::forward<T>(values)...};
}
// OMG, it's readable again!
 
@RMartinhoFernandes You're a friggen genius :)
 
@Pubby We can suggest it to Doug Savage.
 
Hello :) C++ crew, do you by any chance know if I can wrap a visual c++ project in order to have it as an APK for Android?
 
@RMartinhoFernandes OK, why use the default argument instead of auto ->?
Also, it really rubs me the wrong way that you’re breaking the c++stdlib’s naming convention
 
@PaulinaD I do ;)
@PaulinaD Except for i'd have to flood this chat ...
 
3:10 PM
@Scar
 
What's c++stdlib's naming convention?
 
@ScarletAmaranth Aaah, don't think the other ppl would enjoy that :/
 
@Pubby lowercase_with_underscores
 
@KonradRudolph Spares the repetition in the body.
 
unfair!
cheater
 
3:12 PM
Oh, I didn't notice the Decay stuff. I thought you were talking about the template parameter name.
 
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
 
@KonradRudolph It helps to make it clear those are the typename T::type aliases.
 
(clutters the interface though … but that’s not a strong enough argument)
 
@PaulinaD @ScarletAmaranth You can get a room
 
braaainfuuuck
 
3:12 PM
I think common_type would be confusing there.
 
@sehe kinky!
 
@RMartinhoFernandes Namespaces, bitch!
 
I have never really understood what common_type even does :P
 
hahaha
 
Returns common type.
 
3:13 PM
@CatPlusPlus Shocker :)
 
Names. How do they work.
 
@KonradRudolph Well, me and @Luc we went back and forth for a while about naming convention and settled upon snake_case for stuff that needs ::type in front, and PascalCase for stuff that doesn't. The idea was stolen from Bjarne's slides on GN, btw.
 
@Neil Oh well, hello to you too
 
:3820666 Just saying hello
@sehe Ahha, what did you think it read before? :)
 
@ScarletAmaranth std::common_type<int, double>::type is double. Does that make anything clearer?
 
3:15 PM
@RMartinhoFernandes Ah, but Bjarne never had any regard for standard C++ naming conventions
it pervades all of his books
 
@Neil I accidentally copied 'Neil' into my console window, so it said Neil Hello world
 
Well, I think having a way to clearly distinguish those two kinds of entities helps.
 
@RMartinhoFernandes So it basically finds a type that can represent both of the datatypes ? Can you pass any two types ? Or n types ? And it will choose one of them ?
 
@sehe I guess that would have made me a narcisist :P
 
@Neil narcisist? Someone who cuts sleeping person? Cuts himself while sleeping?
Someone who cuts sleep. I get it
@KonradRudolph Things change. Back in the day, there was no standard. Bjarne was the standard.
 
3:18 PM
@ScarletAmaranth N types. It picks something that you can assign both types to, when possible. The default behaviour is to be decltype(true? declval<FirstType>() : declval<typename common_type<OtherTypes...>::type>())
 
@RMartinhoFernandes What happens if I pass two types that cannot be "generalized" ?
 
No compilies.
 
@RMartinhoFernandes I reckon it can be specialized for your own types?
 
@ScarletAmaranth Compiler error.
 
@sehe Yes. It is explicitly allowed.
 
3:19 PM
@KonradRudolph So, it depends. :)
 
@RMartinhoFernandes Thanks ;)
Dat I like.
 
@sehe I'm afraid I don't.
 
(defn bell [n] (loop [n n s [1] b s] (if (= n 1) b (recur (dec n) (reduce #(conj % (+ %2 (last %))) [(last s)] s) (conj b (last s))))))
Mmm. Inneresting
 
0
A: delete a pointer getting AccessViolationException

DeadMGUse smart pointer to free memory. delete in application code is always wrong.

why so many morons no recommend smart pointer?
 
template <typename Common = deduced,
          typename... T,
          typename Element = Conditional<
                                 std::is_same<Common, deduced>,
                                 Decay<CommonType<T...>>,
                                 Common>
          typename Result = std::array<Element, sizeof...(T)>>
Result make_array(T&&... values) {
    return Result {std::forward<T>(values)...};
}
Now make_array(1,2,3.0) gets you a array<double,3> and make_array<int>(1,2,3.0)` gets you a array<int,3>!
Thanks to @Luc for this trick.
I shall put it in the wiki sometime.
 
3:25 PM
@RMartinhoFernandes Where does the deduced come from? Is it a 'tag type'?
 
@sehe Yeah, class deduced; suffices.
 
Oh man. So much to learn with c++11 TMP.
When are you writing that book?
 
lol
I've been thinking about writing about it on my blog.
 
Perhaps co-authored with @LucDanton?
Many authors write blogs and compile them into books. With merit, IMO
 
Well, meanwhile, keep loungecpp.wikidot.com/tips-and-tricks on your bookmarks :) When I remember, I write short descriptions there.
 
3:28 PM
Turn those short descriptions into a book
 
@RMartinhoFernandes That’s some fucked-up shit … and I mean that as a compliment
A Lounge<C++> blog would actually be awesome
4
or book
 
@KonradRudolph I reckon something 'syndicative' like cppnext would fit
 
@sehe I’ve actually had the idea of building a blog on top of github pages or gists (since those allow Markdown and have comments …) – just for the sake of it, really
 
What usually puts me off from blogging is that I don't have a simple system to publish a post from say, a Markdown text file. I'm sure there's something out there, I just never bothered to find one.
 
Some of it is a bit to raunchy for this audience, though :)
 
3:32 PM
@RMartinhoFernandes See above: gists
 
@KonradRudolph Oh.
 
@RMartinhoFernandes I've briefly nosed pyblosxom which seems to fit the bill: simple text files, static 'rendering' IIRC
 
I'm probably late to the club, but clang 3.1 has been released.
 
2 hours ago, by R. Martinho Fernandes
Woot, LLVM 3.1 released.
 
@RadekdaknokSlupik Thx. You use linux, do you. Any 'convenient' packages, or just the regular rinse/repeat compile from source?
 
3:34 PM
ahoy
 
I use Mac OS X.
You can download the binaries for Linux IIRC.
 
@sehe Real release. Your distro should have packages soon.
Or not.
 
Frankly I hate compile from source since I move my second SSD to work PC. I need to upgrade my PC so I can haz more space.
 
Finally I can use <atomic>.
 
@RMartinhoFernandes M. It is still on 2.9 here, so I'm not so sure.
 
3:35 PM
@RadekdaknokSlupik how is that?
 
That happens before :)
Also, finally is more a java thing to exasperate
 
@RMartinhoFernandes Dat wikidot link is bad-ass man.
 
I reckon I can have it on my Arch system by the end of the week.
 
@sehe you found a large improvement over a 7400rpm when compiling? how large?
 
3:35 PM
@stdOrgnlDave About 2 inches, really
 
@sehe I've found pandoc recently (which is awesome, btw), which allows me to convert Markdown to anything under the sun (and often vice-versa). I've just been lacking the "push to the web" part.
 
@sehe that sounds like a spam email. I'm talking compile time.
 
Hmm, looks like 1.0 is not a valid value for a System.Double.
 
@Scarlet whut?
 
@stdOrgnlDave Referring to the work PC?
 
3:36 PM
Probably has something to do with locale.
 
Anyways:
 
@ScarletAmaranth I suppose that was intended for me.
 
@sehe referring to compile times with an SSD
 
in Room for sehe and Paulina D., 8 mins ago, by sehe
I think this is interesting stuff I might be back to read later. Now, to do some cooking
 
@RMartinhoFernandes Oh, sorry, i clicked Tab one too many times :)
2
@RMartinhoFernandes Some real good stuff there.
 
3:37 PM
@stdOrgnlDave Well, at home or at work? At home = tmpfs, doesn't get much quicker. And with C++, using SSD doesn't slow it. Work PC: other matter. More details, mebbe later
 
Clicking Tab?
 
@ScarletAmaranth Well, for most of it I can only be credited by writing the pages, not having the ideas.
 
Yeah, when you type "@." you can click tab to choose a person you want to type to.
 
@sehe you work&edit on a RAM disk? :-\
 
@Pubby pressing/hitting/pushing/typing
 
3:38 PM
Mac guys: is there a brew formula to install clang? I cannot find anything …
 
@KonradRudolph if Xcode's already updated, Xcode. Otherwise you can download the clang binaries from the clang website.
 
indeed, xcode uses Clang now.
the bastards.
with C++11 out now, the gap between C++ and Object-C has widened considerably. I feel a bit sad for the poor OS X devs who go native
 
What's the official spelling by the way? clang or Clang?
@std use Objective-C++.
 
@RadekdaknokSlupik Objective-C++11? is there support for that?
 
And Objective-C is native.
@std yeah.
 
3:40 PM
hm. bbiab
 
@stdOrgnlDave In fact, if you want to do GUI stuff, you can’t help but go native, really …
 
@KonradRudolph Java Cocoa! :P
 
(well, you could if you were really masochistic …)
 
MacRuby…
 
@stdOrgnlDave Yes, it’s just Obj-C with a C++ compiler instead of a C compiler part of the frontend
 
3:42 PM
In theory, you could do Objective-Haskell if you write a front-end.
 
:P
Just an example.
 
@RadekdaknokSlupik *projectile vomiting*
 
Okay, okay. Objective-PHP.
 
Sorry, did you write something? I didn't see while I was.. *more projectile vomiting*
 
3:43 PM
Objective-C is objectively crap.
 
Subjective-C.
 
Vomitive-C
 
Objective-Haskell would be awful because it would taint Haskell with weird side-effect craps. Objective-PHP would be awful because anything with PHP in can't possibly be an improvement.
 
Objective-C is doable. Objective-C++ is just a real pain in the fucking ass to work with.
 
Whatever-C defaults to C which defaults to crap.
 
3:45 PM
*Homer voice* Ah projectile vomiting. The best kind that there is.
 
Objective-J is also crap.
Impossible to debug.
 
@stdOrgnlDave Yes.
Actually, I'm a <lookup word in dictionary>:
 
Objective-Objective-C would be even better. Now with twice the amount of objectivity.
 
@sehe What if your computer crashes? Will you lose everything? Or is it backed up to your HDD/SSD?
 
@RadekdaknokSlupik Source control, gentle people. And the rest is expendable
 
3:47 PM
> Additionally, array and dictionary elements can be accesses via the subscripting operator.
FINALLY. I got sick of typing objectAtIndex: and objectForKey:.
 
@sehe I thought you used LVM.
@RadekdaknokSlupik What is this about?
 
Clang release notes. Objective-C features.
 
@RMartinhoFernandes True. Last time I skipped that part when I yanked the other SSD. No idea, why, really
@RadekdaknokSlupik Your property accessing library for some kind of ORM thingy, I guess?
@RadekdaknokSlupik Oh that
 
@RMartinhoFernandes Silly abomination they call Objective-C.
 
3:50 PM
@RadekdaknokSlupik (pinging to death): Help me out, maybe. "Ik ben een krent" - in English?
I know the word but it won't come to me
 
Objective-C is even more verbose than Java.
I know it sounds crazy, but it's the truth.
 
Darn. My kids are nice. I hardly notice them. They're playing so intently (with their waterbaan) I just had to step outside and admonish them to stop for lemonade first. It is a hot day here, and they don't quite adjust yet
^ waterbaan
 
@sehe The outside temperature is fucking high, and so am I.
27º.
 
@RadekdaknokSlupik Who? Me? Oh that. Yes it is hot. 26º peak temp here
 
3:55 PM
It's about 17º here. We're finally getting out of winter.
 
When will __cxa_pure_virtual be called? That can never happen, can it?
 
@RadekdaknokSlupik On UB.
 
@EtiennedeMartel Us too. Big time.
 
@sehe classic
remember loving that when I was young
 
@bamboon Yesterday?
 
3:57 PM
@sehe Oh, Edmonton. Never been there. But -20º isn't too bad.
 
We didn't have that in 'my time' LMFAO ROF
 
@sehe harhar^^
 
Yes! There'll be a thunderstorm today.
Can't wait. I can finally open my window then.
 

« first day (585 days earlier)      last day (4349 days later) »