• What Are You Working On? September 2015
    1,261 replies, posted
But they usually come back from the grave
oh overv(victim of: personalban from hexxeh)~ oh hexxeh(victim of:demodded and disappeared afaik)~ oh amiga(victim of:demotivation) [del]oh yogu[/del]-owait who will be next? you decide!
Yogu?
[QUOTE=Darkwater124;48683452]It's been nice knowing you all. [t]http://novaember.com/s/8f9453/9W1K1v.png[/t] [t]http://novaember.com/s/8f9453/XQrCPd.png[/t][/QUOTE] I hope you at least got a decent price for your soul.
[QUOTE=geel9;48684197]Yogu?[/QUOTE] you
I've been playing with the new Javascript changes and I've been enjoying it quite a bit. I recently discovered I could do this: [code]'use strict'; class Fruit { constructor(setObscurity) { this.obscureVariable = setObscurity; } } class Cake { constructor() { this.reasonToExist = null; } } class SomethingUnrelated { constructor() { var fruit = new Fruit("SO OBSCURE"); var cake = new Cake; this.getObscureness(fruit); // prints "This object is like, so obscure: SO OBSCURE" this.getObscureness(cake); // prints "It's like, not obscure at all!" } getObscureness(objRef) { if (objRef.obscureVariable !== undefined) { console.log("This object is like, so obscure: " + objRef.obscureVariable); } else { console.log("It's like, not obscure at all!")} } }[/code] Is it possible to do this in C++?
[QUOTE=false prophet;48685492]I've been playing with the new Javascript changes and I've been enjoying it quite a bit. I recently discovered I could do this: [code]'use strict'; class Fruit { constructor(setObscurity) { this.obscureVariable = setObscurity; } } class Cake { constructor() { this.reasonToExist = null; } } class SomethingUnrelated { constructor() { var fruit = new Fruit("SO OBSCURE"); var cake = new Cake; this.getObscureness(fruit); // prints "This object is like, so obscure: SO OBSCURE" this.getObscureness(cake); // prints "It's like, not obscure at all!" } getObscureness(objRef) { if (objRef.obscureVariable !== undefined) { console.log("This object is like, so obscure: " + objRef.obscureVariable); } else { console.log("It's like, not obscure at all!")} } }[/code] Is it possible to do this in C++?[/QUOTE] Isn't that TypeScript? Or have I missed something?
[QUOTE=Berkin;48685531]Isn't that TypeScript? Or have I missed something?[/QUOTE] I don't know. What I posted above is part of ECMA 6, though. [url]https://github.com/lukehoban/es6features/blob/master/README.md[/url]
[QUOTE=false prophet;48685492]Is it possible to do this in C++?[/QUOTE] It is not, though it is in .NET languages with reflection.
Fuck it, I'm done. I'm not writing out all these inflections by hand. Instead, I'm going to write an extension to Rant specifically for handling declination/inflection and dynamically creating the correct endings/umlauts. I may be batshit crazy, but even I have limits!
[QUOTE=leontodd;48683588]everyone who has made an FP app ends up getting permabanned for something unrelated shortly after, it's cursed. [editline]15th September 2015[/editline] some say having to deal with scraping fp makes people go insane[/QUOTE] I've once made a Facepunch app and I'm still around, so it's not too bad :v:
i cant wait until this uni semester is over, i'm going to go back and remake my 3d rendering engine i made 2 semesters ago for 3d graphics programming, except this time it will actually fucking work. last time i got it to load obj files but my projection was completely fucked. it was so close to working, if i had paid more attention in class i would have got it done properly.
[QUOTE=Darkwater124;48683452]It's been nice knowing you all. [t]http://novaember.com/s/8f9453/9W1K1v.png[/t] [t]http://novaember.com/s/8f9453/XQrCPd.png[/t][/QUOTE] Is there an API I don't know about or are you just scraping? I started writing an iOS app but hated the idea of scraping to much.
[QUOTE=false prophet;48685492]I've been playing with the new Javascript changes and I've been enjoying it quite a bit. I recently discovered I could do this: [code]'use strict'; class Fruit { constructor(setObscurity) { this.obscureVariable = setObscurity; } } class Cake { constructor() { this.reasonToExist = null; } } class SomethingUnrelated { constructor() { var fruit = new Fruit("SO OBSCURE"); var cake = new Cake; this.getObscureness(fruit); // prints "This object is like, so obscure: SO OBSCURE" this.getObscureness(cake); // prints "It's like, not obscure at all!" } getObscureness(objRef) { if (objRef.obscureVariable !== undefined) { console.log("This object is like, so obscure: " + objRef.obscureVariable); } else { console.log("It's like, not obscure at all!")} } }[/code] Is it possible to do this in C++?[/QUOTE] This can probably be done in a slightly less contrived manner, but heres an example in D :v: [url]http://ideone.com/DOrs7w[/url] [code] import std.stdio : writefln; struct Fruit { string obscurity; this(string obscurity_level) { this.obscurity = obscurity_level; } } struct Cake { } template hasMember(T, string member) { enum hasMember = __traits(hasMember, T, member); } void main() { auto fruit = Fruit("SO OBSCURE"); auto cake = Cake(); getObscureness(fruit); getObscureness(cake); } void getObscureness(T)(ref T thing) { static if (hasMember!(T, "obscurity")) { //resolved at compile time writefln("This object is like so obscure: %s", thing.obscurity); } else { writefln("It's like, not obscure at all!"); } } // stdout This object is like so obscure: SO OBSCURE It's like, not obscure at all! [/code] For context, one of the guys behind D (Andrei Alexandrescu) has been trying to get compile time if's into C++ for a long time, though while he was still involved in the process around C++.
In C++ you can use the [URL="http://en.cppreference.com/w/cpp/experimental/lib_extensions_2#The_C.2B.2B_detection_idiom"]detection idiom[/URL] or many other tricks that can be easily found via google
Working on converting a Unity Oculus Rift DK1 project to DK2. I notice the framerate is low, 40 fps-ish. The weird thing is the only thing in the project is an engine-mesh. So I ask the guy who made it 'is this a .cad model?' (has it even been optimized) 'no we reduced the polys' I check. 148.738 triangles :disgust:
-ok, snip-
[QUOTE=Superbird;48686605]Is there an API I don't know about or are you just scraping? I started writing an iOS app but hated the idea of scraping to much.[/QUOTE] I'm just scraping, which isn't too hard with the right tools. I'm planning on making it similar to a browser, maybe with some enhanced features through my own server.
Has anyone ever wondered why sqrt(fps) isn't used to display framerates in games? It's linear (like frametime), and it increases with performance in a linear fashion. For example when comparing 60 fps to 1000 fps, the 1000 fps seems insanely quicker from a numbers point, but it's only a little over 4 times quicker. If you compare sqrt(60) [7.75] to sqrt(1000) [31.62], you can intuitively compare them now, plus 1 unit at a high value is equal to the same time that a lower value is (unlike fps). Some common framerates and their sqrt so you can see: [code] 15 = 3.87 24 = 4.89 30 = 5.48 60 = 7.75 120 = 10.95 144 = 12 300 = 17.32 [/code]
[QUOTE=COBRAa;48687447] [code] 30 = 5.48 60 = 7.75 [/code][/QUOTE] That doesn't look very linear?
[QUOTE=COBRAa;48687447]For example when comparing 60 fps to 1000 fps, the 1000 fps seems insanely quicker from a numbers point, [b]but it's only a little over 4 times quicker[/b][/QUOTE] I don't get it.
Please tell me if I'm dumb but doesn't this confirm that? [IMG]http://puu.sh/kcdul/badcc44f05.png[/IMG] Math is not my strong suit
[code] 1/60 = 0.01666667 1/1000 = 0.001 [/code] I don't know what he is speaking about [code] (1/60)/(1/1000) = 16.666667 [/code] Seems like difference between 60FPS and 1000 FPS is 16 tenfold, which is 4*4. (Four times squared)
Fixed my blendmode so the light is even more sexy now! [vid]https://my.mixtape.moe/vbwbmv.mp4[/vid] Plus colored light and blending example. [editline]15th September 2015[/editline] I'm having way too much fun just playing around with the lights.
[QUOTE=COBRAa;48687447]Has anyone ever wondered why sqrt(fps) isn't used to display framerates in games? It's linear (like frametime), and it increases with performance in a linear fashion. For example when comparing 60 fps to 1000 fps, the 1000 fps seems insanely quicker from a numbers point, but it's only a little over 4 times quicker. If you compare sqrt(60) [7.75] to sqrt(1000) [31.62], you can intuitively compare them now, plus 1 unit at a high value is equal to the same time that a lower value is (unlike fps). Some common framerates and their sqrt so you can see: [code] 15 = 3.87 24 = 4.89 30 = 5.48 60 = 7.75 120 = 10.95 144 = 12 300 = 17.32 [/code][/QUOTE] What? FPS is only really misleading in the way that an extra frame at a low range means a much bigger performance gain than an extra frame in a high range. So the step from 20fps to 21fps is really massive, while the step from 100 to 101 fps is almost nothing. What you really want is a logarithmic scale like 20*log10(fps), resulting in dB: [code] 1 = 0dB 10 = 20dB 100 = 40dB 1000 = 60dB[/code] This is a way better indicator of performance gain. Every time you gain 3dB, you doubled your performance. [editline]Edit:[/editline] This by the way also works with frametime. In fact, you will get exactly the same dB values if you insert the frametime instead of fps, except that you get negative values: [code] 1 = -0dB .1 = -20dB .01 = -40dB .001 = -60dB[/code] every -3dB you doubled your performance
Or just use frametime?? This thing has been solved for quite a while now
[QUOTE=Asgard;48687741]Or just use frametime?? This thing has been solved for quite a while now[/QUOTE] Yeah but why would you fudge around with decimals if you could just use a logarithmic scale like dB? Then you don't have to think "oh that number just halved, so I doubled my performance". With dB you can directly compare different values and immediately see how much better it is.
Is this really important?
[QUOTE=AtomiCal;48687786]Is this really important?[/QUOTE] Are discussions not allowed? [editline]15th September 2015[/editline] There always has to be somebody complaining when something is discussed in WAYWO
[QUOTE=AtomiCal;48687786]Is this really important?[/QUOTE] It is if you want to effectively compare values with different orders of magnitude.
Sorry, you need to Log In to post a reply to this thread.