« first day (941 days earlier)      last day (4000 days later) » 

1:00 PM
@Xeo Starting from the top, I need to create a function composition. I could store it in some auto type that I don't care about (e.g. your compose) or some std::function<Stuff(Here...)> variant. In order to make a composition that can be put into a std::function ( I believe? ) I'd have to do std::function<Stuff( Here... )> func = std::bind( a, std::bind( b, ... ) );.
 
Xeo
No
 
Oh, okay then.
 
Xeo
std::function can store anything that is callable.
 
Back to... I don't even know.
 
1:00 PM
Fuck std::function. No one knows how to use that crap.
 
user142019
Worst tattoo ever.
 
user142019
Obviously lacks a doctype.
 
@rightfold it's under the hair, noob.
 
Ell
4/10 would not bang
 
@R.MartinhoFernandes I've met one that had it and congratulated him.
 
1:02 PM
@Xeo So I take your compose, then, and put it in a std::function< Stuff( Here... )> then?
 
Xeo
ya
 
oh man, I am terrible at TDD
 
Dear god today's daily WTF.
 
write a test, run it, watch it fail, go "oh crap, now what's wrong", stare at it for 10 seconds before realizing that "oh right, I haven't actually implemented this functionality yet"
that was kind of why I just wrote the test...
 
Xeo
lol
 
1:03 PM
@jalf Seems like it's working as intended.
 
Alright.
 
Imagine if you had done the same without the test a safety net :v It happens!
 
So I'll compose, make a std::function<>, and then store than in an any_functor or just a std::function<void()>
Problem solved.
 
user142019
DDD is the best.
 
@LucDanton I just feel silly because I had to stop and think to realize that the reason the test failed was that I wanted it to fail
 
user142019
1:04 PM
Development-driven development.
 
maybe I'm just tired
 
Xeo
@ThePhD Except that you didn't give us any reason why those are stored together
 
Now that you mention it TDD does feel like an emotional rollercoaster some of the time...
 
class ContentLoader {
	private:
		ServiceProvider* services;
		String root;
		std::vector<String> roots;
                // replace "any" with std::function<void()> or w/e
		std::unordered_map<String, any> loadchains;
		Sys::FileSystemMonitor rootmonitor;

}
 
Oh, loaders.
 
1:07 PM
particularly, when someone calls mycontentloader.Reload( "MyFile" );
 
Why are you using pointers? Aren't you guys from "BAN all the pointers!"?
 
I'd like to think that's because it can condense the 'implement -- actually use -- fix implementation' cycle and refines it so much :v Delicious distilled developer tears.
I think I should sleep.
 
And by someone I mean when my system automatically calls it
by itself
 
user142019
 
when the rootmonitor triggers that a file that's been loaded has been changed
 
1:08 PM
@ThePhD And how does it call it?
How does it know the arguments?
How does it know the return type?
How does it know any thing whatsoever?
 
Xeo
@ThePhD How do you know which type to cast the any too?
 
That's why I'm replacing any, because it doesn't have all that information...
 
Xeo
std::function<void()> doesn't have it either
 
The comment says it's going to change it god
 
@Xeo but it does...he'll cast it to void :D
 
1:10 PM
@Xeo I can bind the information when Load is first called.
 
Where?
Are you saying all this crap is...
Just std::function<void()> + a lambda all along?
 
@R.MartinhoFernandes That's the second part.
 
Is there another part?
 
The first part is mycontentloader.Load( "Shiny Picture.png", LoadImage(), CorrectGamma(), DeepenReds(), LoadTexture(), cache );
 
Ell
meh, fuck optimisations for now. I'm doing an extra copy or two and I'm okay with it
 
user142019
1:13 PM
@Ell You're doing an extra copy or two and see the compiler elide them FTFY.
 
Oh gawd, those loaders.
 
Do you have a better idea?
 
mycontentloader.Load( "Shiny Picture.png", LoadVideo(), CorrectGamma(), DeepenReds(), LoadTexture(), cache );
 
.... ?
 
That's all I'm saying.
I think it expresses my feelings quite well.
 
Ell
1:15 PM
load("afile.something"); //<-- god function which detects type, loads and puts into appropriate std::map<string, (a resource type)> my(Resourcetype)s`
 
If you don't get it from that, I am afraid my explanation will be fruitless.
 
If LoadVideo() isn't full of shit, it will check whether what it's loading is actually a video.
If not, it will fail.
 
we love failing <3
 
Yep, you are already going down the wrong path.
My call is wrong, not LoadVideo.
 
Xeo
That thing will already fail at compile-time if you're doing it right.
 
1:16 PM
There's also the fact that the CorrectGamma functor takes an Image2D
LoadVideo doesn't produce an Image2D
So it'll fail there too.
 
Ok, mycontentloader.Load( "Shiny Picture.png", LoadVideo());
 
