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

Enabling Graphics for Nvidia Tesla GPU in Azure VM

November 11th, 2018 | Posted by pftq in Blabberbox | #
If you're trying to use the GPUs Azure VMs for actual graphics like in game development, DirectX, or other things where the GPU has to be detected, you need to set the Tesla GPUs to WDDM mode.  By default they are in TCC, which doesn't let them be detected by the system in RDP and has graphics disabled.  Not even Nvidia control panel will see the card.

Solution is pretty quick - just a command line entry.  It can just be done in Command Prompt, no additional software needed.  Credits to the comments on Reddit here:

(Make sure you first have the Nvidia drivers installed, either by starting the VM with an image that has them or installing manually.)

1. Open Command Prompt.
2. Enter: cd C:\Program Files\NVIDIA Corporation\NVSMI
3. Enter: nvidia-smi -l
4. Ctrl+Break to stop the loop. Note the long 000:00:00.0 number under bus-id.
5. Enter: nvidia-smi -g <bus-id> -fdm 0
6. Reboot.

Once you're done, you'll notice Nvidia control panel will now detect the card.  DirectX applications will see it as well, etc.
293 unique view(s)

Placebo Effect on Mind

November 10th, 2018 | Posted by pftq in Blabberbox | #
Very interesting article that sounds a lot like the ideas portrayed in @MNightShyamalan's @SplitMovie
218 unique view(s)

Double Tax Issue on Patreon

November 3rd, 2018 | Posted by pftq in Blabberbox | #
The Hidden Patreon Double Tax...

Would love to be shown wrong here, but as far as I've found, money on @Patreon is taxed for both patron and creator. In any other situation, only the giver or receiver is taxed, not both. Donations to non-profits are deductible, salaries of employees are deductible expense for the employer, even traditional non-Patreon patron/sponsorship arrangements are at least some form of write-off/expense for the sponsor.  But for Patreon, unless you go through the excessive effort of establishing yourself as a company with an elaborate case for how giving to artists is business-related or straight up start a non-profit organization yourself, the money you give on Patreon is going to be from income you paid taxes on, and then that creator also pays taxes on it as their income.

This is a simplification of the math but just to illustrate: If you made $100k this year and wanted to give away half to artists on Patreon, you literally can't because $50k is owed to taxes and you actually only have $50k afterwards for yourself, your own expenses, etc.  Half of your money on $100k income would actually be $25k.  If this were any other situation like hiring or donating to a non-profit, you get to give away as much as you want from the $100k and then only get taxed on what is left over *after* - in other words, half of $100k instead of half of $50k.  It is basically doubling the amount of money someone can give and is normally what happens anywhere else, just not at Patreon.

The best way to solve this is if there is a non-profit through which all patrons are giving through and can treat as a write-off tax-wise.  Then only the creators are taxed, just like any other situation for donations, salaries, sponsorships, etc.  Ideally it is Patreon itself, so no one else has to think about these tax questions or look for some other organization to participate on Patreon through.  It's what you would expect when pledging money and aligns with what Patreon is.

It would also open the doors to large corporate patrons.  Think of how many big corporations already give money for causes, branding, etc. The perk of doing this on Patreon is that you can actually point to your company profile there as proof of you supporting artists, projects, etc.  It can easily become like every company having a Facebook or LinkedIn profile.  But they won't do this if for every million they give on Patreon, they still have to pay half a million in taxes on money they don't even have anymore.  They're better off just giving through traditional means or even just straight up hiring artists - any other situation where again the giver isn't taxed for money the receiver is already taxed on.

Right now Patreon is a for-profit company with investors, which makes all this tricky as they must prioritize maximizing profits.  The only way for now would be if a third party started a non-profit for others to contribute through or if, as mentioned earlier, you set up your own company to give through (which has to be a seriously legitimate business reason or you'll find yourself with a large IRS bill down the road).  I've also received pushback that artists do not want to be "sponsored" or donated to, that there's a negative stigma attached, that they want their work treated as product or service, but this just goes back to the point that you might as well just hire the artist instead.  It's hard to tell what percentage of the userbase is on one side or the other, but at least for me, the goal was to support the artists on a monthly basis.  It's also what a patron actually does and what pledging means.  The point though is that on both sides, whether Patreon is supposed to be a platform for selling goods or supporting artists, it is doing this worse than traditional means, at least from a tax perspective, because of the double taxation.  While this is not a big deal for smaller pledges, it really adds up for those wanting to contribute more significant sums and makes it difficult to sustain long term because it is effectively costing you double what the artist is actually receiving.
262 unique view(s)

SF Place on Fire

October 28th, 2018 | Posted by pftq in Blabberbox | #
Guess that's my cue to finally leave SF... (esp with the asbestos exposed)
213 unique view(s)

Free Fax Online

September 14th, 2018 | Posted by pftq in 42 | #
Save you the trouble of buying a fax machine or paying for a service.
121 unique view(s)

Open to Interpretation

September 9th, 2018 | Posted by pftq in Thought of the Day | #
Tired of having my words reinterpreted to mean different things. People are too busy looking for what they want to hear and not thinking about what someone else is actually trying to say.
403 unique view(s)

Typical Businessman Thinking

September 2nd, 2018 | Posted by pftq in Thought of the Day | #
Typical investor/businessman thinking: If I could just find a genius smart enough to make me a million dollars but too dumb to do it unless I tell him to...
382 unique view(s)

Distant Earth

August 28th, 2018 | Posted by pftq in Thought of the Day | #
Somewhere out there right now is someone seeing light from a distant planet Earth and assuming there is no intelligent life because it is light from thousands of years ago.
369 unique view(s)

Line-In Recording Noise

August 26th, 2018 | Posted by pftq in Blabberbox | #
Note to future self. Source of line-in recording noise is the MIDI USB cable from the piano to computer. Do not replace the sound card, do not buy an audio device. #audio #recording
295 unique view(s)

The Sound That Isn't There

August 20th, 2018 | Posted by pftq in Stories | #
Premise of a horror film I thought of while staying up too late. Tongue
Imagine every night you hear the loud humming of what you think are street sweepers driving by.  One night, you get tired of it and venture out into the streets to complain, except there's nothing there.  You run towards the sound, but it just keeps getting louder and louder, with nothing in sight for as far you can see.  The sound eventually starts moving away and goes quiet, like it does every night, and you go back home confused.

The next night, you run out again when you hear the sound, trying to get to the center of it before it goes away again.  This time, you keep running towards it as it tries to get away from you.  At first, you are barely able to keep up with the sound as it is moving away.  At some point, you realize the sound is suddenly getting louder and louder than it ever has before.  You get so caught up running towards the sound that you don't...[More]
65 unique view(s)

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]
984 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
332 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.
280 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)
243 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]
276 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, even before I started school.  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...[More]
131 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.
203 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)