« first day (752 days earlier)      last day (4195 days later) » 

8:03 AM
@Ivan0x32 Boost Multi-Index, Boost Range
morning all
 
yes, it is morning
 
No it's not. It's evening.
 
@Mysticial You would argue that
 
^ An e-book I hadn't seen before
 
Morning. Thanks that looks like what i exactly want. But i'm kind of unexpirienced with boost. Can i trust it's implementation as much as i can trust STL? I use MSVC 2012 btw, if it matters.
 
8:16 AM
Yeah, boost is a pretty solid library. Many ideas were adopted into C++11 that boost originally thought up
Granted that says nothing of stability, but rest assured it is stable so long as you use it as intended
 
@Ivan0x32, I am trusting it.. thus far it didn't embarassed me
 
You can trust boost more than you can trust MSVC.
At least there they don't have silly deques.
 
@R.MartinhoFernandes, as a rule of thumb, you can't trust anyone! :)
 
@vulcanraven You're right about that. I can't trust myself to write a decent program
 
..trust in who you and nothing else matters..
 
8:20 AM
Well I'm screwed then
 
@Neil, lol
what is the easiest way of porting win32 static lib to win-on-arm (WOA) runtime?
 
though honestly think a good programmer is defined by how much he thinks his programs suck paradoxically
if he were happy with his programs, he wouldn't be growing
and in this business, if you aren't growing as a programmer, you're either a guru or a nincompoop
 
Then i'm a really good programmer then, because my programms are totaly composed from crutches and props :D Anyway thank you for your answers!
 
yeah thats right.. never get too excited! stay hungry.. and you will be groomed
else, eat more and grow fatter
MOAR
lol
 
@Ivan0x32 Well that's the difference between a programmer with experience and one without
that says nothing about a programmer's ability
I mean, you are a good programmer because you recognize room for improvement, but writing bad programs is not an indication that you're a bad programmer, just one with little experience
it's a bit like saying that a 12-year-old kid drawing stick-houses and stick-men is an awful artist
but I think everyone was drawing that way when we were 12
 
8:45 AM
mawning
 
0
Q: Accessing class public variable using template wrapper

AvinashI want to access public variables of the template parameter class. Consider following example #include <iostream> class Person { public: char* m_name; int m_id; int m_age; public: Person() { } Person(char* name, int id, int age) { m_name = name; m_id = id; m_ag...

 
OWNER *pOwner = reinterpret_cast<OWNER*>(value);
oh gawd
and void*, really??
 
That's not the funny part
this is:
std::string str_name = "m_name";
std::cout << pOwner->str_name << std::endl;
 
9:03 AM
That's painful to watch
 
pOwner sounds like a bad rhyme of boner
 
"proner" is also a real slang word
 
You're not dead yet?
 
9:28 AM
morning all
 
-2
Q: Can't find a Memory leak in the given Function

