« first day (1821 days earlier)      last day (3189 days later) » 
00:00 - 17:0017:00 - 00:00

12:13 AM
I tried the Win10 preview a few months ago.... it did not like my Xbox 360 controller drivers, had to do a system restore thing, and it deleted a lot of personal files that had nothing to do with the operating system, was absolutely stupid
 
Jon
Sup Chris
 
My C# conversion was a success. 4-second compile times now
 
@IcyDefiance im selfless, sorry lol
 
:o
@Chris Nice!
 
Jon
Optimoz
 
12:20 AM
also need a coffee, was up til 6am this morning churning through it lol
only noon atm
 
Jon
Optimizing is an artform
 
^
 
Its 2:30 am here D:
Stopped programming 20 min ago.. I should sleep
 
Yeah do that, sleep. You get "rollover minutes" on that lol
 
 
2 hours later…
2:20 AM
Is there a licence that is basically do wtf ever you want except you have to credit the original author if you use or modify it?
 
maybe the MIT License? Just have to include the license. opensource.org/licenses/MIT
 
Basically I want the MIT but with the requirement that if you make money off of it you have to notify of the product that is doing so.
I ran into this with my GUI library where I know it has been used in a modified form is released games but I don't know which ones and the people wouldn't tell me.
 
2:48 AM
> Your order from Exploding Kittens is shipping soon!
Wee!
 
nice
 
Also, I just got the yearling badge for the fourth time.
 
that's not as cool as exploding kittens though
 
3:05 AM
far out, what a stupid Unity bug. Mac OS X, build a simple test scene, app freezes. yet put in this code:
void OnGUI() {
    GUI.contentColor = new Color(0f, 0f, 0f, 0f);
    GUILayout.Label ("Test");
}
and tada, the app no longer freezes
outstanding since May. my game doesn't freeze luckily, but yeah just testing a small build of another test game thing, freezes on Mac, sigh @ Unity
 
3:43 AM
@TheMuffinCoder That depends on what you mean by "special".
 
Why is it Windows Defender insists on ignoring my instructions?!
Three files are falsely detected as malware
I tell it, the files are okay, please ignore them
A few minutes later "Windows has detected harmful files"
 
