« first day (910 days earlier)      last day (4044 days later) » 

10:00 PM
I'd say only about 5% of the speedup was because of "better programming".
 
ok, still quite much
 
A good chunk of that was because I found a way to reduce the # of malloc calls from O(N log(N)^2) to O(1).
 
of that 5% or the overall speedup?
 
@bamboon Of the 5%.
@bamboon Granted, a lot of those algorithmic improvements were not possible without the "better programming" part.
That's why v0.6.x took so long. It was a near complete rewrite of the entire program to allow for these algorithmic optimizations and to better future-proof it.
 
@Mysticial just curious, did you use vfmaddpd/vbroadcastsd/... intrinsics directly within algorithms, or did you wrap them into some small entities like vector, matricies, etc like Eigen does?
 
10:06 PM
@EvgenyPanasyuk Directly using intrinsics. All hand-written, but with heavy abuse of macros to reduce code-duplication.
 
@Mysticial That's a sweet reduction
 
@Mysticial o.O Nlog(N)^2 -> 1? Dude that's not a reduction that's annihilation
 
:)
Yeah, that's the result of my paradigm switch to, "nobody owns their own memory". Aka, "communist memory management".
 
@Mysticial I use a similar scheme for Wide.
allocate virtually everything from a memory arena
 
@DeadMG arena? do you make memory blocks fight for who gets to get "allocated"? :)
 
10:12 PM
@DeadMG I actually already did that in the past. One call to the system malloc(). Afterwards, I manually manage it all with my own internal specialized malloc. But even then I had an excessive number of calls to it in all the wrong places.
 
no, it's a temporal cohesion exploiting allocator
@Mysticial Obviously your specialized malloc() wasn't sufficiently specialized :P
 
@Rajeshwar I fail to see what difference that makes. It's not selfcontained: see here and you forgot (?) to mention compiler/library versions too. I didn't downvote earlier, but I will now. — sehe 22 secs ago
^ Hohum /cc @StackedCrooked @Rapptz
 
I doubt that I could dynamically allocate memory any faster than from an arena.
well, except for object pools... maybe
 
@DeadMG Yep. It had a non-constant run-time complexity based on the number of active allocations. And the worst cases were always in the worst places.
 
I didn't downvote earlier either. :S
 
10:14 PM
@Rapptz I fixed the LWS link now...
 
@Mysticial Ah.
 
I downvoted.
 
Yeah was about to say, you had an error there.
 
whereas the arena I use is O(1) guarantee
 
That's some bat crazy shit right there. I'm tempted to link the OP to this comment:
2 hours ago, by sehe
@Rapptz I do :) But I'm not psychic. I'm afraid this user will have something like template <typename X, typename Y> void operator%(X,Y) { } somewhere in an ADL-implied namespace... Not pretty
 
10:15 PM
Hm.
I forgot.
 
as far as I can tell, the trick to excellent memory allocation performance is to reduce the requirements on the system
 
@Rapptz I didn't, in fact. That was just the wrong clipboard, containing.... the OP's code :)
 
Sehe posted a link to an answer he made like, a day ago.
 
the further you can get from "Allocate any number of bytes at any time and free them at any time in any order", the better
 
It had a LWS example.
Something with buffers.
I wonder if I can find it...
 
10:17 PM
@ThePhD Mmm? I think you recall me posting something on codeproject correcting errors/modern style? Also, that was a lame example class, not something for good performance
 
1
A: Using templates to define static arrays in a class

seheAnyways, this works out fine for me: http://liveworkspace.org/code/3L72Lq$0 template<unsigned S> class Buff { private: static unsigned char buffer[S]; int offset; public: Buff() : offset() {} template <typename T> T* New(T, int); template <typename T> T* New(T); }; template<

^ Dat one
I think I wanted to do something like introduce alignment and stuff.
Like define a size, but also pass a type to make sure the size aligns to.
 
Oh. Yet another answer :|
 
I just noticed that AllocateFor<T> violates DRY in a horrible fashion.
why didn't I notice that when I was building this class?
 
Hey peeps
waht's the evidense linking SteveJobs/Amber to cicada?
 
None
cicada
@DeadMG Because code review implies multiple authors
 
10:23 PM
@CCInc Still going on about that?
 
Hey, I'm just wondering
We are having an arguement
 
"We"?
 