AmanThe given function works fine when 2 paramaters are passed to it i.e. fromDelta(10000, 12). But when we use the overloaded form i.e. fromDelta(10, 12, 100) it gives incorrect output. inline constexpr Probability<> fromDelta(ULONG left, ULONG right, ULONG maxVal = MAX_PROBABILITY) { ret...

Terrible questions ahoy.
@thecoshman Hi.
 
@R.MartinhoFernandes /waves
fail question is fail
 
Aman: I don't think you are using the word "memory leak" correctly. A memory leak refers to allocated memory, which is never freed. You do not allocate, so there cannot be a memory leak. Maybe you meant "overflow", i.e. an incorrect calculation because of the limit of a datatype. If so, please post the output you are expecting and the actual output you get. — LiKao 1 min ago
Last time I counted, "memory leak" consisted of two words...
Unless "word" has some other magical meaning in English I'm yet to discover :D
 
@catplusplus didn't read too much of the transcript, but as far as I can tell, you suck for thinking I suck when clearly it is MSVC that sucks
 
I've always wondered, if I need a large array of bools, is packed bits faster than bytes?
 
9:36 AM
Who knows.
 
Not you!
 
When I get back to a very much less sucky computer setup I can take a look at what you guys have been up to. @Melak47 seems to have been having a hard time grasping "this is a work in progress do not expect it to work"
 
I've heard that the twiddling to get the values makes bits slower but it seems like there would be less cache misses with it too.
 
@Pubby depends
 
@Pubby Well, it depends a lot on the operations you want to do.
Checking if all are true, or all are false can probably be made faster if they're packed.
 
9:37 AM
Well I'm thinking about pathfinding
 
if you want to send a million bool values over a 56kbit line, then bit packing will make it a damn site faster
 
hi
Karnaugh Map Manipulations HELP
anyone ?
 
@thecoshman For that you can also use all kinds of compression schemes on top.
 
What exactly are you wanting to do with this large array of bools? what do you define as a large array? what do you need to be fast about them?
 
@thecoshman Random access is really all I am wondering about
 
9:39 AM
@R.MartinhoFernandes not really the point I was getting at, but yes it will. Either way, bit packing is a compresion scheme
@Pubby how random? if you are gonig to be working on a region of the array at a time, then perhaps bit packing might help with regards to cacheing
but it would only do so if the region you want to work with is too large to be cached normally but bit packing will allow it to b cached
 
If it's for pathfinding then the accesses would be somewhat close
 
it also depends what you are doing on the bits
if you are simply reading the value, then you may end up spending longer getting the values in and out of packed format then actually reading them
I would not bother with <optomisation>, unless when you come profile your program a region of code appear to be slow that <optomisation> might be able to speed up. I would only leave it in if turns out it does speed it up
spell check please, that's star worthy I am sure :D
 
yeah, I'll profile if I need it
speculation can only get us so far
 
There's been a number of cases, where I predict a lower-bound on the run-time of some algorithm.
 
@Pubby don't speculate that
 
9:44 AM
So even before I start writing code, I know whether or not it needs to be optimized.
 
@Mysticial yeah, but you hae some sort of statistics fetish :P
 
@thecoshman Not really. It's actually pretty simple. If the algorithm needs X operations. And I know the theoretical limit of the processor. I can easily compute a lower-bounds.
That lower-bounds is usually overly-optimistic since actual run-times are usually many times slower.
 
@thecoshman "optomisation"? Twice?
 
But if that lower-bounds is already too high... then I know what I need to do.
 
@Mysticial like I said, statistics fetish
 
9:47 AM
Oh, I have an idea
if the pathfinder only allowed movement on the 4 cardinal directions
 
@thecoshman That's not statistics. Statistics is when you sample many data points.
 
@R.MartinhoFernandes I am on a stupid crappy mac with a stupid crappy brower that does not offer spell checking as I type
 
I could store 2 bit arrays of the same data, one rotated
And then I could check 8 bits at a time if they were packed
 
@Mysticial There's always a sweet spot between "premature optimization" and "designing for slow".
 
That said, even with my best efforts, I rarely get better than 50% slower than the lower-bound.
 
9:49 AM
@thecoshman you know firefox and such?
 
@R.MartinhoFernandes if you have not profilled, it's premature optimisation
 
@Mysticials brain is a profiler
 
@bamboon No not really. I'm not actually running the program in my head.
 
@thecoshman Nah, it's not. Why do you not pass everything that you would pass by const& by value instead? Because there's no point in designing for slow.
 
@bamboon I am at my parents for the week. For just using the computer I shall have to put up with months of "it was working fine before you came". I am not going to be as stupid as to install stuff
 
9:51 AM
My head's clock-frequency is on the order millihertz.
 
@R.MartinhoFernandes like you said, there is a lne between design and optimisation.
 
@thecoshman You do know that even if you don't install anything, that is what will happen, right?
Nothing will change at all, but ask them and they will know something that did. Even if you didn't even power up the thing.
 
@thecoshman but it does work now
 
I like @R.MartinhoFernandes term "designing for slow". Best practices you think about the performance requirements in the design, but not necessarily implement the optimizations until you discover they're needed.
 
@Griwes It's not even a very good definition. I prefer 'A memory leak refers to allocated memory that cannot be freed during the app run because all pointer/references to it have been lost'.
 
9:55 AM
@melak47 as you know, I have not even looked at it for the last week or so. Was it much more then getting linking fixed?
 
@thecoshman nope. window.cpp just wasn't being compiled at all :)
 
@melak47 really?
 
@thecoshman cat didn't intend there to be platform independent files in /platform, only the specific platform subfolder is included in the build
 
@melak47 ah right. Well, I had decided to take the appraoch that all the platform files are compilled for all platforms and with in the files they use #ifdef macros to be empty when on the wrong platform, if you follow. I thought it a damn stie better to write the code such that you can use any build system
 
@thecoshman yeah
 
10:00 AM
@melak47 wait, well ofcours their has to be a common set of file, things like 'Window.cpp' that ALL platforms use. There are the sub folders for platform specific stuff though
dan dogs, want letting in all time so they can go back out again
 
@thecoshman I don't think he's opposed to platform independent files including the platform stuff, he just didn't think they'd be in there. Think he's fine with it though, he said I could just change the build script :P
which I did, and it works
 
oh ok then :D
so was there much to change in the code itslef?
 
@R.MartinhoFernandes Have you ever substituted an std::tuple<T, ..., T> with an std::array<T, N> in a generic context?
 
I think all that was needed was to remove the default value from the argument int BPP = 32 in the implementation
 
std::tuple<meta::DependOn<Invoke<boost::range_reference<RemoveReference<Range>>>‌​, Int<Indices>>...> looks kinda dumb compared to std::array<Invoke<boost::range_reference<RemoveReference<Range>>>, sizeof...(Indices)>.
 
10:03 AM
@LucDanton I have done the opposite in my tuple_cat.
 
@R.MartinhoFernandes Any reason? Consistency?
Programmer laziness?
 
I have kyrostat compiling, creating a window, clearing buffers and presenting it to the window now :)
 