:(
 
"Windows has detected a harmful file: System32"
 
4:00 AM
There's a file named System32? :P
Here I was thinking it was a directory :P
 
"Folder"*
Meant folder.
Get those two mixed up.
Aychoteedubyooeyeareehotwiredotcom
 
 
5 hours later…
9:31 AM
Also, we got the hexagons back! :D
 
are these like, linear adventures and drawings?
 
Yes
@William'MindWorX'Mariager Why on earth are you up that early?!
 
@Jon Gosh, Xamarin studio looks like Xcode
 
Jon
xamarin studio is not that actually, that is monodevelop
but yeah
it has an apple feel to it
(was built on monodevelop, obviously)
 
user92578
Hi
 
I hate everything about Mac and Xcode. It is slow, dumb, deployment takes eternity, refactoring sucks, I just hate it.
@Tyyppi_77 hi
 
Jon
hate leads to suffering
 
10:02 AM
Lol, I'm already suffering)
Xcode killing me
 
Jon
Then you are on the path to the dark side, my young apprentice
 
I'm already on the dark side
@Jon I was supposed to be a Win developer. To bring a balance to the force. But instead I became an iOS dev, the apologist of the dark side.
 
haha
I loathe all platforms equally
 
user92578
Has someone here implemented bisection?
 
10:20 AM
Depends on the graph
 
user92578
I'm trying to solve a function like this: f(t) := cubic_bezier(0, x1, x2, 1, t) - x
 
user92578
And I think that I can implement the actual algorithm pretty easily
 
Then no
 
user92578
But the problem is finding the starting interval
 
Wiki says such operation is slow
How often are you gonna calculate it?
 
user92578
10:23 AM
I'd guess it's faster than solving this:
 
user92578
 
I guess :P
Why do you need to solve t?
 
user92578
For getting the Y value for a X coordinate
 
Aha
 
@Tyyppi_77 This looks scarier than it is. Most of the terms (like -54 b^3 + a (162 b^2 - 108 b + 18) + 54 b^2 - 18 b + a^2 (54 - 162 b) + 54 a^3 +2) repeat themselves a lot.
 
user92578
10:27 AM
Actually I'm not sure if that's even the one
 
user92578
Oh wait it's the correct one
 
user92578
@MartinSojka Are you saying that I shouldn't use bisection for this?
 
@Tyyppi_77 I'm saying that the solution looks nice and simple to me.
 
user92578
Well as a mathematical approach
 
user92578
However solving that in my game doesn't seem like a nice process
 
10:43 AM
Did you try doing it (after factoring out the common terms like the one above into temporary variables) and profiling the results?
 
user92578
I haven't tried either one yet
 
user92578
Translating that into running C++ code wasn't that tempting
 
@Tyyppi_77 actually it's not that hard at all
since that beizier equations is basically a quartic function, and there is closed formula, giving all the roots of quartic function
In mathematics, a quartic function, is a function of the form where a is nonzero, which is defined by a polynomial of degree four, called quartic polynomial. Sometimes the term biquadratic is used instead of quartic, but, usually, biquadratic function refers to a quadratic function of a square (or, equivalently, to the function defined by a quartic polynomial without terms of odd degree), having the form A quartic equation, or equation of the fourth degree, is an equation that equates a quartic polynomial to zero, of the form where a ≠ 0. The derivative of a quartic function is a cubic function...
 
Ooooo genius!
 
Pip
10:57 AM
morning GDSE
 
morning
 
Morning Pip
 
Pip
I seemed to be missing two letters :P
 
@Pip who cares? you miss more than just two letters
 
user92578
This?
 
user92578
10:59 AM
In mathematics, a quartic function, is a function of the form where a is nonzero, which is defined by a polynomial of degree four, called quartic polynomial. Sometimes the term biquadratic is used instead of quartic, but, usually, biquadratic function refers to a quadratic function of a square (or, equivalently, to the function defined by a quartic polynomial without terms of odd degree), having the form A quartic equation, or equation of the fourth degree, is an equation that equates a quartic polynomial to zero, of the form where a ≠ 0. The derivative of a quartic function is a cubic function...
 
Yup
I've calculated those before
 
user92578
But I'm not interested in all the roots
 
user92578
Just a single one that we calculated a formula for yesterday
 
I wasn't following yesterday. What root is it that you are interested in?
 
user92578
(-((sqrt(3)*%i+1)*((3*b-3*a-1)*sqrt((9*b^2+((-18)*a-6)*b+9*a^2+6*a+1)*x^2
+((-4)*b^3+6*a*b^2+(6*a^2+6*a)*b+(-4)*a^3+(-12)*a^2)*x+(-3)*a^2*b^2+4*a^3)+
((-9)*b^2+(18*a+6)*b+(-9)*a^2+(-6)*a-1)*x+2*b^3+(-3)*a*b^2+((-3)*a^2-3*a)*b+2*a^3+6*a^2)^(2/3)+
(2^(7/3)*a-2^(4/3)*b)*((3*b-3*a-1)*sqrt((9*b^2+((-18)*a-6)*b+9*a^2+6*a+1)*x^2+
((-4)*b^3+6*a*b^2+(6*a^2+6*a)*b+(-4)*a^3+(-12)*a^2)*x+(-3)*a^2*b^2+4*a^3)+
((-9)*b^2+(18*a+6)*b+(-9)*a^2+(-6)*a-1)*x+2*b^3+(-3)*a*b^2+((-3)*a^2-3*a)*b+2*a^3+6*a^2)^(1/3)+
(2^(2/3)-2^(2/3)*sqrt(3)*%i)*b^2+(2^(2/3)*sqrt(3)*%i-2^(2/3))*a*b+(2^(2/3)-2^(2/3)*sqrt(3)*%i)*a^2+(2
 
Pip
11:04 AM
holy crap
 
You except me to make out what root it is from that? :P
 
user92578
That's acquired by asking a math program to solve Cubic(0, a, b, 1, t)=x
 
user92578
And the using a process called "trial and error" I determined which one of the three results gives me correct results
 
What @Ali.S posted is a lot simpler than that
Also what you asked there is for it to find t if you know x, a and b
I thought you wanted to find x?
 
user92578
No
 
user92578
11:07 AM
I know x, it is always somewhere between 0 and 1
 
user92578
I need to figure out the t using it
 
user92578
so that I can figure out y
 
y=cubic_bezier(0, x1, x2, 1, t) - x
Correct?
 
user92578
no, y=cubic_bezier(0, y1, y2, 1, solve(cubic_bezier(0, x1, x2, 1, t) - x))
 
Jon
don't know what kind of car to get... ugh
car shopping sucks
 
11:11 AM
Aha
 
user92578
finding the y is easy
 
user92578
finding the t to find y is hard
 
Yeah
I'd give it a shot, but I only slept 4 hours so I don't really feel like digging deeper into this :P
 
user92578
you dont definitely have to do anything
 
I'm interested, that's all
My teacher always told us just to use the solve function on our calculator, but each time I was curious on how it worked
 
user92578
11:19 AM
Maybe I'll take a quick break from the math and do something else for a moment
 
hmm, my C# file loader can't load files that were serialized using UnityScript -- throws an exception saying it can't load type like "System.Collections.Generic.List`1[[SavedChallenge, Assembly-UnityScript ..."
 
@Tyyppi_77 emm... what I suggested was to find t based on X
although I didn't count for restriction (0<=t<=1)
 
user92578
no, not that t
 
user92578
sorry, im gettign confused with the names
 
user92578
@Ali.S this is excactly what I need to do
 
11:23 AM
I guess I have to repeat myself
bezier curve is basically a quartic equation
something in for x = e t^4 + at^3+ b*t^2 + c * t + d
 
I tried running it through Wolfram Alpha, then reducing the result a bit. It looks like this:
y = 3 * a - 3 * b + 1; // If that's == 0, no solution!
z = -54 * a^3 + 81 * a^2 * b + 243 * a^2 * x - 162 * a^2;
v = 81 * a * b^2 - 486 * a * b * x + 81 * a * b + 162 * a * x - 54 * b^3 + 243 * b^2 * x - 162 * b * x + 27 * x;
w = -9 * a^2 + 9 * a * b + 9 * a - 9 * b^2;
u = z + sqrt(4 * w^3 + (z + v)^2) + v)^(1/3);

t = (u / (3 * 2^(1/3) * y) - (2^(1/3) * w) / (3 * y * u) + (2 * a - b)/y
As I wrote, looks rather simple.
(Just a quick job, I didn't verify if I didn't make a mistake transcribing somewhere ...)
You could do a bit more simplifying too: w = -9 * a^2 + 9 * a * b + 9 * a - 9 * b^2 = 9 * (- a^2 + a * b + a - b^2) and so on.
 
reminds me of nicol bolas
"the thirteenth step - a perfect circle"
morning.
 
user92578
@MartinSojka Wow thanks
 
user92578
I'll make sure to try this
 
user92578
Oh look it's the SDL dude
 
11:35 AM
@Tyyppi_77 sorry about my outburst
 
@Tyyppi_77 Try the general idea (factor out common polynomial parts of the equation into temporary variables), not necessarily the possibly buggy example. :)
 
felt like I was being picked on is all.
 
user92578
Did you simplify the part that I pasted in?
 
user92578
Or a more general level cubic function?
 
I simplified what Wolfram Alpha gave me as one of the results when I asked it to solve 3 * (1 - t)^2 * t * a + 3 * (1 - t) * t ^2 * b + t ^3 = x for t.
 
user92578
11:38 AM
And that's a similified version of the CubicBezier function, right?
 
That's the written out version for cubic_bezier(0, a, b, 1, t) = x - unless I made some errors transcribing it.
 
12:26 PM
@ShenRuki been listening to Soen?
 
not this morning
great vocals
 
@Tyyppi_77 is it fixed, or not yet?
 
user92578
nope
 
user92578
couldn't get the right simplified version
 
user92578
ill need to do some more work
 
user92578
1:22 PM
this is annoying
 
@Hjorthenify Hadn't gone to bed yet :P I work nights
 
Pip
@Tyyppi_77 what are you trying to use it for?
 
user92578
tween curves
 
user92578
So basically modifying the last parameter that feeds into a lerp call
 
@William'MindWorX'Mariager Ah rigth well good morning then :P
 
1:35 PM
Morning :P
 
Joe
good morning all GDSE
 
user92578
Hey!
 
Pip
eyo
 
user92578
hmm, this is not working at all
 
user92578
for some reason it always returns ~0.71
 
user92578
1:40 PM
no matter what I feed in
 
user92578
Strange
 
c# doesn't want to load my serialized lists that unityscript made. BinaryFormatter can't find the assembly; I'd have to link the UnityScript DLL, but then the class names would conflict with my c# class names. and I don't seem to be able to use a custom SerializationBinder to force it to load the list as a specific Type, because it throws the error before it even reaches that far
(thinking that not having people's saved local high scores, or saved game, or challenge scores be loaded would be kind of bad)
 
Jon
hmmm
have you tried rebooting?
 
I have not, lemme try. I know Unity can be dumb sometimes, I'll just rule it out
one thought is to roll out some code in my Unityscript project to save the challenges, high scores, etc in a more portable/editable format, like a PlayerPrefs string or something, and give people a month to use that... then have the c# build come along and interpret that stuff and save. probably wouldn't worry about character saves because permadeath
 
user92578
i dont want to do this anymore
 
1:55 PM
@Tyyppi_77 if it ain't worth it, just say no! or take a break :)
 
user92578
Maybe I'll program something else for a while
 
user92578
One thing I'd like to do is separate the graphics view and the collision data from my level class
 
Jon
I use PlayerPrefs a lot
 
You can also help me track down a silent bug in a piece of undocumented code with lots of dependencies .. Probably the worst decision ever!
@Jon What's that?
 
Jon
unity save stuff
great for saving settings, or player progress
 
user92578
2:07 PM
This dude seems to have used bisection: github.com/gre/bezier-easing/blob/master/index.js
 
@Jon Just looked it up. This is pretty cool!
 
user92578
I hate it how GRP publishes Release Notes / Change Logs before even updating the game
 
heh
 
user92578
And everytime I'm like "OH LOOK THEYRE BUFFING THE INFINITE PACKAGE AND GIVING ME FREE GUNS"
 
user92578
and then I launch the game
 
user92578
2:17 PM
and see that its not updated yet
 
It's all about the hype
 
guys do you know any way of getting lua function that calling my c function?
 
user92578
you mean like a call stack?
 
just the last calling func
 
There's debug info you can query
 
Ben
I asked here yesterday, but i'm going to try again since i'm pretty much out of options. How can I load single assets in Unity at runtime? Assets that can be added to the game after build, which rules out Resources.Load. Asset bundles don't allow this, having a single asset bundle per asset is far too slow. Any ideas?
 
sounds like you've restricted yourself out of possibilities
 
@Ben I don't think there's any other options, unity is pretty big on precompiling stuff from my limited experience with it
 
Pip
depends on the asset
you can do custom loading
and you can always use streams
 
Ben
@Pip Streams?
 
Pip
45
Q: C# using streams

MartijnStreams are kind of mysterious to me. I don't know when to use which stream and how to use them. Can someone explain to me how streams are used? If I understand correctly there are three stream types: stream, read stream and write stream. Is this correct? And what is for example the difference be...

 
3:33 PM
@JesusChrist FFI
@JesusChrist are you using LuaJIT, or the regular lua for some crazy reason?
Here's the correct LuaJIT based solution: luajit.org/ext_ffi.html
Here's something I found on google in about 5 seconds just in case you're doing something absolutely insane like using regular Lua instead of LuaJIT which is an objectively better runtime: github.com/jmckaskill/luaffi
Just so everyone can easily see within 2 clicks for whatever CPU they are using...
LuaJIT, even with the JIT disabled, is still faster than Lua.
On basically every CPU in every test
And is almost always over 2x as fast (in interpereter mode!)
and more like 10x as fast with JIT
 
@MickLH nope, I'm not using luaJit
 
lol hence the rant
@JesusChrist see rant
@JesusChrist all joking aside, you saw the FFI bit right?
And, seriously, why aren't you using LuaJIT?
Oops, I'm sorry I woke up caring again and wanting to help people today. Don't worry that's burned out again.
 
@MickLH what is FFI?
 
user4704
we ran into a pretty serious issue with LuaJIT running itself out of memory :|
 
Foreign Function Interface
 
user4704
3:48 PM
stopped using it as a result
 
user4704
especially since it doesn't work on the xbox anyway
 
I almost brought up consoles as the only justification for vanilla Lua
Back when I looked into it, Microsoft was not cool with developers doing JIT
nor sony, nor apple
Also a bug in open source software is supposed to prompt you to submit a patch, just saying.
Also, it would be a fallacy to say that an implementation error (Memory Leak) implies that one is inferior, given that the other could easily have the same error hidden away.
 
user4704
I didn't say it was inferior; just making conversation.
 
EVERYTHING IS INFERIOR
 
It was more aimed at other people reading the conversation, who I was afraid might have interpreted that as an argument instead of an anecdote.
 
3:54 PM
Well they would be dorks anyway. ;)
 
user4704
Also "it runs out of memory" is a shit bug report, and we didn't have enough diagnostics evidence to narrow down a cause. I generally don't file bugs unless I have reasonable proof the bug is valid, and in this case we've only got a hunch.
 
Maybe the garbage collector just needed to be triggered manually inside a loop that got JIT'ted too tightly
 
user4704
Could be, be the weird thing is that the particular error message it reports only came from one place in the luajit code (the alloc function), and only when malloc() failed.
 
user4704
But in all diagnostic cases the total process memory usage and total LuaJIT memory usage were well within limits where you'd expect malloc to succeed. :|
 
user4704
The stupid crash was very hard to reproduce, but when it did, only happened when the editor loaded a level, which only actually invoked a good ten lines of linear, stupid-simple Lua code.
 
user4704
3:57 PM
So I just sent the bug to the middleware vendors instead and let them deal with it.
 
That's annoyingly ugly, I could justify fuckits at that point given a fixed deadline
 
user4704
yeah, since there was really no point to our using luajit anyway (the last thing I want is a different runtime on the console than on the desktop), I didn't feel like it was worth pursuing.
 
Right, that's the logic I genuinely agree with. Since it's a no-go on consoles it would be insane to have different runtimes.
 
user4704
Also we never actually run more than one line of Lua in the game itself :D
 
user4704
So there's really no point to a faster runtime.
 
4:01 PM
Yeah, although if one started moving more code into Lua and directly calling back to the C API....
That 10x performance boost on average could start to mean something in some cases
 
Jon
4:21 PM
gonna go test this one
 
user92578
looks good
 
Jon
220hp awd model
err
4wd
the winters we get here, i need that
 
user92578
nice
 
Jon
i'm actually shocked at the specs
i have been on the lookout for a tiny suv like this
i tested the VW Tiguan last night
200hp -- was peppy
but the engine is turbocharged
 
I like the nice aggressive look to that car
 
Pip
4:24 PM
ey
 
@Pip
 
Pip
sup
 
I woke up late today :( like 8am
Super unproductive
 
I woke up 11:30 am.. What's the problem? :p
 
user92578
I woke up at 12:15am, I win
 
4:34 PM
Around 8am is my peak efficiency potential
 
Pip
I woke up at like 6:00 am. Weenies :P
 
I have to get up at 5am so that I've had water and breakfast and been working for an hour when 8am comes around
 
Around 8 am I'd fit the AI of a zombie
 
I'm worthless by noon
hey wait a minute, @Tyyppi_77
 
user92578
sure
 
4:39 PM
calmly offering @Tyyppi_77 a nuclear hot tea
 
user92578
lol
 
user92578
accepts tea but hands are shaking because of nervousness and hands burn
 
user92578
AAAAARGH
 
user92578
IT BURNS
 
user92578
AAAAARGH
 
user92578
4:40 PM
ITS SO NUCLEAR HOT
 
Oh, shit, that was supposed to be a new, clear, hot tea
@Tyyppi_77 so how did the algorithm do and how did you improve it?
I KNEW IT!!! DAMNIT!!!
 
user92578
I never got actually to implementing it
 
user92578
People started suggesting the other approach
 
user92578
And I got stuck to how to figure out the starting interval?
 
The other approaches are more high-tech but require either knowledge of complex arithmetic, or calculus
 
user92578
4:43 PM
yeah
 
And the starting interval is pretty easy, just take the min and max between (0, y1, y2, 1)
 
user92578
Oh
 
Bezier curves stay inside their control points
 
user92578
I feel kinda stupid that I didn't figure that one out
 
user92578
I probably got confused just staring at the equation with the x value included
 
4:47 PM
Don't feel bad, it's not just something you can assume.
It would be a lot harder to prove it
 
user92578
ah, okay
 
user92578
Wait, stupid question
 
user92578
Is this the function I want to use in the bisection? ` f(t) := cubic_bezier(0, x1, x2, 1, t) - x`
 
00:00 - 17:0017:00 - 00:00

« first day (1821 days earlier)      last day (3189 days later) »