@DeadMG DRY?
 
@sehe A friend.
 
Wokay
If you have IP address... I can do a predicate test (yes/no), with a higher chance of false negative than false positive
 
10:26 PM
How would I go about hacking an android phone remotely?
 
@ThePhD Don't Repeat Yourself
 
I personally think it'd be best to deploy a rougue app with unlimited permissions
any better way?
 
@CCInc Perhaps.... you should (a) find that out yourself (b) ask Telkitty/GamErix/Crowz
@CCInc Electromagnetic Blast Gun
 
Ah but I need the email also.
I thought of that.
 
Ask for the email address?
 
10:28 PM
I know the address
 
@DeadMG But how does it repeat itself?
 
I guess I could phish an email
 
@ThePhD Because AllocateFor<T> == AllocateFor(sizeof(T), alignof(T)).
 
once you have access to the phone, the email address is gonna be a complete gimme
 
The first part is the problem :)
 
10:30 PM
Um...
Okay, I guess.
OOH
I see it.
Duplicate code.
Lulz.
But for some reason, one of them always uses '8' for alignment.
 
oh, that
I just had a compiler bug with std::alignment_of.
 
Lol.
 
No pragmatics at all
 
What does the L"" convert the string to?
 
Wide string?
 
10:35 PM
Cool.
hr = SHStrDupW(pwzUsername == L"Chris " ? L"Chris" : pwzUsername, &_rgFieldStrings[SFI_USERNAME]);
where did I mess up?
assuming pwzUsername is of type PCWSTR
Warning	2	warning C4130: '==' : logical operation on address of string constant
 
@CCInc you're comparing pointers
 
So how do I compare them? use strcmp?
 
You need to use strcmp or whatever equivalent function is for PCWSTRs. I doubt it's strcmp. (I've never used all those weird Microsoft string types)
 
@StackedCrooked meh
 
Hey guys, I wanna know some syntax thing about pointer arithmetics with arrays:
int* ptr = array[0]; - then i can do *(ptr +16) to get the same thing as ptr[16]
But what about the direct way *(&array[0]+16)?
Would that work?
I meant int* ptr = &array[0] -.-
 
10:50 PM
@WojciechMorawiec Did you try it?
 
Shame on me, the second I posted I realized that this is a good way to test it ;)
I'm so sorry xD
 
@WojciechMorawiec It's okay. Did you know *(array + 16) works too? Arrays can be automatically converted to pointers.
 
Yeah, I know that, but to be honest - I don't like it since it conceals things ;/
 
I agree
 
You can prevent decaying if you really want :S
 
10:54 PM
std::array?
 
That's one way.
 
:p
 
I was talking with Bjarne earlier today. His way of saying it was that the turn in pointers at the slightest provocation.
 
@CharlesBailey what
 
arrays, do; not std::arrays.
 
10:56 PM
@LucDanton I just came up with this VisitorWrap utility just so that I can use Phoenix actors directly on a variant, e.g. boost::apply_visitor(make_visitor(std::cout << arg1), v);.
Am I missing something? Should something simpler/more elegant not already exist? /cc @R.MartinhoFernandes
 
@WojciechMorawiec you can even use 16[array]
 
@CCInc A new naming convention! Polish notation?
 
lol
 
@melak47 There's this too though I don't know the exact semantics of it :S
 
@EvgenyPanasyuk (and stand to be fired at-will :))
 
10:58 PM
16[array] looks just so wrong xD
 
@Rapptz it's just pass-by-reference, nothing magic
 
@WojciechMorawiec how about 16<:array:> ?
 
I meant why int* would be a better match should it not be templated.
 
Now if you lookup the syntax for a function declared to return an array by reference, that is funky shit
@Rapptz Well, the by-ref is one implicit conversion less (no decay)
 
@sehe std::add_reference<T[N]>::type f()? :P
 
11:00 PM
@DeadMG Deconstructionist. Think C-decl
 
You should always mach a digraph with the corresponding trigraph:
`16<:array??)`
 
Woot
 
@sehe That's insanity
 
I never would have thought that this chat's tagline "The real nerd kindom" is to be taken literally xD
 
@DeadMG It is :)
@WojciechMorawiec Really? You might want to use this link before you are contaminated
 
11:02 PM
I think I've asked this before
 
Good to know
 
