« first day (876 days earlier)      last day (4079 days later) » 

Ell
12:00 PM
1gb left on the c drive xD
 
> This is because dense_hash_map uses malloc() and free() to allocate space for the key and value, and memmove() to reorganize the key and value in memory.
what about this?
 
What about it?
 
if it uses malloc, to allocate space, then it would do sizeof(key_type) no?
 
You're moving simple pointers around
 
or did I understand that wrong
 
12:03 PM
key_type is T*
 
Xeo
Erm, @DeadMG, what do you mean then with "console"?
 
@CatPlusPlus so it merely allocates space for the pointer itself?
 
T is pretty much irrelevant
Yes
It's a map of pointers to pointers
 
oh man, how confusing is that
 
It could be void* for all it cares
 
12:04 PM
@CatPlusPlus Anyways, the hash function dereferences it through type punning. It treats the referent as POD.
 
so the solution to his problem was overloading operator== correctly?
 
I don't know I didn't analyse that wall of code
 
oh right
Apparently I tried and didn't entirely succeed. At least I learned something
 
Ugh I'm wondering why stuff doesn't work when I fixed and I didn't push to staging
 
guys.
How to get minimal integral step for given float type?
 
12:08 PM
It's funny how this shit breaks because of assumed but not enforced uniqueness constraints :v:
 
Or do I have to fiddle with bits for that?
 
Xeo
@BartekBanachewicz integral step? Likely 1. :P
 
@Xeo I made an attempt at range-comprehension. It looked like this.
 
@Xeo nono, the smallest advancement step. Now that I think about it it requires bit operations, I guess
 
Ell
deleting 109,724 items... I didn't know I deleted so much xD
 
Xeo
12:09 PM
@BartekBanachewicz std::numeric_limits<float>::epsilon()?
 
Nothing too monadic though (is that what this was about?).
 
Xeo
@LucDanton Yeah, I was thinking monadic bind chain
 
@Xeo thanks!
 
I've never dreamed of having that in C++.
 
streams don't do move semantics, do they?
 
Xeo
12:12 PM
I've mostly thought about chains of optionality, primarily pointers and optional, where it's kinda tedious to check for null - although I guess, you'd only need that if you have a chain of optional functions too, huh.
@TonyTheLion They do.
 
ah ok
 
uh
I guess iterating over every double wasn't a good idea
there's a bit too many of them
 
I have apply (which is fmap) and range-for. I usually don't check for an empty optional before dereferencing it.
 
Xeo
@BartekBanachewicz ... wtf
 
I don't use optional that much just yet though. Maybe I'll make more tools when I notice something worth refactoring.
 
12:17 PM
Normals suffer degradation when you perform a non-uniform scaling transformation or a shear transform. The reason for this is simple, normals (or any "vector" calculated through the cross product ) are not really vectors. They are pseudovectors or axial vectors. Grassman algebra offers better handle on these concepts than classic linear algebra by introducing bivectors, trivectors etc.

u is the tangent vector and n is the normal vector, just keep their dot zero (them orthogonal) and try to deduce the normal transform if "standard" transform is A:
 
Also monomorphic lambdas are a big hindrance in trying anything clever!
 
Xeo
@LucDanton Btw, whenever I get this blog post done, I think I'll work on the []id proposal for lifting.
 
@Xeo actually I have tried every one between 0.472 and 0.473. Still too many
 
Xeo
@BartekBanachewicz Well, epsilon is very small
 
Now, time to eat.
 
Xeo
12:18 PM
Also, epsilon is the difference between 1.0 and the next larger representable value.
 
@Xeo I have read in game developer magazine that on floats it is actually pretty possible.
@Xeo uh sucks, so bit operations make more sense
 
Xeo
Btw, there's also denorm_min, but I guess your values are a bit too large for that :P
 
@Xeo The thing that came up and contains the output which I put to the console and takes input .
 
@BartekBanachewicz Have you tried iterating over every GUID instead
 
user142019
Snap is awesome.
 
Xeo
12:23 PM
@DeadMG Uhm, that's normall cmd.exe. Atleast when I do it.
 
user142019
Also, good morning.
 
Xeo
And I can right-click in there.
 
Now for another project: in-app purchases in an Unity game
 
Xeo
Maybe try left-click on the upper-left corner?
 
screenshot seemed to work fine
 
12:24 PM
good luck with that @CatPlusPlus, Kongregate will thank you
 
@Xeo Btw does that decay the result? Are lambda expressions slated to change in that respect?
 
@BartekBanachewicz ROFL
 
user142019
@TonyTheLion why wouldn't you be able to move streams.
 
Xeo
@LucDanton Well, it'd likely do return INVOKE(id, args...);, so yeah, decay-copy I guess.
 