@melak47 derp. I have habbit of leaving defaults in the impl like that. I just copy from the decl :P
 
tuple_cat(some_tuple_int_double, some_array_int_5)
 
Okay, more generic.
 
10:04 AM
@melak47 sweet :D I assume this is on windows then? I assume that the same will work for linux, with a few minor fixes.
 
@LucDanton I guess I could have kept the array if only arrays of the same type were involved, but I don't really think it's worth the effort.
 
Given that I don't have a generic tuple_cat and that the 'arrays-as-tuple' interface doesn't extend up to std::tuple_cat that is an argument in favour of not using std::array.
 
I think next we need to sort out the events that we wan to provide to the application, but I think we had best sort out what evens we want to send via the forums
 
@thecoshman it should, GLLoad linked and compiled fine on linux, so I don't see why it shouldn't work
 
@R.MartinhoFernandes I'd rather introduce a to_tuple to go array->tuple and leave all the tuple goodies as they are than code against both tuples and std::array.
 
10:06 AM
@melak47 If I get bored here, I mihgt look at setting up my Raspberry Pi for building it. But that would take a LONG time :P
 
I'll keep std::tuple<meta::DependOn<Invoke<boost::range_reference<RemoveReference<Range>>>‌​, Int<Indices>>...> then I guess.
 