int (&fn())[]; ... C++11 makes things [slightly] more obvious: auto fn() -> int(&)[]
 
But why are trigraphs and digraphs still in the language? Do people actually use them?
 
Ell
Hi
 
@Rapptz (a) because (b) hell no
 
11:03 PM
Even C removed their shitty gets :(
 
2 mins ago, by DeadMG
@sehe std::add_reference<T[N]>::type f()? :P
@Rapptz Really? I believe that's POSIX then?
 
gets was removed in C11 and replaced with gets_s
 
troll naming s_s
 
lol
 
"Safe" functions,my precioussssss_s
 
11:05 PM
By the way, nice to have you here. I believe that has been a while?
 
@me ? (I've no idea who else hasn't been around recently.)
 
Yes
 
This chat room went a bit rubbish about 4 months ago so I gave up. Perhaps I'm just bored, now.
I'm hoping that "constraints" make it into C++14.
 
Ell
What happened four months ago? An swarm of newbies?
 
Yeah. I agree. There has been a change of climate over the last period of time. More low level trolling, and slightly more useless pedantry. And lot's less of the ape :|
 
11:11 PM
@Ell It was just tedious and dull.
 
^ Add a lot of Cicada entertainment (still noise). Oh, and yes, nothing during the nights (US time)
 
Ell
Also are constraints concepts? O.o
 
Yeah
Well I think so.
 
@Ell Closely related, IYAM.
 
Ell
Has anyone here tried out concepts light Gcc built yet?
I tried to compile it but couldnt For some reason I can't remember
 
11:13 PM
Nope
 
@Ell They address the bit of concepts that was about checking the usage of templates without checking the definitions. A lot lighter in weight.
 
@sehe oh you
 
Ell
The error messages are the best part of concepts aren't they?
 
Look what I wrote.
bool operator==(nil, nil) { return true; }

// these are unambiguously worse matches than the above
template<typename T>
bool operator==(nil, T const&) { return false; }

template<typename T>
bool operator==(T const&, nil) { return false; }
 
@BartekBanachewicz → okay, self censoring useless opinionating.
 
11:16 PM
@sehe hey, that was spot on!
 
@BartekBanachewicz well, the original is still there :)
 
@BartekBanachewicz nil? huh!?
 
@melak47 lua::nil
 
@melak47 That's what I was thinking but I didn't want to appear stupid.
 
@BartekBanachewicz Just surprised you're taking the nil by value there
 
11:17 PM
@sehe It's usually "nil by mouth", isn't it?
 
@CharlesBailey lol
 
@sehe @kbok did it and I think it doesn't really matter, since it's an empty struct anyway
 
@CharlesBailey haven't ever heard that expression, methinks
 
@CharlesBailey lol
 
@sehe Me neither.
 
11:18 PM
@BartekBanachewicz fair enough
 
hmmm
 
@BartekBanachewicz Is this a question or a problem or something?
 
@kbok nil == nil
 
nevermind me
 
@CharlesBailey I am just showing off :P
 
11:20 PM
I must be tired
 
nil operator==(nil, nil) { return {}; }
 
@BartekBanachewicz Oh, OK.... Wow! Cool!
 
lol
 
he fits here, huh.
@CharlesBailey It's probably just late. Anyway, you'd probably have to look at the whole project to get what's going on and why it was important.
 
I like the duplication that C++11 allows:
`template<class A, class B> auto mul(A a, B b) noexcept(a*b) -> decltype(a*b) { return a*b; }`
 
11:21 PM
Spoiler: a TMP-heavy lua binder
 
noexcept(a*b) is awsum :3
 
@CharlesBailey "affords" :) It gets a lot better if there are type traits involved in the return type
 
@CharlesBailey Hopefully gone by C++14, no?
 
@sehe almost requires.
 
@sehe Just FYI oolua is TMP-heavy
 
11:22 PM
@BartekBanachewicz Not that I know of.
 
@kbok Wait. oolua is a thing, or you named your library effort this?
 
@kbok void Lua_table::set_ref(lua_State* const lua,int const& ref); ... my ass
 
The goal is to provide the best interface possible using only plain C++ features
 
@sehe oolua is another lib
 
11:24 PM
Why didn't my backticks work?
 
@BartekBanachewicz Nothing a bit of MACROs can't fix (also, I believe compilers already started supporting lambda-style return type deduction)
 