user142019
That would be idiotic.
 
Xeo
12:26 PM
But that'd be something to think about
 
@Zoidberg I don't know, because stream are weird in C++
 
@CatPlusPlus @sehe verry funny
 
@Zoidberg "The Madman Has Returned" FTW
 
liveworkspace.org/code/3MsPKA$15 I don't get this, at all. How do you get the const to match up?
 
user142019
@CatPlusPlus Rails, being moronic, does all relationships in the app rather than in the Relational DBMS.
 
12:28 PM
FWIW my polymorphic anything are usually of the kind auto operator()(T&&... t) -> decltype( foo(std::forward<T>(t)...) ) { return foo(std::forward<T>(t)...); }
I'm not up-to-date on what the various proposals (magical auto return specifier, better lambdas) want to do in that area.
 
Xeo
@LucDanton I think the return-type deduction stays the same.
 
Ell
is there a way I can have a read only "property" without writing a getter? :3
 
user142019
Yes, have it generated.
 
@Ell Immutable type
 
Ell
I'll just write a getter xD
 
12:30 PM
@Xeo Which is weird, because IIRC those proposals are written by people that tend to use #define MAGICAL_RETURN( expr ) -> decltype( (expr) ) { return expr; }.
 
user142019
@Ell what language.
 
Xeo
@LucDanton Would break code, though, I think. :s
 
user142019
If you are using Java, please die slowly and painfully.
2
 
Ell
@Zoidberg c++. I want std::string description that cannot be altered
 
user142019
Make it const?
 
12:31 PM
@Xeo Not for function and function templates as that would be completely novel.
 
user142019
Also
 
user142019
Make it a free function; std::string description(my_class const& x);.
 
Xeo
@LucDanton Well, it would be very inconsistent, though.
I don't think that'll fly.
 
Oh look, the language is going to suck more.
 
user142019
@Ell what does your class do?
 
12:32 PM
Woah, intense.
 
@Ell const static getter?
 
Tortillas were hardcore.
 
Ell
@Zoidberg it represents a network interface
 
user142019
Make a member function std::string description() const.
 
Xeo
@LucDanton I understand why we'd want the "perfectly returning" version, and if you can think of a way to not make it be inconsistent and / or break old code, please do tell. :/
 
user142019
12:33 PM
Like std::vector has data() and size().
 
Possible way out is adding more obscure arcana and syntax, e.g. auto&& foo() { return blarg; }. Which I guess would go []() -> auto&& { return blarg; } for lambdas (not as convenient), and would mean you're screwed. Unless you pick that as the default.
 
Ell
Hmm. How to wrap a flags variable? :3 set<FlagEnum>? :P
 
user142019
Prepending get_ to the name is silly, since that implies that get_x() returns the data member x, while you don't want to give away your internals.
 
[&&]foo <- that way lies Ruby.
 
hey guys, ya know
 
Xeo
12:36 PM
@LucDanton auot&& would resolve to T&& for rvalue returns, which wouldn't extend the lifetime if it's bound to an rvalue ref or ref-to-const. (assuming current auto&& rules) I was thinking RemoveRvalueRef<auto&&>, but that just "breaks" xvalues.
 
This Git integration in VS is really cool
I am using it right now
and man..
works
 
You don't have to assume current rules, no. You can do whatever you want.
 
@BartekBanachewicz Try iterating unsigned integers for fun: http://liveworkspace.org/code/2Sn4TY$2 (FWIW it takes ~9 seconds on my system, but look how iterating ull would take roughly 1200 years at the same rate )
@BartekBanachewicz I've heard some reports like "why doesn't VS let me merge", "oh great now I can't switch to branch X anymore" too. I haven't got VS2012 myself a.t.m.
 
welp.
I switched to git bash at work
Tortoise was also fucking my branches
 
Xeo
@LucDanton I guess, although that whole thing would be outside my []id proposal, since I can just say that that special kind of lifting lambda does a "perfect return".
 
12:40 PM
@sehe 64-bit integers?
 
@MartinJames Dunno. Not really relevant
@BartekBanachewicz Huh. Never had anything strange happen there. How?
 
@Xeo I like to think that framing one's proposal in the context of others' is nice, but I don't know how much that actually matters.
 
Xeo
Keep in mind that I also only have time till Friday for any proposal I want to submit (and it should be in feature-complete/frozen/finished form) :s
 
@sehe I wanted to go back to branch that was behind, and either because I suck or Tortoise sucks I werent' able to in a sane way. My local copy got thrashed.
 
@BartekBanachewicz huh. That's ... pretty impossible (unless you "--force" checkout)
 
Xeo
12:42 PM
(aka no new features)
 
YAY! it le works!
 
