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

8:00 AM
@R.MartinhoFernandes N and L vectors are normalized, so Half will also be.
if the sun is exactly above the plane, the N and L vectors will be the same
which also means that H will be the same, N == L == H
now, dot(n,h) == dot(n,n)
and dot product of the same vectors will never be zero as long as the vector was nonzero, which is the case here (n is normalized obviously)
it's fairly easy to see my reasoning here, no?
oh, I've messed up a bit
in my example, N == V == L == H
when looking exactly to the center of the sphere
To illustrate even better, if this holds, then it will still hold for any versor (I hope the translation is correct)
If L = N = H = V = vec(1,0,0), dot(N,N) = 1*1 + 0*0 + 0*0 = 1
which gives us full highlight.
(bonus points for Q.E.D. unicode character :))
 
Well, my specular highlights are correct.
But my specular color is dumping to 0 for some reason.
 
user1357851
sign ... why create delicious food then punish people who love them with fat?
 
@ThePhD sounds weird
 
Man, casing is fucking messy.
 
Have you noticed how code on a programming site is better than a loose description of said code? — Mitch Wheat 10 mins ago
lol
 
8:15 AM
@R.MartinhoFernandes casing? (Also, look, look, I've used unicode!)
 
.
^ Look, I used Unicode too.
 
One Width Period™?
 
you are laughing at me :(
I was so proud of my little black square
 
@Rapptz No, just good ole full stop.
 
Xeo
@Rapptz Just period. It's nothing special. The 127 ASCII characters are also part of Unicode, with the same value.
 
8:19 AM
Oh... I'm doing something grossly wrong with my pow and exponent functions...
 
I thought it was clear I was making a joke :(
but okay guys, I get it. Unicode is serious.
 
yea, no jokes. Only boring stuff :P
 
Xeo
@Rapptz Srs bsns.
 
Ugh, all three casing algorithms are full of special cases and shit. Fuck it, I'm going to play some game.
 
Xeo
haha
Some Nuclear Ninjas? :P
 
8:26 AM
robot
you and I both suck.
 
=[
My specular highlight is aweful.
 
Xeo
@DeadMG Oooh, where's that statement coming from?
 
a hole in our mutual encoding APIs
 
Xeo
Do tell.
 
well
you can get our respecting encoding functions to throw on invalid.
but you can never ask them if a sequence is valid.
 
8:31 AM
bool-returning functions FTW.
 
so you can't do if(!is_valid(input)) std::cout << "Fuck you.";.
 
Yes, you can.
Try encoding it, and if it throws it's invalid.
 
that's really not the same at all
 
Xeo
Hm... optional<text<stuff>> encode(...)? I'm not necessarily a friend of going twice over a sequence if you only have to go once (i.e., if it's valid, encode it again).
 
for example, if input is input iterators, then the valid part of the input is irrevocably lost.
 
8:33 AM
I considered adding optional validity testing functions to the encodings, but then I wondered why you would want to test that and not encode it.
 
@R.MartinhoFernandes You do both simultaneously.
 
@DeadMG No, it isn't. All my ranges are iterate on demand.
 
@R.MartinhoFernandes that sounds like using exceptions for flow
 
(bool, iterator) validate(input, output_iterator)
 
boost::copy(ogonek::utf8::decode(source), destination); does not lose any data.
 
8:35 AM
hmm
 
@DeadMG Why do you want the iterator?
 
@R.MartinhoFernandes To point to the invalid.
 
Xeo
@R.MartinhoFernandes How not, if source is a single-pass-range?
 
well
to put simply, the Committee is not a fan of losing information.
 
8:36 AM
@Xeo It works as a single pass.
 
the validate function knows where the invalid data is.
 
And what can you do with it?
 
and at least three members will bitch about how if it's invalid, you have to find the end yourself.
@R.MartinhoFernandes You could say, "Error on line fifteen column three".
 
Xeo
@R.MartinhoFernandes Isn't the invalid part lost?
 
Um.
 
8:37 AM
@Xeo What can you do with it?
 
Normals, in general, should be multiplied by the world matrix, right?
Like, the 3x3 rotation part of the world matrix?
 
no.
 
Also, @R.MartinhoFernandes and @Xeo, are you going to fill in? :)
 
@DeadMG That's stuff you can carry on the exception.
 
@R.MartinhoFernandes That's still exceptions as control flow.
not to mention when I want to skip errors, but log where they are.
 
8:38 AM
I honestly don't see a problem with it.
 
Hm.
 
@DeadMG You can write a validation strategy for that.
 
I didn't provide for user-defined strategies.
 
So normals... should not be multiplied by the World matrix of hte model?
Oh, well I guess... man, I dunno.
 
world inverse transpose.
get a book you noob
4
 
8:39 AM
@DeadMG I want to control the flow, because if you are using the returned range with std::copy or something, I want to bail out.
 
@DeadMG Get a boob you nook.
 
@DeadMG he would have to write that book himself to read it
 
@R.MartinhoFernandes validate still bails out. It's just a lot cleaner if the user wants to decide to bail back in, as it were.
 
@BartekBanachewicz It's exceptions for reporting an erroneous case.
 
:c
 
8:40 AM
@DeadMG I don't think that's a use case for anyone but codec writers...
If you want to continue, use a validation strategy that doesn't throw.
 
yeah, but I didn't provide any that don't throw and do provide some information about failures
it's policy-based but the user can't provide their own policies
mostly because I couldn't figure out what interface they should have
 
I also considered adding optional validate for doing quick checks, for encodings where validation can be faster than decoding, but ignored it for the same reason.
 
Also @ThePhD Ubuntu 12 is running Compiz by default right now, so if you were really complaining about that slowing your system, I really don't know what the hell is wrong with you.
 
@DeadMG Haha, I haven't stabilised that part either :P
It's messy.
 
yeah.
that being one of the reasons why I ultimately decided against user-definable policies right now.
 
8:44 AM
Currently, my interface is terrible.
 
which means that I need to provide primitives
and I think
you could build any policy on top of validate.
 
Oh.
There's also the fact that I provide encode_one and decode_one, so you can always drop down to that and get full control of everything.
 
yeah.
validate would basically be that, except I keep encoding if it's good.
 
Those have usable interfaces, unlike validation strategies.
template <typename EncodingForm>
static boost::sub_range<Range> apply_decode(boost::sub_range<Range> const&, EncodingState<EncodingForm>&, code_point&);
template <typename EncodingForm>
static detail::coded_character<EncodingForm> apply_encode(code_point, EncodingState<EncodingForm>&);
Output params, detail types, all kinds of crap.
 
so I see
 
8:50 AM
Weee, specular highlights that can blot out the sun.
 
@R.MartinhoFernandes how do you wanna circumvent output params(tuples?) and why do you think they are crap?
 
FUCK
FUCKING SHIT FUCK COCK SHIT FUUUUCK
It wasn't my fault. ._.
My specular highlights are FANTASTIC. FUUUUCk the police.
@Rapptz Anything ^ 0 = 1, which is what screwed up my speculars so bad. :3c
 
how is this my fault
it's a mathematical axiom
 
It's not your fault. I'm just saying.
 
Xeo
@bamboon Tuple return types that are expected to be unpacked are really only nice if they're language integrated, I find.
 
8:53 AM
A variable which I thought to be changing - and the code confirmed it was changing - was stuck at a value of 0. I was baffled.
So now I have to do some more investigating and shit. See what's really going wrong...
 
@ThePhD What.
 
float3 halfvector = normalize( vout.lightdir + vout.eyedir );
float specularfactor = pow( saturate( dot( halfvector, norm ) ), 1000 );
^ @EtiennedeMartel Before, 1000 had a vartiable named Shininess in its place.
 
@ThePhD pics or didn't happen
 
@bamboon Having to declare variables beforehand is annoying.
 
Shininess was always evaluating to 0, for some stupid reason I have yet to find out.
 
8:55 AM
@ThePhD Well, well.
 
I'm not sure returning tuples would make the interface more usable.
What this is really asking for is an environment monad, but that's not usable in C++ either.
 
Because it was evaluating to 0, (STUFF) ^ 0 meant 1 in GPU land, so my ENTIRE MODEL was white.
Forever. And in all eternity.
 
Xeo
@R.MartinhoFernandes Exactly, and it requires a default ctor (unless you do some weird shit with optional<T>).
 
Which is a shame because he has suck a tasty chocolate skin color.
 
@R.MartinhoFernandes that's right, but which other choice do we have?
 
8:56 AM
@Xeo In this case, that's not a big problem: states are required trivial, and code_point is scalar.
 
@Xeo I feel the same but ^
 
Xeo
@R.MartinhoFernandes Well, this particular case, maybe
@R.MartinhoFernandes To generalize: Monads are not usable in C++, is what it seems to come down to.
 
I think the state actually works fine as an output param: you just declare it once, and then pass it along on all calls and everyone updates it as needed.
 
that's because it's not really an output param.
I mean
it's value is not the output of the function.
it's just some extra state you need to keep using.
 
Xeo
Sounds like it should actually be a class member of some sort
 
Don
9:02 AM
@BartekBanachewicz I put some of the code on pastebin for you to see :) pastebin.com/MmVR5pkc
 
I don't think I'll give custom validation strategies first-class support anyway.
 
Xeo
Also, da fuq is the "if statement proposals". Fucking nutjobs.
 
@Don my DNS can't, for strange reasons, resolve pastebin.com. Please use Gist
 
@Xeo It only lives during some function execution. It doesn't really have an object to attach to: it is that object.
 
@ThePhD Pics? :)
 
