« first day (1362 days earlier)      last day (3812 days later) » 

user3010322
20:01
.... But to achieve good "soft shading" you need to sample like
user3010322
50+ rays, right?
user3010322
Isn't that... ...
user3010322
... .... really, really bad?
user3010322
Complexity-wise?
user3010322
Is there no other way to compute soft shadows?
user3010322
20:05
Do I have to shoot some 50+ rays into the scene?
@Feeds NOOOOO!!!!
@ThePhD soft shadows != AO
user3010322
@melak47 Well, what're the other ways of doing soft shading?
soft shadows is when you do crap to get a soft penumbra and stuff on shadows. AO is when you fake global illumination
user3010322
20:13
"do crap to get a soft penumbra and stuff on shadows" NOT HELPING. ;~;
@ThePhD I use 256 sampels with multi-jittered
256 with jittered looks horrible
AFAIK if you want to do ray tracing rendering, and want soft shadows, more rays is the only option. The more defuse the reflections (thus shadows) that more rays need to bounce of each surface.
I think even 512 with jittered looked horrible IIRC
^soft shadows
^AO
@ThePhD 50 will do nothing with jittered; it will look so shit you will want to stab yourself in an eye with a fork
user3010322
20:15
@melak47 idgi
what?
@ThePhD if you're still using jittered, scratch it and write a multi-jittered sampler; and then use 256 samples - map them with shilrey's mapping to a hemisphere (not with something like rejection mapping)
soft shadows is when your shadows don't have shadows so sharp you can cut yourself on them, like stencil shadows in doom3. the edges of the shadows get softer the further away from the point of contact it is
Got an accept a year late. Better late than never huh? ;)
soft shadows exist because light sources emit light from within an area rather than an infinite-small point
20:18
@melak47 hmmm sweet sweet AO
fuck.
Xeo
Xeo
@melak47 how do you decide the umbra and penumbra?
I really want to write another Wide tutorial, but Clang's crappiness is doing more blocking.
@Xeo radius of the light
and distance
user3010322
I still don't get it to be honest.
20:33
you test from your location if you see the light. yes? -> lit. no? -> shadowed
user3010322
That's just hard shadowing.
if your light is not a point light though, there is an area where the light is only partially obscured
when is something considered "common knowledge" without a need to cite it?
user3010322
How do you find that area? Shooting a ray from two opposing sides of the light?
@ThePhD As far as I can see, the core point is that lights do not emanate from a single point, but from an area. Therefore, it's possible for an object to obscure light from some of that area but not all.
user3010322
20:36
Maybe I should just shoot like, some 32 rays at various points at the light.
user3010322
Test if they hit the light or get obscured.
@ThePhD instead of sending one ray to the light to see if it's obscured, send N rays distributed over the surface of the light
user3010322
@melak47 That's easy for a sphere, going to be harder for a glowing amorphous mass.
yup :D
user3010322
._.
20:37
usually though, light shapes are restricted to a few basic shapes like spheres, cylinders, capsules, rectangles
user3010322
Maybe I should keep "Edge data" for each of the things.
user3010322
@melak47 TOO RESTRICTING. D:<
when you get to objects emitting light from their whole surface...that's when you get into light bouncing I guess :E
user3010322
Bleh.
user3010322
It's all too horribly complicated.
user3010322
20:38
Give me my hard shadows. I like my hard and semi-hard things.
you can always reduce it down to a triangle case :p
No innuendos allowed.
:v
user3010322
(I have a half-hack that reduces shadow based on the opacity of the object it passes through, plus Beer Glass law.)
user3010322
@Rapptz ? Am I missing something? D:
> I like my hard and semi-hard things.
user3010322
20:39
Oh, come on. :c
not sure what semi-hard is supposed to mean here
Ell
Ell
A half-boner. The chubbs, if you will.
@ThePhD and AO on the other hand is sort of what you would get if you calculated soft shadows for every point on a luminescent dome
user3010322
@melak47 So AO is a cheap hack of regular soft-shadowing.
well, actually doing it like soft shadowing would be crazy expensive
so you do a cheap hack :p
user3010322
20:44
Mmm.
but even if you did it the crazy way, it's still a hack for global illumination, since when you're inside there is no sky illuminating crap
user3010322
Delicious God's rays.
and then we get into light bouncing again :v
Do you respond to all happy birthday messages on your facebook?
Ell
Ell
@StackedCrooked I respond to none of them
nor do I post any of them :P
I don't think anyone cares at all
20:45
pragmatic :P
I think facebook thinks I'm dead
Ell
Ell
Honestly I don't know anyone who cares
It takes so little effort to post them
You may as well have a script do it for you
I like Facebook. I discovered that there are fun people in my family.
Ell
Ell
I just use it for chat
I like the concept of facebook, but it's polluted with far too much crap for me to put up with.
20:49
I stay away from the games. I tried to play once, and never again.
I quit after 5 minutes after I realized it all revolves around sending invites.
And if I achieved something in-game it got posted on my wall.
wtf
Ell
Ell
yup
I just like the idea of a sort of global address book. In theory, anyone in the world could look me up. In practice though, it's too much shite.
user1804599
Hmm.
user1804599
Implementing lexically-scoped this is surprisingly easy.
But if you ignore the games, and focus on the social aspect, then FB seems to work well.
20:52
I should make myself some fancy bussiness cards... just so I can do that fancy thing where you highlight parts of your email as 'twitter' or 'web'
@StackedCrooked you
Yeah, my only family is a sock-puppet Facebook account :(
But we keep updated.
@StackedCrooked oh yeah, I also don't like the social aspect of facebook too much
all the features it seems to want to intergrate I already have better solutions for.
user1804599
HUP HOLLAND HUP
FB is good for trolling people and wasting time on
user1804599
20:54
Omg.
user3010322
@Xeo Remember that set/resolve stuff we were doing?
@TonyTheLion like I said, I already have better solutions :P
user1804599
I can implement local lazy vals now that I do static scoping.
New Haskell home page.
Xeo
Xeo
@ThePhD hai?
user1804599
20:55
@Rapptz I like it, except for the “Rock-Solid Ecosystem” part.
@rightfold Oh, right, they are playing.
user3010322
@Xeo Well, it turns out it half-exists: std::ptr_fun<int, int>( std::toupper ) is apparently a thing.
I hope they kick Argentina's ass.
Xeo
Xeo
> deprecated
user3010322
@Xeo Oh. Well fuck them then. :D
Xeo
Xeo
20:56
> This function and the related types are deprecated as of C++11 in favor of the more general std::function and std::ref, both of which create callable adapter-compatible function objects from plain functions.
std::ref is an interesting case
std::ptr_fun is there to make function pointers behave like unary_ and binary_ function things
Xeo
Xeo
since it's a cheap INVOKE
with the typedefs and everything
user3010322
Hm.
and since those are relatively useless now a days it's deprecated
user3010322
20:57
WTB std::resolve_fun<Sig...>( function or object )
lol the new haskell page has a tutorial similar to the python basics
Xeo
Xeo
@ThePhD Can't really work as a library feature
user3010322
@Xeo Why not? We implemented it!
Xeo
Xeo
As far as library features go, I think we pushed it as far as possible
@ThePhD It's imperfect
user1804599
Unless with “rock-solid” they mean that the Haskell ecosystem is flexible as a rock, in which case I fully agree.
user3010322
20:59
How so?
user3010322
We deal with almost every single case possible.
Xeo
Xeo
... I told you the problems
user3010322
I remember no such thing! D:
user3010322
We even put down error messages!
Xeo
Xeo
void fun(int);
template<class T>
void fun(T);
try that with resolve<int>(fun)
20:59
posted on July 09, 2014 by Raman Sharma

Raman Sharma Raman Sharma 2 4 2014-07-09T18:42:00Z 2014-07-09T18:42:00Z 1 647 3690 30 8 4329 15.00 Clean Clean false false false false EN-US X-NONE X-NONE ...(read more)

user3010322
CTP2 ?
user3010322
Can it install side-by-side?
Xeo
Xeo
@ThePhD ignore, no update to VC++
user3010322
Meh.
Xeo
Xeo
Hm, maybe the template thing actually works due to ordering, dunno. but it's not possible in the fully general case to make this stuff work without language magic
21:00
huh, I've slowly crept up to nearly 3K
user3010322
@Xeo Well, if we have core language changes to make then it won't happen.
half tempted to do an answer bing to push for the next level
user3010322
So I guess I won't propose that.
user3010322
But I still want []teehee, damnit.
user3010322
And I want it to write out a lambda that PERFECTLY matches every single function call of "teehee", not just do some forwarding bullshit.
Xeo
Xeo
21:02
@ThePhD impossible
user3010322
How is it impossible?
Xeo
Xeo
ADL
user3010322
[]teehee would be a language feature. The compiler could do it!
prepare to see a month of trying things that get close, until you point out it's no where doing all he wants
user3010322
21:03
@Xeo Oh. Well, god fucking damnit.
wat u guys fink
Xeo
Xeo
:D
@Puppy why the size difference? why not live link?
user3010322
Don't smile at me, this is horrible. ;~;
@thecoshman What do you mean? I cropped the whitespace out in Paint, if that's what you mean w.r.t. size difference.
21:03
Cool VS2014 finally has an option to get rid of the all caps without a registry hack.
Xeo
Xeo
meh
user3010322
@Mysticial But they're watching to see if they can turn it back anyways.
Xeo
Xeo
I was never really bothered by that anyways
@Puppy the compile button, then the output box, different heights
yeah, I actually don't know.
21:04
hello world!
Bootstrap doesn't seem to handle textareas very well
@ThePhD Like seriously, who the fuck thought it was a good idea to make it all caps in the first place?
Fugly as hell.
Xeo
Xeo
Steam also has ALL CAPS stuff
user3010322
Probably some <compelling user experience study> or whatever.
Xeo
Xeo
vOv
21:05
@Puppy why is it a text area? it's pure output, no?
@Xeo They're not in-your-face enough for me to notice.
Xeo
Xeo
lol, the SHOP LIBRARY COMMUNITY <NICK> isn't in-your-face ?
@thecoshman Good point, I guess.
user3010322
std::exp<real>
user3010322
Why is this not a proper resolution of which overload I want
user3010322
21:06
Behave correctly, C++, goddamnit. ;~;
@Puppy good? it's fucking moronic I have to say it. Text area is for input, if not an input, don't use a text area. SEMANTICS!
user3010322
I don't have time for this, I'm already sick. OBEY MEEE.
Xeo
Xeo
@ThePhD because not all of it is a template
and there's the std::complex one
which is also templated
I know you said you were bad at webdev, but seriously guy
user3010322
<____________>
21:07
I'm wondering, if I redirect std::cout to a file by swapping the buffers, does std::cout looses its thread-safe property ? Said differently, is sync_with_stdio linked to std::cout or with the buffer ?
user3010322
Someone shoot me.
Xeo
Xeo
Overloads are shooting you
@thecoshman Well, originally, it was for something different.
user3010322
@Xeo You're going to be the villian in my game now. c:
Xeo
Xeo
user3010322
21:08
💔
@Puppy what? people enter a desired output and you generate a program that will make it? any way, point is, text area is a bad choice, and probably making it harder then it needs to be by far.
user3010322
static_cast<real( * )( real )>( std::exp )
user3010322
Someone kill me now.
(Same question for std::cerr and std::clog and the interactions between them, but i believe the answer would be the same)
Xeo
Xeo
resolve<real(real)>(std::exp)? :P
user3010322
21:10
@Xeo Does not compile in VC++, unfortunately.
Xeo
Xeo
hahaha
user3010322
It works with functors,t hough.
user3010322
But it breaks on free and member functions.
user3010322
Even in the latest VC++ I have at work.
user3010322
Which is just absolutely baffling. And why I want []teehee so bad.
user3010322
21:11
resolve<real>( []std::exp ); DONE.
Ell
Ell
@ThePhD wut
what is []teehee?
user3010322
@Ell Lifting-Lambda expression.
Ell
Ell
:S
user3010322
Or, make [](function-id) into a functor.
Xeo
Xeo
@ThePhD doesn't even need resolve
user3010322
21:12
@Xeo Yeah, but just to show how much easier it'd be.
Xeo
Xeo
@Ell short-hand for [](auto&&... a) -> decltype(auto){ return teehee(_fwd(a)...); }
where I abbreviated _fwd
std::forward should really be a language feature
user3010322
Might as well just write a macro.
Xeo
Xeo
specifying the template argument is annoying
#define _fwd(a) std::forward<decltype(a)>(a)
user3010322
#define LIFTLAMBDA( id ) [](auto&&... a) -> decltype(auto){ return id(_fwd(a)...); }
user3010322
WORKS FOR ME.
Xeo
Xeo
21:14
@ThePhD is what I presented here before
just LIFT though
user3010322
I really didn't want that macro
user3010322
but I may as well.
user3010322
It'll also help with all my gl functions
Xeo
Xeo
Bitfenix Shinobi, y u no sideways bays :(
user3010322
LIFT_AND_TYPE( id ) LIFT( id ); typedef decltype( LIFT( id ) )MACRO_PASTE(id, _t);
user3010322
21:16
Or something
user3010322
I dunno. I'll figure it out.
I forgot people paid for "textures"
with "textures" being photos of real life phenomenon.
user3010322
Indeed.
If you tried this in C++, you'd get a memory leak:
15
Q: How does a garbage collector avoid an infinite loop here?

Michael BConsider the following C# program, I submitted it on codegolf as an answer to create a loop without looping:: class P{ static int x=0; ~P(){ System.Console.WriteLine(++x); new P(); } static void Main(){ new P(); } } This program looks like an infinit...

"royalty free textures"
literally pictures of the ground
@thecoshman Label definitely looks and feels nicer but doesn't work properly with multi-line output.
@Rapptz lol "textures"
user3010322
@Rapptz But they're high-res pictures of the ground!
@Puppy label? just a div or p will do the job, maybe a span as it's preformatted
21:19
No one ever tried ?
I guess i'll have to test myself...
I remember a friend of mind being yelled at for not giving credit for using a texture. I thought they were kidding because it was just a picture of wood but alas, they weren't.
user1804599
Yahoo!
user3010322
Hooya!
Ell
Ell
@ThePhD You could write it with a unary operator couldn't you?
template<class T>
decltype(auto) operator*(T& f) {
    return [&](auto&&... a) -> decltype(auto){return f(std::forward<decltype(a)>(a)...);};
}
:P
user3010322
What... ?
Ell
Ell
21:20
It probably interferes with most types horribly :p
user3010322
That wouldn't work.
Ell
Ell
auto f = *myfunc;
f();
user3010322
*myoverloadedfunction; // boom
Xeo
Xeo
21:21
@Ell erm
@Ell It needs to be a macro or something.
@Ell Yeah that won't blow up horribly
Ell
Ell
@Xeo I'm terrible at c++ and I don't even know what forward does :P
Xeo
Xeo
that completely defeats the reason to put it into a lambda in-place in the first place
21:22
Don't define templated operators
Xeo
Xeo
which is to properly work with overloads / templates
@thecoshman They all have the same problem- the text appears way outside the output area instead of the output area expanding like a textarea does.
@CatPlusPlus It's fine to do so. Just make sure it has a constraint.
@Puppy You are aware that you pick the element for its semantics, not looks, right? You can change the look with CSS
IMO anyway.
21:23
@CatPlusPlus I could do, but I'd really rather not. Arranging a few divs with Bootstrap is about the limits of my abilities.
@Puppy no... an element will (by default) grow in height for the text in side to fit. The border in then styled to make it look like a nice fancy box
What are you trying to do
I have an output area for the program output, and a button addon to the left, and I'm trying to style it so that it doesn't look terrible either normally or with multi-line output.
user1804599
haha
user1804599
good luck
21:25
if I use a textarea then bootstrap makes the button not align properly, and if I use a label/span/p/whatever then it doesn't resize to fit the text.
Do you have it online somewhere
Put it on jsfiddle if not
codepuppy.co.uk/Tutorial/HelloWorld.html shows the issue with the text area
it resizes automatically if you change the program to output several lines
Xeo
Xeo
> Apparently 1 in 10 of us live next door to a pedophile. Not me though. I live next to a beautiful pair of seven year olds.
Ell
Ell
I'm a little confused. How does the lift macro work with overloads as well?
Xeo
Xeo
21:26
dat comment
but even if you don't, the buttons don't align properly.
Xeo
Xeo
@Ell it doesn't resolve id like a function would
Ell
Ell
Oh okay
Your code is an awful mess fyi
Also oh my raw XMLHttpRequest I don't think I've seen that in years ;v
it's the output of a python templating framework.
inheriting a few templates.
the actual source is a bit prettier.
user1804599
21:29
@CatPlusPlus I want a wrapper that uses Promise from ES6!
as for the XMLHttpRequest I stole it from coliru so blame stacked :P
user1804599
Then I can use it with my precious async/await syntax. :3
here's the new version I'm trialling
the dropdown on the left allows you to switch examples nicely and the output area looks a lot nicer too (plus automatically generated pagers)
but if you change the output to be multiple lines, the output area stays fixed and the browser just renders the text outside it.
<span> is not a block element
yeah, I also tried p and label
Xeo
Xeo
21:31
@Puppy Oh hey, at least your design is responsive :D
the textarea handles the newlines fine but the button styling is crappg
@Xeo Blame Bootstrap :P
Oh cool. We can see our delete/close votes on deleted posts.
looks like I made the columns way too large on the smaller window
That's new. Or a bug.
@Puppy you can style how overflow behaves
21:33
Haha <br> between rows
You are really bad at this :v
@Puppy would help if you gave us the CSS too
@thecoshman What CSS?
oh shit drugs time
@Puppy the css that it is using...
@thecoshman I have none of my own. I only use Bootstrap's and a couple of inline styles
@CatPlusPlus Like I said, stringing together a few divs and a bit of JS is my limit.
if i declare class Myclass; does this call the default constructor?
21:44
what?
a declaration doesn't call stuff
@Puppy in short, your HTML sucks
I'm a C++ programmer, what were you expecting? :P
the output is mostly what I like, though.
I'll just go back to using a textarea, shitty styling for the buttons though it may have.
@Puppy an ability to follow fairly basic rules
I have no idea what the rules are, and it's been a little while since I even attempted it but they didn't seem basic to me.
oh come on! it's obvious stuff. HTML is for semantic stuff, CSS makes it look a certain way. Text area is an input on forms, for inputs, so don't use it for output.
21:51
Hm, you can't hash a weak_ptr?
In the end nobody cares so w/e
(I'm sure it makes a lot of sense, but still)
what do you mean @EtiennedeMartel
I'm trying to put a weak_ptr in an unordered_set, and it's telling me there's no hash for this type.
the problem with weak_ptr is that the value can change from the outside.
21:54
Yeah. I see that now.

« first day (1362 days earlier)      last day (3812 days later) »