[QUOTE=Bumrang;39952791]Make the text and button the opposite of the color behind it.[/QUOTE]
I think that white text with a black outline would look a lot better honestly
I tried to make a chatbot that will learn off of responses for Steam, and this is what happens: [url]http://pastebin.com/4LsQitwU[/url]
[video=youtube;gOghc5E_GXA]http://www.youtube.com/watch?v=gOghc5E_GXA[/video]
Finished the animation editor over the weekend. You can create new files and animations, edit any value, dynamically add or remove or edit frames while the animation is playing, pause and play the animation by clicking the animation panel, load pre-existing .anim files, save .anim files, etc.
[QUOTE=Chessnut;39953567]I tried to make a chatbot that will learn off of responses for Steam, and this is what happens: [url]http://pastebin.com/4LsQitwU[/url][/QUOTE]
You could implement some moderation system which doesn't learn the responses straight away until you've checked them to be valid. I guess it's not completely automated but I think it'd take a lot of skill to make a bot realize something stupid :v:
[QUOTE=Chandler;39949559]So it's been a while since I've posted what I've been working on. For the
[cpp]
#include <unittest/unittest.hpp>
auto main () -> int {
using namespace unittest;
test("my-test") = {
task("assert-equal") = [] {
self.assert_equal(1, 2, "optional message");
self.assert_throws<my_exception_type>([]{throw my_exception_type;});
},
task("fails") = [] { self.fail(); },
task("skip") = skip("always-skip") = [] { self.fail(); }
};
run();
}
[/cpp]
[/QUOTE]
For those who are sane among us:
[cpp]
#include <unittest/unittest.hpp>
int main()
{
using namespace unittest;
test("my-test") = {
task("assert-equal") = []
{
self.assert_equal(1, 2, "optional message");
self.assert_throws<my_exception_type>([] { throw my_exception_type; });
},
task("fails") = [] { self.fail(); },
task("skip") = skip("always-skip") = [] { self.fail(); }
};
run();
}
[/cpp]
[QUOTE=FlameCow;39943391]An update to the C++ console game I was working on. I implemented local co-op, and enemies with crude AI. The enemies can be destroyed with a projectile that each player can shoot. Not only that, but got some neat new characters to replace the old ones.
-snip-
Now I just need to make the enemies attack Player 2 as well. Might even give Player 2 some AI if there's no one else playing. I'm not entirely sure yet[/QUOTE]
How long have you been using C++? Also, have you done anything besides console based applications yet?
[QUOTE=COBRAa;39955622]For those who are sane among us:
[cpp]
#include <unittest/unittest.hpp>
int main()
{
using namespace unittest;
test("my-test") = {
task("assert-equal") = []
{
self.assert_equal(1, 2, "optional message");
self.assert_throws<my_exception_type>([] { throw my_exception_type; });
},
task("fails") = [] { self.fail(); },
task("skip") = skip("always-skip") = [] { self.fail(); }
};
run();
}
[/cpp][/QUOTE]
I'm having one of those "what the fuck am I reading" moments.
Can anyone spot any glaring errors in this?
[img]http://puu.sh/2jP61[/img]
[QUOTE=garry;39956110]Can anyone spot any glaring errors in this?
[img]http://puu.sh/2jP61[/img][/QUOTE]
Well... "." is not a number. Also, depending of what you want to do with it "5." or even ".5" might not be considered properly formatted.
[editline]18th March 2013[/editline]
Also, "-" and "-." aren't numbers.
Garry, while you're here, did you get the application I sent? Sorry for this post not being entirely programming related.
I sent it a week ago.
[QUOTE=Chandler;39949559]So it's been a while since I've posted what I've been working on. For the past month or so, I've been writing a unit testing framework for C++11 that is inspired from python's unittest module, with an emphasis on using absolutely no preprocessor macros. Coincidentally, the library is named 'unittest'. Another focus for the library is absolutely no inheritance whatsoever. You don't inherit from a test, then manually register your steps.
[/QUOTE]
That's cool and all, but why the balls would you define main as "auto main () -> int" when "int main()" is more easily understandable, more common and literally takes less than half the time?
[QUOTE=Ziks;39956184]Garry, while you're here, did you get the application I sent? Sorry for this post not being entirely programming related.
I sent it a week ago.[/QUOTE]
Where would the email have come from?
[editline]18th March 2013[/editline]
[QUOTE=Darwin226;39956149]Well... "." is not a number. Also, depending of what you want to do with it "5." or even ".5" might not be considered properly formatted.
[editline]18th March 2013[/editline]
Also, "-" and "-." aren't numbers.[/QUOTE]
Haha you're right, sometimes I wonder how my brain works!
[QUOTE=esalaka;39956242]That's cool and all, but why the balls would you define main as "auto main () -> int" when "int main()" is more easily understandable, more common and literally takes less than half the time?[/QUOTE]
As someone who does math, I beg to differ.
[QUOTE=garry;39956260]Where would the email have come from?[/QUOTE]
metapyziks(at)gmail.com to jobs(at)facepunchstudios.com
[QUOTE=Darwin226;39956406]As someone who does math, I beg to differ.[/QUOTE]
I know what you mean but Jesus Christ, why
[QUOTE=esalaka;39956466]I know what you mean but Jesus Christ, why[/QUOTE]
C++ already has a ton of "dialects" as someone has shown in a SO link not long ago. Why not actually use an elegant one?
[QUOTE=esalaka;39956242]That's cool and all, but why the balls would you define main as "auto main () -> int" when "int main()" is more easily understandable, more common and literally takes less than half the time?[/QUOTE]
Because it makes COBRAa have a conniption [i]everytime I do it[/i].
[QUOTE=COBRAa;39955622]For those who are sane among us:[/QUOTE]
You forgot to correct a brace by putting it on the newline on line 7. Hope this helps!
[QUOTE=acpm;39936023]~open source~[/QUOTE]
Awaiting KNIGHT GAME: MOBILE.
Put it on the app store; I'd buy it.
I'd like func() -> ret a lot more if the auto was implicit.
[editline]18th March 2013[/editline]
Otherwise it's just kinda awkward?
[QUOTE=Lexic;39956559]I'd like func() -> ret a lot more if the auto was implicit.
[editline]18th March 2013[/editline]
Otherwise it's just kinda awkward?[/QUOTE]
Basically make every function default to being auto?
[QUOTE=Lexic;39956559]I'd like func() -> ret a lot more if the auto was implicit.
[editline]18th March 2013[/editline]
Otherwise it's just kinda awkward?[/QUOTE]
I agree. The kind of functional-ish approach to this is way more readable in many areas.
[QUOTE=esalaka;39956586]Basically make every function default to being auto?[/QUOTE]
only if you put a -> in it otherwise it becomes syntactically ambiguous.
[QUOTE=Lexic;39956559]I'd like func() -> ret a lot more if the auto was implicit.
[editline]18th March 2013[/editline]
Otherwise it's just kinda awkward?[/QUOTE]
It was something I picked up from OCaml/F#/Python annotations, and at the time I was doing some heavy template metaprogramming. If you look at the commit history for unittest you'll see that I changed my style halfway through because it served no purpose. It is however, necessary for a few SFINAE eliminators, so I use it in those cases.
Also can't wait for C++14 to be a thing so that all the compilers will let me do
[cpp]
auto get_butt () { return this->butt; }
[/cpp]
Maybe I'll just
[cpp]#define function auto
#define var auto[/cpp]
[editline]18th March 2013[/editline]
Except that preprocessors always break things.
I don't think you can typedef auto either
[QUOTE=esalaka;39956621]Maybe I'll just
[cpp]#define function auto
#define var auto[/cpp]
[editline]18th March 2013[/editline]
Except that preprocessors always break things.
I don't think you can typedef auto either[/QUOTE]
According to the standard you can't redefine keywords, and most compilers are actually starting to enforce this.
[editline][/editline]
Oh no wait. I'm so not used to using the C preprocessor now. Nevermind :v:
[QUOTE=garry;39956260]
Haha you're right, sometimes I wonder how my brain works![/QUOTE]
You need more time in the shower
[QUOTE=garry;39956110]Can anyone spot any glaring errors in this?
[IMG]http://puu.sh/2jP61[/IMG][/QUOTE]
No localization support.
[QUOTE=Tamschi;39956811]No localization support.[/QUOTE]
Sometimes it could cause problems to support European style (1,234 vs 1.234), and it would be better to only support one style. For example, when I was working on a VMF manipulating tool in C#, any parsing of numbers would automatically use the format specified by the user's culture information. But VMF files always use 1.234, so it would fail when run on European machines.
Use 1.234, because 1,234 is retarded (and that's coming from a german!)
[QUOTE=DrLuckyLuke;39956846]Use 1.234, because 1,234 is retarded (and that's coming from a german!)[/QUOTE]
I'm Dutch and I also agree using , for decimals is incredibly dumb.
Sorry, you need to Log In to post a reply to this thread.