@sehe I don't remember what I did exactly, apart from the fact I needed shell to fix it
 
Well I don't really expect you to use anything I say. It's your thing really.
 
Main() {
    thing := cpp("<WideLibrary/lols.h>").std.string();
    thing2 := cpp("<WideLibrary/lols.h>").std.string("Hello, World!");
    thing = "Goodbye, World!";
    thing2 = thing;
    cpp("<WideLibrary/lols.h>").std.cout << thing2;
}
I have defeated the evil Clang.
 
@BartekBanachewicz Wokay, but you could fix it. Mmm. Perhaps you missed the fact that it reported conflicts? You'd have gotten <<<<<< conflict ====== markers >>>>> in your code
@DeadMG Whoa. That's not ugly at all :)
 
Xeo
12:44 PM
@LucDanton That kinda makes it sound like I'm arbitarily rejecting your ideas. :(
 
heh
well, ideally, (once it's implemented), you would just do like using std = cpp("<blahblah>").std;
 
@Xeo But... you are free to do so.
 
I might implement that... right after committing.
 
user142019
@sehe eww mismatched angle brackets.
 
@Zoidberg I just wanted to illustrate in case he didn't know these were conflict markers
 
Xeo
12:46 PM
@LucDanton Sure, but I like having your input, since it makes sense.
 
user142019
@sehe I just wanted to illustrate you were bad at matching angle brackets.
 
@BartekBanachewicz In that case (conflicts) TortoiseGit's "Conflicts Merge" tooling is really quite nice.
@Zoidberg Thank you. I'm not actually bad at it :) I just didn't think it was important at the time.
 
@Zoidberg shut up. you are not constructive
 
@BartekBanachewicz acting constructively :)
 
Xeo
Back to the blog post for now, though.
 
user142019
12:47 PM
This is Lounge<C++>.
 
user142019
Of course I'm destructive.
 
@sehe well, I actually asked a colleague for help and he recommended raw git bash. I thought that I could also use some CLI git experience too anyway
I still have tortoise installed and use it, time to time
@Xeo hey, did it rain/snow in Germany today?
 
@BartekBanachewicz Yeah, that can work too. However, seriously, if there's one area where I vastly appreciate TortoiseGIT over CLI git (or, any other git client I know of, really) it is merging and conflict resolution.
 
Xeo
@BartekBanachewicz Not here.
 
Xeo
12:48 PM
@BartekBanachewicz Robot complained about snow, though, IIRC.
 
@sehe I appreciate GUI solutions in general, if you haven't noticed yet :P
 
In any case if/when you mention the semantics of []foo in terms of decltype( foo(/* args */) ) you can explicitly point out that means no rvalue ref return type.
 
@sehe VS diff tool seemed nice too at first glance though. Reminded me of that... blend? Linux tool
 
Ah there can be. I'm really getting accustomed to 'no rvalue ref return types'.
 
Xeo
@LucDanton Not even for actual xvalues?
 
12:51 PM
0
Q: How to measure read/cycle or instructions/cycle?

Johnny PaulingI want to thoroughly measure and tune my C/C++ code to perform better with caches on a x86_64 system. I know how to measure time with a counter (QueryPerformanceCounter on my Windows machine) but I'm wondering how would one measure the instructions per cycle or reads/write per cycle with respect ...

 
@BartekBanachewicz I appreciate good GUI tools, exclusively.
 
@BartekBanachewicz meld/wiggle?
 
@sehe meld!
@TonyTheLion ~performance~
 
On linux, valgrind --tool=cachegrind seems to be a good fit IYAM — sehe 8 secs ago
 
12:55 PM
@sehe oh ok
 
~PERFORMANCE~
OPTIMIZE + OPERATOR
god damn these noobs
 
@BartekBanachewicz Haha. Well, if you implement large_sparse_matrix<std::complex<long double> >::operator+ you might have a lot to optimize for!
 
user142019
 
Awesome
 
user142019
12:58 PM
People don't work on Sundays.
 
@Zoidberg lol
@Zoidberg i am doing uni shit
 
I LOVE my new PC. I just copy 9.3GiB of data.vdi to my /tmp (tmpfs) and bzip2-ed it down to 5.2GiB in just 4m10s.
 
user142019
You're not at work.
 
Now I'm curious - how does the sloth survive?
 
user142019
Time to play some Minecraft.
 
12:59 PM
@Zoidberg Well, it doesn't matter. It's still NSFW
@DomagojPandža By eating stuff, presumably
 
user142019
@sehe Well, it doesn't matter. It's still Sunday.
 
@Zoidberg sehe's daughter works 24/7.
 
user142019
I made some progress on Hexapoda, by the way.
 

« first day (876 days earlier)      last day (4079 days later) »