Nothing stops you from mycontentloader.Load<Texture2D>( "Shiny Picture.png", LoadVideo() );, and then watching it explode at compile-time because the chain doesn't produce a Texture2D.
 
Ell
does const container_t& cont mean const reference to non-const container_t ?
 
@ThePhD That's not what I wrote.
 
@Ell the "non-const" there is meaningless.
the rest is correct.
 
1:19 PM
@R.MartinhoFernandes If you take out the type information yourself, and you load the wrong type (and it fails at runtime), that's on you.
 
Ell
@rubenvb why? because a const reference cant modify the container if it was a const container?
 
If you want compile-time checking, specify the desired template type.
If you don't give a shit, do the first one.
 
@Ell because there is no const reference to const type.
 
user142019
@Ell reference to const container.
 
1:20 PM
da fuck
 
Ell
I ought to learn more about const correctness
 
user142019
Just like const container_t* is a pointer to a const container.
 
user142019
container_t& const is illegal.
 
read from right to left
 
user142019
I prefer postfix const.
 
user142019
@TonyTheLion Nice house.
 
user142019
Me gusta.
 
@ThePhD Anyway, forget about the loaders. Keep your Java-like loaders. What does Load do? Capture everything into a function<void()> to be called later?
 
@rightfold it's nice indeed, and fully equipped against a zombie apocalypse
ahahahah
 
1:23 PM
Java-Like...?
 
Urgh, the word that should never be mentioned, has been mentioned
 
Double const on references is not something.
 
Java would be loader.Load("MyType");, with maybe a generic argument about teh type to load, except I don't even know how to specify a generic argument and there'd be all kinds of stupid object casting and run-time checking.
 
Ell
argh I'm confused
 
user142019
Java-like adjective (more Java-like, most Java-like) Computing
(of software) very poorly designed.
4
 
1:25 PM
Doesn't matter. (Deep down my point is that you already have proper working "loaders" after all: they are LoadImage functor and friends; you just haven't realized it)
 
@TonyTheLion meh. In "How to survive zombie attack" this wouldn't be rated very high
the author recommended houses with doors higher than ground level
 
user142019
@BartekBanachewicz I bet there are doors on the first floor.
 
Why don't you just have .Load("...", fun)? Why make composition a special thing in the interface? (SRP!)
 
What would be a reasonable permissions bits for mkdir() on POSIX systems?
0770 or 0777?
Or different?
 
Zombies cannot climb ladders/stairs?
 
1:28 PM
hmm, I guess I should just use git, rather then trying to use hg-git
 
@MartinJames they can, climb stairs and when ammassed probably also reach the heights of ladders
 
@thecoshman: Git seems to be a painful tool to use.
 
@R.MartinhoFernandes Calls the chain, loads the desired type, returns it. If a ResourceCache is present, caches the result for later (if you ever load a type using the same resource identifier, skips the load and returns you what you loaded before). Saves the chain inside of a std::function<void()>, so when the system receives a "hey, the file/object that this was loaded from has changed!" signal, it'll invoke that std::function<void()> and reload the resource with that specific chain.
 
Oh - the zombie at Man. City has finally been sacked :)
 
@wilx yeah, but fed up with bitbuckets crap full private or full public wiki and issue tracker
 
user142019
1:29 PM
@wilx wxr-xr-x
 
user142019
I have no idea how to express that in octal, though.
 
mycontentloader.Load( "Shiny Picture.png", LoadImage(), CorrectGamma(), DeepenReds(), LoadTexture() );

mycontentloader.Load( "Shiny Picture.png", []( const String& s ){ LoadTexture()(  DeepenReds()( CorrectGamma()(   LoadImage( )( s ) ) ) ); } );
^ Of the two, which one is easier to read and to add/remove things from?
 
the first obviously
 
user142019
I think 0775 and 0755 are reasonable if you don't want other uses to write to it. Or even 0770 or 0750.
 
Okay.
 
1:33 PM
@ThePhD mycontentloader.Load( "Shiny Picture.png", compose(...))
And now you have a perfectly reusable compose function, without bolting it to the interface of Load.
 
Also I wonder why on earth would you want to do stuff like "correct gamma"
either the file has gamma encoding or not.
 
@R.MartinhoFernandes You can still do compose( ... ) with the first interface, too.
So everyone gets to have their cake and eat it too.
 
Oh well, you're the one dealing with it.
 
@ThePhD why not overload operator()?
 
I think it's quite silly to special case composition like that, but I don't have to write the function, so.
(When designing interfaces, bigger is not better)
 
Ell
1:38 PM
dern. I don't think this interface will work :/
@BartekBanachewicz have you got a wrapper around setting uniforms?
 
@Ell Program::SetUniform
 
@R.MartinhoFernandes yeah, going to start transferring my stuff to github then. Any easy methods of doing this, preserving the full repo history?
 
