Blabberbox:Random blog-like posts from pftq.Share on Twitter

Lossless Algorithms

August 12th, 2018 | Posted by pftq in Ideas | #
The following is an algorithm I wrote for generating support/resist in trading with no thresholds or parameters. On each price move, the price range traveled loses a point in score. The resulting score of any price range is its support/resist strength, which declines the more it is traveled across (zero being strongest and untraveled). Visually, the price line looks like an eraser scrubbing away ranges on the chart; ranges least scrubbed thin out to support/resist lines.  The reason I call it a "lossless" algorithm is because it doesn't estimate anything or use any seeded values/thresholds.  It is analogous to lossless audio/image file formats.  There is no sampling or use of statistics.  There are no knobs to tweak and no assumptions to take.  It is a perfect 1-to-1 map of where price moves most and least freely.  It is also extremely light both in computation and space because all you're doing is a single subtraction per datapoint and...[More]
909 unique view(s)

Death is Only a Door

August 12th, 2018 | Posted by pftq in Stuck in My Head | #
Death is Only a Door (Cloud Atlas OST) by Tom Tykwer, Johnny Klimek, Reinhold Heil
331 unique view(s)

God's Image

August 5th, 2018 | Posted by pftq in Thought of the Day | #
So many say we're created in God's image, yet act more like the shadow that merely follows. We call Him the Creator, yet so few carry on the work of actually creating.
268 unique view(s)

Arrival of the Birds

August 3rd, 2018 | Posted by pftq in Stuck in My Head | #
Arrival of the Birds by The Cinematic Orchestra (@TCO_Official)
240 unique view(s)


July 31st, 2018 | Posted by pftq in Blabberbox | #
One of the more interesting articles I've read in a while... didn't realize quarternions used in game development had actual significance in physics and there was a step further called octonions. As usual, learning more working on games than I ever did in school.
199 unique view(s)

Securing HTTPS SSL

July 29th, 2018 | Posted by pftq in 42 | #
Below are all steps to take to make sure your site is served securely over HTTPS.  Any suggestions, feel free to let me know.

1. Preliminary:
- Install SSL certificate to your domain either through GoDaddy, AutoSSL on CPanel, or Let's Encrypt on CPanel.  Let's Encrypt is easiest to me, as it auto-renews and is free.  There isn't really a reason to pay anymore for SSL.  However, note that you can't have both AutoSSL and Let's Encrypt on at the same time (they will compete/conflict).  If you run into errors for subdomains on Let's Encrypt, try excluding the www- checkbox.  For Windows IIS, you can use CertifyTheWeb which auto-installs from Let's Encrypt.

2. Adding HSTS to servers....[More]
266 unique view(s)

Happiest Memory

July 15th, 2018 | Posted by pftq in Essays | #
     The happiest memory in my life is not one I could ever share with anyone else.  Because it isn't a moment from within my real life but instead one from within a dream, a dream that occurred almost ten years ago.

     In that dream, I spent my childhood alongside someone who I seemingly knew all my life.  We would race neck-to-neck as we leapt from rooftop to rooftop, laughing maniacally as we tried to one-up each other, reaching higher and higher into the skies before eventually just taking flight altogether.  If it seemed we flew too high and one of us began to fall, we would catch each other and throw ourselves even higher than before, until we finally made it above the clouds.  At the end of it all, we'd sit atop the remains of an old wooden post so high up that we could watch the sun set, not against the land or water but against the sky itself, the ocean of clouds below reflecting its descent like a mirror facing up against the...[More]
113 unique view(s)

Video Game AI

July 14th, 2018 | Posted by pftq in Blabberbox | #
Just found out the #AI behind Black and White was in fact designed by @demishassabis, co-founder of @DeepMindAI. Too ironic given I often cite #videogames as most influential to my own ideas (incl. Tech Trader and Creating Sentient Artificial Intelligence). Was not expecting it to be so literal.
202 unique view(s)

Full VR Multiplayer Replication Complete

July 4th, 2018 | Posted by pftq in Blabberbox | #
Ready for rematch. Grin

A lot of people have constantly tried to convince me multiplayer alone is a hard thing to do and VR in multiplayer is even harder, but I'm not finding that the case so far.  If anything, it's a lot of time and attention to detail, but nothing really seems to come across as overwhelming or rocket science.  I certainly wouldn't hire someone just to take care of multiplayer networking now that I know what it entails.

If anything the hardest part was just finding out how to connect to another instance of the game in the first place, which was just poorly documented.

After that, it's a lot of figuring out what you need to replicate or not replicate in the course of the game using remote procedural calls.  This thread in particular was most helpful:

Beyond that, if you want to improve performance, you'll want to run code simultaneously on the user's computer at the same time it is doing a call to the server to run it.  The topic itself is called client-side prediction.  Still working out the best practices for this, but it's all fine-tuning and optimizing from here.
237 unique view(s)

Transfat Ban

June 23rd, 2018 | Posted by pftq in Blabberbox | #
Transfat is supposedly banned as of 2018, yet I just saw transfat-free cookies at the store with partially hydrogenated oils in the ingredients.  I guess they just banned the name.
221 unique view(s)

Multiplayer in Unreal via IP

June 23rd, 2018 | Posted by pftq in Blabberbox | #
Finally got #UnrealEngine connecting over the internet for barebones multiplayer.  Documentation on just getting direct IP-to-IP connection w/o Steam, etc was surprisingly sparse.

Here's a quick step-by-step:
1. Go to Editor Settings.  Set your port to a number like 7777.