@LucDanton The annoying bits is that implementations are explicitly allowed to work with std::array (with any tuple-like, actually), but not mandated :(
 
@thecoshman lol, the vendor lib might take a while yeah
 
@melak47 yeah, it takes long enough with a proper harddrive, let alone an SD card :P
 
My tuple_cat, OTOH, is full-featured and works with all tuple-likes.
:P
 
10:09 AM
@R.MartinhoFernandes Not with std::tuple_cat though no? To quote: Requires: "For all i, Ui shall be the type cvi tuple<Argsi ...>"
The 'Returns:' clause is generic however... (since it uses the tuple interface via std::get.)
 
Hmm, I distinctly remember that.
Lemme download the std.
 
@R.MartinhoFernandes There's a note saying so.
I take it not as an 'explicitly allowed' (since that clashes with the Requires) but something in the spirit of 'implementations are encouraged to introduce further overloads that...'.
 
Ah.
FWIW, at the time GCC didn't support jack shit.
 
Most of the 'implementations are encouraged to' stuff leaves me rolling my eyes.
@R.MartinhoFernandes Well, I regularly use std::tuple_cat with tuples.
 
testing FPS with Fraps just to make sure something is actually being drawn :p
 
10:12 AM
@LucDanton But pairs! And arrays! And my own tuple!
 
@melak47 bit meaningless at the moment
 
i am new to c and eclipse with c .. i have used the turboc3 compiler ..... in turboc3 compiler
in tc compiler the printf will come first but in eclips its run scanf first
 
@R.MartinhoFernandes At this point I'm developing some kind of convention where anything that uses a tuple as an implementation detail usually defines a tuple_type member type. Then implementation of its interface usually go to and from this tuple_type.
 
@NullPointer good for you. read the bewbie hints
 
To clarify though that's for types which representation is often enough a tuple, but are not themselves tuple-like.
 
10:14 AM
Nov 1 at 0:14, by kbok
> if u ar nue hear, plss tak ai quik lok tru duh noob hents. thnk yuo.
 
Tuples for implementation are neat for free EBCO. Or optimal layout whistles.
 
@thecoshman in turboc3 compiler it show output of printf statement first but in eclipse it run scanf first could i know why ?
 
@R.MartinhoFernandes Speaking of, have you noticed how libstdc++'s tuple handles final classes properly? Does your tuple do that?
crosses fingers and hopes that stuff breaks
 
@LucDanton What about them?
 
@kbok did that get pinned?
 
10:17 AM
My tuple delegates to the standard one.
 
Aw.
 
It's merely a wrapper with tons of ugly code to map indices back and forth.
 
@thecoshman Hopefully not :)
 
@NullPointer heres a little hint for you "I don't give a crap"
 
I remember the mapping yeah.
 
10:18 AM
@NullPointer You need to flush
 
@R.MartinhoFernandes Well, now is a time as good as any, but do you make use of your tuple then?
 
yeah, just used it to make sure stuff was getting presented to the window.
before I could hear the graphics card working, but I was using a local context variable instead of the class member so it was presenting to nowhere :p
 
breakfast time :D
 
what a coincidence, here, too!
 
10:23 AM
@LucDanton Not that often. I've used it once or twice before for the EBCO. I don't juggle tuples all over like you do :)
 
Today I've just implemented slicing 'em!
Next I'll shuffle 'em I think.
 
Tuple swizzling?
That would seem like the manly thing to do since everyone has been writing crazy swizzler code for 2- to 4-vectors.
Show those kids how real men do it.
 
morning
 
@R.MartinhoFernandes who you callin crazy D:
 
Well, the slicing bit is certainly an explicit way of swizzling.
@R.MartinhoFernandes I've used a lot of @Xeo's input for my stuff and the swizzling stuff he's shown is in the same spirit tbh.
 
10:26 AM
btw, robot
 
@LucDanton And shuffling is another step towards it. Just go all the way :P
 
I came up with a modification to a deque last night
allow you to random-access into UTF-8 (as codepoints) and replace arbitrary codepoint in O(1) time.
 
@R.MartinhoFernandes Mmh is there such a thing as implicit swizzling?
 
@LucDanton Actually... now that I think about it, my tuple is basically built around swizzling with an optimal pattern.
@DeadMG How so?
 
@R.MartinhoFernandes Well, I was lying in bed, and it occurred to me.
 
10:28 AM
WHat modification, I mean.
 
well, it's simple
if you think of std::deque as std::vector<std::unique_ptr<std::array<T, N>>>
then instead, I will have something more like std::vector<std::vector<char>>.
 
@R.MartinhoFernandes Ya. What I refer to as 'shuffling' is e.g. a conversion from std::tuple<int, std::nullptr_t> to std::tuple<std::nullptr_t, int> (and vice-versa). Remember the discussion about finding permutations?
 
Though I'll mention already that I don't think it's worth it.
 
each subdivision can be of variable length as long as it holds a constant number of codepoints.
 
@DeadMG But how do you find the right subdivision?
 