@CharlesBailey you can't use backticks in multiline messages :( At least I can't
 
@kbok Do you build on it, or are you looking to replace it?
 
@sehe we are building from scratch
 
@BartekBanachewicz What? That's so unfair!
 
11:25 PM
@CharlesBailey Multiline message have zero markdown, except 4-space indents which make everything fixed-width font
 
@sehe Meh.
 
@CharlesBailey It's a FAQ and meta has it explained as a feature
 
// That's why
// we use code
to += "post" / code;
 
@MichaelBurr Example: class EchoCommand { public: operator=(const char* text) { printf(text); } }; #define echo EchoCommand() = Afterwards you can use it like this: echo "look, mom, no brackets";Tri-Edge AI 4 mins ago
 
argh
 
11:25 PM
Lolwat?
 
For some reason I thought backticks worked so long as the content of the ticks (not the message) didn't span a line. nvm
 
@TonyTheLion Creates an rvalue EchoCommand and assigns to it.
 
Why would you want to do that?
 
you wouldn't
 
because PHP
 
11:27 PM
Some people just do weird shit without a reason.
 
With a #define, that's fugly
 
PHP burnt his brains
 
it's obviously intended to help some PHP developer whose brains are permanently scarred
 
Urgh, PHP
 
@kbok btw check out the Room if you haven't, I've posted another snippet there
 
11:27 PM
PHP scared his children away
@BartekBanachewicz that's quite cool
I hope we can check in more detail the contents of the exceptions though
 
exceptionErrorHandler returns what Lua gives you
 
@TonyTheLion Wait, how did that format. This is an awesome loophole in markdown formatting! Quick, report a bug accidental feature on Meta!
 
user142019
> help
 
@kbok we could at least parse that and get line number and possibly error type.
 
user142019
More like confuse the hell out of ~ when he does more than outputting.
 
11:29 PM
1
Q: C++ Standard Layout and References

TRISAbitsAccording to the C++ standard: A standard-layout class is a class that: —has no non-static data members of type non-standard-layout class (or array of such types) or reference. What property(ies) of references prevent classes with reference members from being included in the d...

Interesting
 
@Zoidberg Kinda like how a heart-and-lung machine helps those in a permanent vegetative state
 
@sehe, I don't do meta.
Feel free to post it if you so wish
 
@TonyTheLion :) me neither. Except the other time when I accidentally bumped into 100+ upvotes xD
@TonyTheLion Of course not
 
test.cpp(61): d == lua::variant("hello") failed for: hello == hello
that should decay, no?
 
user142019
Do we have a Scot in the lounge?
 
11:32 PM
@Zoidberg He went for free food. Oh wait, single 't' on purpose
 
user142019
I'm confused. What do you mean by that, @sehe?
 
user142019
Yes, @sehe, the single T was on purpose.
 
@Zoidberg Scott went for food
 
user142019
I just had a scrumptious sausage roll.
 
11:34 PM
zoidberg
 
user142019
And now the entire lounge is searching for the definition of "scrumptious".
 
what the fuck, man
put your avatar back
@Zoidberg I'm not a peasant.
 
user142019
s/a peasant/pleasant/
 
your substitution produces inaccuracy
 
Yeah Zoidberg, wtf is going on?
 
user142019
11:36 PM
I am hokey.
 
user142019
I feel like I'm on drugs.
 
user142019
And the drugs are called "oxygen".
 
better get clean
we wouldn't want you coding under the influence
 
user142019
@JohanLarsson you don't have to unbox and rebox six million floating point numbers. :v
 
@melak47 we wouldn't want you coding FTFY
 
11:41 PM
@kbok pssst, I don't think we have to worry about that if we get him off oxygen :)
 
lol
 
Man... I just started playing DX:HR again... such a great game
 
Ell
I must learn matrix multiplication by hand
 
@Ell wikipedia has it covered
 
11:44 PM
I know, worthless shit isn't it
@kbok Don't worry, he doesn't
 
hmmm
 
@kbok yes, it does exactly what we need
 
why isn't that from the manual
> luaL
 
it's a macro, prolly
luaL are auxiliary stuffz
lemme
 
I tought luaL was built on top of the vanilla lib
 
11:47 PM
let's stop spamming.
 

« first day (910 days earlier)      last day (4044 days later) »