Last picture before I go back into hiding:
[img]http://anyhub.net/file/5m8T-last.png[/img]
[img]http://i.imgur.com/CZf5a.png[/img]
DAT BUTTON
[QUOTE=artanis;33934373]All it means is that the c++ implementation is bad. C# cannot outperform the equivalent c++ application... :eng101:[/QUOTE]
Why?
[QUOTE=alexaz;33935197][img]http://i.imgur.com/CZf5a.png[/img]
DAT BUTTON[/QUOTE]
[Img]http://puu.sh/bLwM[/Img]
Heh, I'm not the only one that rants to myself through code.
[QUOTE=vexx21322;33935256][Img]http://puu.sh/bLwM[/Img]
Heh, I'm not the only one that rants to myself through code.[/QUOTE]
Oh, seems like i forgot about that.
I did a bunch of work on my netbook and committed and ran push before realizing that a) I hadn't pulled on this machine in over a month and b) I was on a branch I merged into master two weeks ago.
So I did what any idiot would do and panic merged.
To the wrong branch again.
I've spent the past 2 hours learning how to defuck both my local and remote repos.
On the bright side I also learned about __git_ps1, which should hopefully stop this happening again.
[img]http://i.imgur.com/MhqFI.png[/img]
Shit, so many enemies!
[QUOTE=Lexic;33935729]I did a bunch of work on my netbook and committed and ran push before realizing that a) I hadn't pulled on this machine in over a month and b) I was on a branch I merged into master two weeks ago.
So I did what any idiot would do and panic merged.
To the wrong branch again.
I've spent the past 2 hours learning how to defuck both my local and remote repos.
On the bright side I also learned about __git_ps1, which should hopefully stop this happening again.[/QUOTE]
Did a similar thing. Went and coded on my laptop which was about 1-2 weeks out of date, realized it, figured "Oh it'll be easy to merge!". Got back and went to merge it (after making sure the main was up to date) and then got fucked up when I tried to move the not-checked-in-project solution back over, and I was stuck with files existing but not being in the solution so it wouldn't compile.
Took me a while to sort that one out, lesson learned. :v:
[QUOTE=Staneh;33935376][img]http://i.imgur.com/Qequd.png[/img]
Blooooood![/QUOTE]
My scroll wheel scroll depth is just enough where if I scroll up and down, the grass doesn't move its relative position.
Does FP programming have an irc channel?
Yeah, #fpcoders on GameSurge
[editline]28th December 2011[/editline]
afaik it's not very popular though
[QUOTE=Darwin226;33935244]Why?[/QUOTE]
There's overhead in the runtime vm, the .net library, the garbage collector that cause .net applications to have a larger footprint in every way. Longer startup time, more memory usage, boxing-unboxing of simple types, runtime type information isn't free... These things are inherent to the system and cannot be avoided.
.NET does have many advantages, the huge platform library enables rapid prototyping that is hard in C++ without knowledge of third party libraries. That doesn't make what I said before wrong.
[QUOTE=Ziks;33935130]Last picture before I go back into hiding:
[img]http://anyhub.net/file/5m8T-last.png[/img][/QUOTE]
What happens when you reflect light so that it goes off multiple mirrors and from the last one back onto the first? Recursion?
[QUOTE=AtomiCasd;33935891]Does FP programming have an irc channel?[/QUOTE]
We have a steam community group. There's usually around 10-15 people active at a time. Right now there's 23.
[QUOTE=sim642;33936030]What happens when you reflect light so that it goes off multiple mirrors and from the last one back onto the first? Recursion?[/QUOTE]
I know that's probably what would happen, but raises the question of what would happen in real life if you had two completely flat mirrors pointed directly at each other. From my understanding the light would slowly fade as it loses its energy on collision.
Finally finished all of my coursework for this online course. I really slacked off because I don't like working with Visual Basic, but I did learn a lot in the later assignments.
[QUOTE=Jookia;33936090]I know that's probably what would happen, but raises the question of what would happen in real life if you had two completely flat mirrors pointed directly at each other. From my understanding the light would slowly fade as it loses its energy on collision.[/QUOTE]
The glass absorbs some of the light as well. I don't remember where I saw it, possibly a department store changing room, each level of reflection slowly became more green looking because of the color of the seemingly transparent glass.
I've gone and cleaned up my previous TMP example so it's MUCH shorter (and a LOT easier to understand, if you're just getting started with SFINAE and TMP)
I also didn't have to change a thing to get it to work in MSVC either! (If I had to make a hacky workaround, I might have had to hurt someone.)
Here's the 'final' code (without the #if defined(_MSC_VER) #elif defined(__clang__) #endif stuff)
I could probably come up with a better name than "combo" for the return_type and param_type type-dependent container. Like "dependent" :v:
Note that inline is defined to __forceinline for MSVC and __attribute__((always_inline)) for gcc and clang. (Luckily MSVC will inline these in this case, as I'm avoiding instances where it might not. Yeah I'm #define-ing a keyword, but I don't like how the standard doesn't have stricter rules on semantics of inline)
My goals currently are to avoid any #define macros aside from those needed to get basic build and configuration information at compile time like compiler name, version, and which compiler we're using, as well as compiler and platform specific defines (little endian or big endian), or defines to make certain compiler specific keyword fall in line with the standard (such as the 'sealed' contextual keyword being exactly equivalent to the new 'final' specifier in msvc).
With the code below working so well, I think I might actually be able to do it :D
[cpp]
namespace bitwise {
namespace detail {
template <typename T, typename U> struct combo {
typedef typename std::conditional<
sizeof(T) == sizeof(U),
T,
void
>::type return_type;
typedef typename std::conditional<
std::is_same<T, return_type>::value,
T,
U*
>::type param_type;
};
template <typename T, bool is_msvc=compiler::msvc> class swap;
/* gcc/clang */
template <typename T> class swap<T, false> {
typedef typename combo<T, uint64_t>::return_type qword;
typedef typename combo<T, uint32_t>::return_type dword;
typedef typename combo<T, uint16_t>::return_type word;
typedef typename combo<T, uint64_t>::param_type qparam;
typedef typename combo<T, uint32_t>::param_type dparam;
typedef typename combo<T, uint16_t>::param_type wparam;
public:
static inline qword call(qparam val) { return __builtin_bswap64(val); }
static inline dword call(dparam val) { return __builtin_bswap32(val); }
static inline word call(wparam val) {
return ((val & 0xFF00) >> 8) | ((val & 0x00FF) << 8);
}
};
/* msvc */
template <typename T> class swap<T, true> {
typedef typename combo<T, uint64_t>::return_type qword;
typedef typename combo<T, uint32_t>::return_type dword;
typedef typename combo<T, uint16_t>::return_type word;
typedef typename combo<T, uint64_t>::param_type qparam;
typedef typename combo<T, uint32_t>::param_type dparam;
typedef typename combo<T, uint16_t>::param_type wparam;
public:
static inline qword call(qparam val) { return _byteswap_uint64(val); }
static inline dword call(dparam val) { return _byteswap_ulong(val); }
static inline word call(wparam val) { return _byteswap_ushort(val); }
};
} /* namespace detail */
template <typename T> inline T swap(T val) {
static_assert(std::is_integral<T>::value, "Only integral types are allowed");
return detail::swap<T>::call(val);
}
} /* namespace bitwise */
[/cpp]
Now I just need to write some tests to make sure I never break this :v:
[QUOTE=Jookia;33936090]I know that's probably what would happen, but raises the question of what would happen in real life if you had two completely flat mirrors pointed directly at each other. From my understanding the light would slowly fade as it loses its energy on collision.[/QUOTE]
That's why you always have I = (...) * 0.98 to avoid unlimited loops, or have a max bounce limit.
[QUOTE=Jookia;33934017] m̶aỳ ha͢v̨e ȁ̢͂̈ͧ ͗ͭ̋̓ͬ̊͜v̂ͦĩͤͯͥ̒ͨr̷̃ͯͣ͌̈́͐u͑͒ͬ̀ͩ͏s̛͂͗͐̏̇͒ Lͧ̋ͩ̑ͩͣ̀̄̇ͧͮ͑̾̑ͥ̾͂͏͇̟̻̫͓̱̞̖̻͔̤̘͎̭̦̠̀ͅÉ̢͌ͣ̄̅̓ͪ̂ͨ͟͝͏͈̤̠͇͉̞͎̥͎̯͇̞͡ͅA͙̺̳̳͎̪̤͎̅͐ͥ͗̽͂̐ͬͧͯ̉̾̌̅͗ͯ́͢͠V͚̜̣̺̝̭̣̥̱͎̫͎͚̙̦͑̐̐ͪͨ͋ͬ͗͞ͅE̥̹̞̣̫̳͙̘͖͓͓̭̔̎̍́ͭ̈́̾ͥ̀̃ͭͬ͆ͨ̊͗͗̀͢ͅ ̶̗̤͇͍̩̺̍̆͐ͬ̌ͦͭͫͧ͑́͟͠͠Ñ̋̈́̔̄̓͗͛͑ͤ̚̕҉͚̝͕͙͇͘O̷̟̪͚̟̘̹͕͛̒̈́ͦͯ̾͐͌ͯ͢W̶̨̛̙̪̺̗̔̃͌͐͑͒͒ͦ͢͜ i͠n͝ ͜W̡i͝n͟d̡ows̕'͢ fo̴n̸t ́ren͢d̷e͜r̕ing̡[/QUOTE]
I lost the link to that website, what is it?
[QUOTE=supersnail11;33936266]I lost the link to that website, what is it?[/QUOTE]
[url]http://textozor.com/zalgo-text/[/url] maybe?
[QUOTE=supersnail11;33936266]I lost the link to that website, what is it?[/QUOTE]
It's e̫̹̜̫͐̐̓͗͂́e̹̘ͩͦͤe̒͐ͣ́̚m̸̤̞̻͒͊͌o͈̤̗̻̽̇͊͝.͙͛̾̃̾n̪͈̤̻̒ͪ͂͛̃e̡̫͊̃̊̒̂̔ͭt̼̗̂͊ͭͮ͌͗̓͠ of course.
[QUOTE=sim642;33936030]What happens when you reflect light so that it goes off multiple mirrors and from the last one back onto the first? Recursion?[/QUOTE]
[img]http://anyhub.net/file/42YQ-so.png[/img]
[sp]I had a safeguard against this that I turned off to get this error[/sp]
[QUOTE=artanis;33936018]There's overhead in the runtime vm, the .net library, the garbage collector that cause .net applications to have a larger footprint in every way. Longer startup time, more memory usage, boxing-unboxing of simple types, runtime type information isn't free... These things are inherent to the system and cannot be avoided.
.NET does have many advantages, the huge platform library enables rapid prototyping that is hard in C++ without knowledge of third party libraries. That doesn't make what I said before wrong.[/QUOTE]
You're forgetting that the JIT compiler automatically emits SSE/MMX instructions when possible among other really nice system-specific optimizations. The C# garbage collector is actually really nice and has never gotten in my way (unlike Android's dalvik GC).
A few extra megabytes of RAM is nothing when the bare minimum computers being sold have 1GB of RAM, and if you're working on a massive game that takes up 900MB of RAM, I'm sure it wouldn't be much of a challenge to optimize away 5MB of usage. Boxing/unboxing isn't an issue if you're using generics, and if reflection is slowing you down don't use it and restructure your code to not require it.
There will be slightly longer startup times (we're talking milliseconds here), but that's just because the JIT is compiling MSIL to machine code. It makes for a nice "write once, compile once, deploy everywhere" system that I think is worth the extra few milliseconds the program takes to start up.
[URL="http://naarkie.shellmix.com/counter.html"]Counter[/URL]
am i program king yet?
[QUOTE=Naarkie;33937675][URL="http://naarkie.shellmix.com/counter.html"]Counter[/URL]
am i program king yet?[/QUOTE]
:(
[QUOTE=Naarkie;33937675][URL="http://naarkie.shellmix.com/counter.html"]Counter[/URL]
am i program king yet?[/QUOTE]
[img]http://i.imgur.com/l5Oun.png[/img]
[QUOTE=Ortzinator;33937786][img]http://i.imgur.com/l5Oun.png[/img][/QUOTE]
[quote]Forbidden
You don't have permission to access /counter.html on this server.[/quote]
I refreshed a lot and then this happened.
Not sure if coincidence.
Sorry, you need to Log In to post a reply to this thread.