1. Package your game (here, using Windows).

2. Create a shortcut to your game.exe called Host, and modify the shortcut target to add the following after "" (rename the map + path as needed):
"/Game/FirstPersonBP/Maps/FirstPersonExampleMap?Listen" -game -log

3. Create another shortcut called Client, and add the following instead:
<hostIP>:<port> -game -log

4. The host computer would run the Host shortcut.  Everyone else runs the Client shortcut (which connects to the host's IP and port); make sure the host has the port opened up on firewall (in Windows, you'd want to add an inbound exception to the port and then only allow the IPs of the other players in scope).

There's still a lot of work after this, but at least now you are connected online.  From here, you'd look into guides on replication, etc which make sure all players are in sync and see the same things happening.  A good starting guide is here:
276 unique view(s)

Bitcoin Probability

June 22nd, 2018 | Posted by pftq in Blabberbox | #
If they're going crazy right now on how some random hashtag should be "statistically impossible," wait till two people generate the same wallet (which is not supposed to happen until the sun dies... "statistically"). #Bitcoin
221 unique view(s)

Tennis Notes

June 15th, 2018 | Posted by pftq in Random Stuff | #
Personal tennis notes for myself.  I am ambidextrous and play tennis with both hands (or two rackets), so I've had to come to my own conclusions on a lot of things.  I also trained initially under a coach who basically had me hit every shot with an extreme western(?) grip for top spin, even on serves both hands (which results in inside-out slice serve, I think - not sure what it's called), so most advice I get has often not been helpful (especially things like suggesting *not* to use such an extreme grip).  My grip is actually rotated to the point it is actually a continental grip, except I hit with the outside face instead which is the complete opposite and forces you to over-rotate to meet the ball and creates the kick in top-spin.  The hand motion without a racket looks like I am hitting the ball with the back of my hand instead of the palm.  I went through some phases in my life post-college where I was repeatedly told I was holding the racket wrong...[More]
152 unique view(s)

Autumn Leaves

June 8th, 2018 | Posted by pftq in Stuck in My Head | #
Autumn Leaves by Drought on Mars (@droughtonmars)
232 unique view(s)

UnrealEngine VR Detection is Delayed

June 2nd, 2018 | Posted by pftq in Blabberbox | #
Been stuck trying to figure out why #VR code in #UnrealEngine runs fine in the editor but not in a packaged build.  It turns out when packaged, the "Is Head Mounted Display Enabled?" function will not actually detect the headset until half a second or so after the game starts.  Janky way to fix this for now is to delay all VR code by a half second, but my worry is that this will vary depending on the computer we're running on.

Oh and for those who can't get even get the game to run in VR mode at all in the packaged game, you have to check "Start in VR" in the project settings.  This will still start in non-VR if no headset is connected, so it's annoying this isn't just a default option to begin with.
190 unique view(s)

Remote Desktop Broken After Windows Update

May 10th, 2018 | Posted by pftq in Blabberbox | #
Tried to sign on to my remote workstation this morning only to get some error about "CredSSP encryption oracle mediation." It turns out my laptop installed Windows Updates overnight.  The below updates are what you'll want to uninstall and then restart to be able to use RDP again.  They're basically updates installed on 2018-05-09.
KB4338819 (July 2018)
KB4464218 (Sep 2018)
KB4462919 (Oct 2018)
KB4467702 (Nov 2018)

It looks like the issue is that both server and client need the updates installed to be able to connect (in other words, no backwards/legacy support).  Will be holding off on these updates until Microsoft fixes the compatibility issues, as I'm not inclined to install anything that might accidentally lock me out of my servers.

To permanently disable an update from being reinstalled each time you restart, see:

Update: Looks like there is a new way to keep the update and disable the CredSSP only:
1. Run > gpedit.msc
2. Browse to Computer Configuration / Administrative Templates / System / Credentials Delegation in the left pane.
3. Change the Encryption Oracle Remediation policy to Enabled, and Protection Level to Vulnerable.
If you don't have gpedit.msc, install:
377 unique view(s)

The Mindset of Money

April 15th, 2018 | Posted by pftq in Blabberbox | #
It seems I can't get a dinner anymore without overhearing talk about blockchain. One point I keep hearing that irks me though is that government wouldn't restrict the crypto industry because of how much money they could make by letting it flourish.  That is just wrong on so many levels.  Whether a law exists or not has nothing to do with making money.  It doesn't matter if everyone got paid or the government gets a cut.  Otherwise by that logic, you might as well say the government should let drug trafficking and black markets flourish because of "how much money they could make."  It's like if a cop let someone go for stealing because the cop got a share.  As long as everyone gets a piece, what's the harm? Unfortunately this kind of thinking seems to be the norm in crypto and really just finance in general, where right or wrong is decided solely by whether money is made.
469 unique view(s)

Marble Machine

April 15th, 2018 | Posted by pftq in Stuck in My Head | #
Marble Machine by Wintergatan (@wintergatan)
462 unique view(s)

Advanced Alien Life is Tiny

March 19th, 2018 | Posted by pftq in Ideas | #
If a few hours on a larger planet with higher gravity can be years on Earth, then any advanced alien life is most likely from a smaller planet with much lower gravity than us, where each year for us can be millions for them.
544 unique view(s)

Sound is Just a Concept

March 19th, 2018 | Posted by pftq in Thought of the Day | #
Sound is just a concept, a label to a group of molecules moving together in tandem.  There is no "thing" called sound that actually travels.  It's just a domino effect.
599 unique view(s)