Xeo
9:03 AM
Hmm
 
@Xeo hhahahaa, yeah.
 
Xeo
The swappable proposal, on the other hand is actually something useful for once.
 
encode(source) {
    state s;
    for(auto it = source.begin(); it != source.end(); ) {
        it = encode_one(it, s);
    }
}
@Xeo Usage is something like this. (very pseudocode-y)
 
Xeo
Hm, that looks meh even if you swap state and iterator.
Also, where's the output? :P
 
(very pseudocode-y)
It's actually more like boost::copy(encode_one(*it, s), out);.
 
Xeo
9:10 AM
hmm
 
So true :'(
 
does anyone are good with css here (flexbox)
 
Xeo
@R.MartinhoFernandes :s
24h Shop and if you're lucky, Tankstelle.
 
@Cicada hahaha
 
stop laughing and help me!
 
9:13 AM
sure
gimme codez.
 
Don
@BartekBanachewicz Oh alright, gist.github.com/anonymous/d6ab2ed3ce6e3c166e8a
 
i want all flexbox elements to grow to the size of "some longer item"
i have no idea if it's even possible in pure css
 
I don't think so too
each element is calculated based on cascade
but it doesn't know shit about siblings
 
size = some longer item?
 
9:16 AM
@Don looks like as sucks -.-
 