@thecoshman IIRC, I used fast-export/fast-import.
 
@R.MartinhoFernandes right so, seems to be the way people do it.
 
Feb 20 at 13:23, by R. Martinho Fernandes
I just fast-exported the ogonek repo to git.
Ah, this one is more definitive.
 
1:41 PM
@thecoshman how about git pull && git remote set-url origin blabla && git push?
 
Ell
@BartekBanachewicz Is that in Engine?
 
Just make sure you push everything
 
@rubenvb *_*
 
Ell
I can't see it >.<
 
user142019
1:42 PM
Let's see whether I can build Ogonek on OS X.
 
@Ell shader.h
 
@rubenvb Can't pull from mercurial....
 
Ell
Oh right
 
@R.MartinhoFernandes oh I thought he was just changing hosting.
 
@rubenvb I am, but sadly that means I have to change to giit too
silly github being all git-centric
 
1:44 PM
@thecoshman silly you using mercurial.
 
user142019
Can I build Ogonek using libc++ and scons dist? I tried CXXFLAGS=-stdlib=libc++ but that didn't change anything.
 
@rightfold Checkout the iterators-must-go branch and scons toolchain=clang IIRC.
Doesn't build IIRC (clang, the "fully compliant C++11 compiler", sucks).
 
lol
 
user142019
@R.MartinhoFernandes Oh thanks.
 
@rubenvb ಠ_ಠ touché
 
1:46 PM
@R.MartinhoFernandes It's clang that doesn't suck, you ought to make things work in clang+libc++ first, gcc later :P
 
user142019
Meh need Boost.
 
@thecoshman But hey, he's right.
 
@rightfold Nah, forget it, I didn't push those changes after all (probably because really doesn't build, then)
@Griwes No. Clang has broken SFINAE.
 
user142019
What was the last clang version you tested with?
 
@Griwes besides the point
 
1:48 PM
@R.MartinhoFernandes Hrm?
 
Ell
man. me so stupid.
 
@rightfold 3.2 and some trunk version from one of the last few months (not sure exact date)
 
user142019
OIC
 
@Griwes Clang doesn't do SFINAE properly.
 
@R.MartinhoFernandes ...can you please elaborate...?
 
user142019
1:49 PM
test/lookahead_window.c++:23:10: fatal error: no member named 'iota' in
      namespace 'std'
 
user142019
LOL
 
@Griwes It doesn't fail substitution on empty variadic packs.
@rightfold I hit that one recently :) libstdc++ is too lenient.
 
user142019
Let's include the right header. :P
 
Ok, you could've just linked that SO question of yours.
 
Apr 12 at 15:58, by R. Martinho Fernandes
Btw, libc++ seems a lot less lenient than libstdc++.
 
1:50 PM
huh... there be no tortoiseGit... I might actually have to learn those command things
 
user142019
Ah yeah, I see.
 
user142019
It fails to test.
 
user142019
include/ogonek/text/text_core.h++:128:47: fatal error: call to
      'as_code_point_range' is ambiguous
 
@rightfold That's probably the SFINAE issue I mentioned.
 
1:51 PM
the cheetah is faster than the tortoise.
anyways, there should be a native+portable C git client based on libgit2.
 
New here? Why not spare some heartache and read the newbie hints.
16
 
@thecoshman also: github has this crazy neat application that is so fancy it is unusable for serious development. Still nice though.
 
@rubenvb huh?
 
I'm the most horribly idiotic moron in the world. I went to school when it was the literacy test.
 
@rubenvb thanks, but I think I'll just learn the command line foo
 
1:53 PM
@rubenvb I use it for the blogging sometimes.
 
@thecoshman scroll to the bottom of www.github.com: they're listed under "applications"
 
GitHub for windows
GitHub for mac
GitHub for Eclipse
GitHub mobile apps
¬_¬ why no linux?
 
@thecoshman because they use the commandline
 
user142019
I think I fixed it by using std::enable_if instead of Wheels' EnableIf.
 
or eclipse
 
user142019
1:56 PM
test/normalization.c++:41:27: fatal error: no matching function for call to
      'normalize'
        test::utext nfc { ogonek::normalize<ogonek::nfc>(input) };
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
or qt creator
 
@rubenvb but tortoise :(
I'm so proud of me, I made the newbie hints post perfect first time, not one complaint :)
 
@rightfold Is this still clang?
 
user142019
Yes.
 
user142019
~ [ clang -v                                                          ] 3:58 pm
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
 
1:58 PM
You can fix everything by changing every single SFINAE bit from using ... to = wheels::_.
Good luck.
 
user142019
:P
 
Or just stop whining and use GCC.
 
What.
 
user142019
I'm not whining.
 

« first day (941 days earlier)      last day (4000 days later) »