10:30 AM
@R.MartinhoFernandes Exactly the same way regular deque does. Each subdivision contains a known constant number of codepoints, even if you don't know how large that is.
 
Pro-tip: waiting for breakpoints without the debugger attached does not not work.
3
 
when you find the right subdivision, you'll have to iterate through it looking for the one you want, but the number is constant, so it's still O(1).
 
Oh well. Seems feasible. But now you have to work to convince me it's worth it.
 
eh
 
@R.MartinhoFernandes oh glad to have this tip. Would never have known otherwise. :P
 
10:32 AM
it's more like, "Replace any codepoint with any other codepoint in O(1)" that's my favourite feature.
 
@DeadMG Yeah, but that's rarely useful. And combining marks whistles.
 
lol
 
It will take me a while to get used to VS's errors.
 
anyways, I'm pretty pleased with myself about that.
 
I can understand that.
Now get back to working on useful stuff.
:P
 
10:36 AM
lol
well, it's funny you should mention that
because now that I can random-access and mutate codepoints regardless of the underlying encoding, it's tempting to propose a random-access mutable string in my Unicode proposal
 
If you want random access just use utf-32
 
@R.MartinhoFernandes Do you have a C++ intersperse?
 
No.
It's not like it's hard to write anyway.
Just accept that it can never have an elegant implementation.
 
That's not my problem lol. I don't want to intersperse sequences, I want to intersperse for output. I don't know where to put that.
 
ostream_iterator can do that if you accept a trailing separator.
(Did I mention C++ now allows those all over the place? Woot!)
 
10:42 AM
Wait, trailing separators?
Where?
 
enum foo { a, b, c, }; // valid
 
that's cool
 
I'm not sure how I didn't notice that.
 
Mar 17 at 9:40, by Luc Danton
Good to know.
Check the context.
 
Welp, and I thought I wasn't going to be impressed anymore when you do that.
Mar 17 at 9:35, by Luc Danton
@RMartinhoFernandes In fact I keep adding trailing commas to my enums and getting bitten by that.
But I dont use enums...
 
10:47 AM
It's certainly useful with a big enum list, one enum/line - every entry can have a comma after it. Saves pratting about when adding additinal entries to the list.
 
> CXX0063: Error: overloaded operator-> not supported
And the VS debugger is supposed to be good?
Fuck you.
 
Well, it's still the best I know of
 
Meh, it chokes on a function call through a smart pointer.
 
2
Q: What is the exception specification of std::function's move constructor?

DeadMGI've looked at cppreference and they seem to indicate no noexcept specification on std::function(std::function&&). This seems rather odd to me. Does the Standard really not give a nothrow guarantee in this case?

damn, which answer to accept?
 
Btw, y u no check the standard directly.
 
10:55 AM
I have monkeys for that
 
How bad is it that I keep using unrelated features when writing a unit test?
I'm just too damn lazy to go through each tuple element to check equality of addresses.
 
@R.MartinhoFernandes Well supposedly if one of those features is bugged then it might look like the unit test here passes when it wouldn't with a correct feature.
 
Ah.
I don't mind that much, tbh. As long as there are separate tests for it, I'm cool.
 
Heard of that ? romneymegaprayer.com
 
11:02 AM
I've done it for quite some time too, although I'm fairly sure the usual literature is against it. No idea what common wisdom says though. It has also happened to me that several tests suddenly break at once, which doesn't necessarily mean that all features are wrong since it may be the case that only some of them are, with the rest depending on those.
Sort of counter-productive when it happens, isn't it?
 
@kbok erm.
lol
 
I think I prefer when more tests break. I have more data to look at and diagnose fast.
@LucDanton I would love to have seen your face, btw.
 
lol
Mmh, I thought about providing support for slicing single-pass ranges given the constraints that the indices be monotonically increasing, but I didn't think about what should happen when running off the end of the range.
For forward-ranges and better it's not an issue because everything is done modulo distance of the range.
I could leave the former as UB but since the latter 'always works' it's inconsistent.
I could provide an overload that takes a default I suppose (which itself can be defaulted to a value-initialized thingy).
optional<T> fill = T {} perhaps -- no UB by default.
 