@BartekBanachewicz that's the whole point of flexbox
if you add -webkit-flex: 1; to flexitem, they'll all get the same width
but suddenly will stop row wrapping
meh
 
oh
did you look at my repo btw?
 
Oh no, I went out yesterday
I'm heading back to Rennes at midday so I'll take a look tonight
 
kewl
I am fighting with makefiles again
after all this Wafs, sconses and all crap they seem really the easiest way to build shit
 
"I am fighting with makefiles (...) easiest way to build shit"
 
9:21 AM
@R.MartinhoFernandes I've built some of the code already!
Now I am mostly adding dependencies
i don't know how linux does that exactly so it's kind of try-and-error
 
Oh right, so easy.
 
what are you using to build ogonek?
 
Oh, awesome, found a website dedicated to flexbox testing
 
@BartekBanachewicz g++ has flags for generate make dependencies as output.
 
9:25 AM
uh, still worse than drag-and-drop
I wonder why VS still doesn't have library package system of some sort
 
Dunno. When I want to add some file to my project, I just create it.
Everything else is magical.
 
yea my make now uses wildcards too
ugh what this ubuntu has boost 1.49 in repos
how damn old is that ;/
 
lolwut this got accepted.
1
A: Parsing quoted strings in C

R. Martinho Fernandes Is there native support for a data type for storing Unicode strings in C. Yes. Since Unicode strings can be stored as sequences of bytes using an encoding scheme, one can use arrays of char for this purpose. Note that supporting storage says nothing about the ability to interpret or manipul...

 
Xeo
9:39 AM
@BartekBanachewicz For my project at work I settled on SOURCES = $(wildcard $(SRCDIR)/*.cpp) and OBJECTS = $(SOURCES:$(SRCDIR)/%.cpp=$(TMPDIR)/%.o), and then $(TMPDIR)/%.o : %.cpp for the buildbot, but that doesn't take header dependencies into account. :<
Not a particular problem since it's on a buildbot, but for normal development, it's ... meh
 
welp
@Xeo after all Linux isn't meant for normal development (at least of Minicraft) so it shouldn't be a problem
 
make is a primitive rule engine
 
that is true
any other blindingly obvious facts you want to share?
 
Xeo
Doesn't that apply to isolated build engines in general?
 
It is not a good choice for a complex build system
At least, not writing Makefiles by hand
 
9:42 AM
Thank you, captain! :)
 
(Not that generating them is any better)
 
yea, I like the idea of waf much much more
however, as for now, I just want to build shit
 
Xeo
How is waf better?
 
it is bundled with project files and is standalone
you need only python, java or .NET platform present
 
@Xeo It's not make
 
9:45 AM
@CatPlusPlus meh, waf is actually better, so using that lame arguments is unnecessary
 
I'm serious
 
Xeo
@BartekBanachewicz Very standalone. Make is also standalone, only needs GNU make.
 
It doesn't rely on shell tools for stuff like deleting files, it has its own dependency scanners, it's easier to extend
 
@Xeo which is totally available on every windows
 
It doesn't use arcane homegrown language that requires tabs for indentation :lol:
 
9:47 AM
and the system that has neither python, java or .NET is hardly usable at all
 
Make is not standalone
It can't do anything but resolve dependencies and run external tools
(And that's manually written dependencies)
 
how do I do quick replace in vim?
 
Not being able to compile is kind of obvious, but make can't even create a file without calling into shell
 
Xeo
@BartekBanachewicz What is "quick replace"?
 
:help :s
 
9:49 AM
@Xeo it's a replace based on currently selected text
 
is a monad related to a lambda at all? (trying to understand monads in context of Haskell)
 
@Xeo something like "tap x to select current word, tap y to go to quickreplace mode, type what do you want to replace it to and enter"
 
@kfmfe04 Not really
 
Xeo
C-V, select stuff, :s/shit/othershit/g?
 
@BartekBanachewicz ciw
In normal mode
 
Xeo
9:51 AM
or... that
 
Change In Word
Or cw (Change Word) if you're at beginning
 
okey, thanks
 
Whenever you think about selecting to replace something there's probably a command that does it without selecting anything manually
 
yea
also, fun fact : now I do learn how much MSVC++ and ICC allow that isn't exactly allright :/
 
ICC has an MSVC compatibility mode, IIRC.
 
9:53 AM
@DeadMG I rather want C++ compatibility mode
 
Xeo
/Za helps a lot
 
there's an option for it somewhere
@Xeo Then, the compiler can't parse it's own headers.
 
@Xeo yes, which breaks my build because of some windows headers
 
Xeo
@DeadMG No make standard compliant :<
 
I meant for ICC
you can turn off MSVC compatibility.
 
Xeo
9:55 AM
@DeadMG stdlib headers work fine
 
uhh
why doesn't gcc compile __asm { int 3 }?
is the syntax different?
 
@Xeo The headers which MSVC ships with include the Windows headers.
 
Xeo
Because __asm is MSVC-style
 
@BartekBanachewicz Yes.
also, inline assembly is really, really bad.
 
@DeadMG it's only for a debug breakpoint
 
Xeo
9:55 AM
In GCC, it's asm("int 3"), IIRC.
 
operand size mismatch for int
 
@BartekBanachewicz MSVC has __debugbreak().
 
@DeadMG i am trying to compile on linux now, if that isn't apparent
 
and unlike inline assembler, won't clobber all the compilers program reasoning, and will work on x64.
@BartekBanachewicz Right. All I'm saying is, GCC probably has an intrinsic too, because inline assembler is terrible.
 
@DeadMG raise(SIGTRAP) ?
 
9:58 AM
what do I look like, a GCC user?
 
hahaha, okey.
duh, SIGTRAP probably requires a ton of posix crap
BYTE bCrash = *(BYTE *)(NULL);
best breakpoint ever ^
 
It's UB, it might not even crash
 

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