11:17 AM
Btw, you know Bare? D calls it Unqual.
 
optional<T> const& fill = emplace(T {}) doesn't require MoveConstructible, does it?
@R.MartinhoFernandes I dnt lik abbrevs.
As seen from my Qualifying<Foo, Bar> alias which can take quite a lot of space.
 
What's Bare ?
 
DisableIf<
    is_invokable<
        Qualifying<Self, Functor>
        , void(Qualifying<Self, Args>..., Qualifying<Self, A>, Qualifying<Self, As>...)
    >
>...
This is sane right?
@kbok Alias for stripping away all cv and ref qualifiers.
 
@LucDanton I was thinking Unqualified
 
It's convenient for things like template<typename Iter> typename std::iterator_trait<Bare<Iter>>::reference foo(Iter&& iter) { return *iter; }.
 
11:24 AM
I see
he he he
 
@R.MartinhoFernandes That's reasonable. Especially considering how everyone seems to be stumped by the name Bare -- I guess it should be considered a failure.
 
christians
> Did you know that patients who had a group pray for them, even without their knowledge, show positive effects by healing faster or better in 57% of studies?
 
@LucDanton Yeah. "Unqualified" seems to need no explanation.
I think.
 
> A total of 23 trials involving 2774 patients met the inclusion criteria and were analyzed. Heterogeneity of the studies precluded a formal meta-analysis. Of the trials, 5 examined prayer as the distant healing intervention, 11 assessed noncontact Therapeutic Touch, and 7 examined other forms of distant healing. Of the 23 studies, 13 (57%) yielded statistically significant treatment effects, 9 showed no effect over control interventions, and 1 showed a negative effect.
 
Going to commit soon and see what happens.
Oops I just committed in fact.
Haha, I just ran s/Bare/Qualifying/g everywhere in the project.
 
11:30 AM
That looks wrong.
 
First time I've used hg revert -C ., it sent shivers down my spine.
 
I use hg update -C
 
Mmh, I don't think I know of a magic spell to find which file(s) contains the biggest line. I don't even know where to start. Any suggestion?
 
Binary search with grep for .{really big number}?
 
Worth a try, thanks.
Can't say I'm familiar with quoting rules. '.\{foo\}' appears to do the trick.
Over 150 bytes, but no Unqualified in it. Welp.
 
11:38 AM
@kbok huh?
 
@R.MartinhoFernandes The change doesn't seem to have affected appearances too much. And it compiles just fine of course.
 
oh cute, looks like one of the authors of that paper published a follow-up 3 years later, with the conclusion "Since the publication of our previous systematic review in 2000, several rigorous new studies have emerged. Collectively they shift the weight of the evidence against the notion that distant healing is more than a placebo." I guess the romney-prayer thing conveniently omitted that little detail
3
 
Does the VS12 update include Unicode literals and distinct charxx_ts?
 
Unicode literals weren't on the list
 
Are there range tags in Boost.Range? Or is one supposed to defer to the iterators tags of Boost.Iterators?
 
11:46 AM
@LucDanton There are some more fleshed out categories.
 
@R.MartinhoFernandes Well, I need tag dispatching.
 
Okay, range_category exists and does in fact defer to iterator_category.
Whoops, category is the current concept. I want traversal.
 
and another forum gets whored
 
lol, I wish I could vote to close everywhere.
 
11:52 AM
Did Boost 1.52 just get released? I don't remember the red notice from 10 minutes ago.
> 09:27 GMT
Close enough!
 
Sutter said that it was coming yesterday, so
 
@DeadMG OP obviously hasn't understood the purpose of those forums
 
Woot, I can manipulate text in a document. I'm so awesome.
 
@R.MartinhoFernandes so can I...
It's easy. Just open Notepad
 
@jalf Erm, I'm not working with Notepad.
 
11:57 AM
Emacs then? Or Vi? It's fairly easy in those too
 
I an diubg this programmatically. In InDesign.
 

« first day (752 days earlier)      last day (4195 days later) »