Posts

Big News for rFactor 2

Sep 16, 2016

Today ISI, creator of rFactor, and Luminis, a Dutch software group, announced a partnership to accelerate rFactor 2 development with a new company, Studio 397. This is big news since rFactor 2 has been far less popular as its predecessor with few online racers and light on third-party modded content even though rFactor 2 is pitched as a modding platform. The “partnership plans to release an ambitious roadmap” including user interface improvements, work in the modding community, and updated graphics engine supporting VR on Oculus Rift and HTC Vive. See studio-397.com for details.

I’ve tested the rfactor 2 demo twice, once during early beta and recently, and found a good experience with solid physics and detailed races including penalties and caution flags. The light content kept me from purchasing, but with this new announcement, the title is back on my radar. The latest demo comes with a fun track and two cars. Drive full race, including practice and qualifying sessions, day or night. You may links to the demo on rfactor.net. Purchase via Steam.

Bathurst-14.png image from rfactor.net/web/rf2/screenshots/

Hat tip to James at pretendracecars.net for alerting me to this announcement.


.NET Core

Sep 7, 2016

In 2016 we’ve seen some exciting new tech things arrive: VR head-mounted displays from Oculus, HTC, Sony with VR games we dreamed about in the 1990s; PS4 Pro; nVidia 16nm Pascal chip. What I’m most excited about, though, is finally here after a decade of waiting: Microsoft .NET Core cross-platform support. Now I can write, build, and run .NET software on macOS, Linux, or Windows. Use the console, editor of choice, or Microsoft VS Code to write C# code, test, debug, and target multiple platforms. It’s about time! (Sure, Mono is nice, but this is cool!)

To get started with .NET Core, check out the guide at docs.microsoft.com/en-us/dotnet/articles/core/index and try out some tutorials. Find the SDK at https://www.microsoft.com/net/core.

How to setup .NET Core SDK on Mac

Follow the .NET Core installation instructions, which are a bit out of date as of this writing, so I’ll summarize the steps and note the difference here.

1. Use Homebrew to get OpenSSL

Enter the commands in console as shown.

2. Use the installer

3. and 4. Follow the instructions to test everything is working.

Creating a new application using “dotnet new” may be run immedately and should output “Hello, World!”

mkdir hwapp
cd hwapp
dotnet new
dotnet restore
dotnet run

If not working

Try the following (edit for your version of .NETCore):

sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib /usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.0/System.Security.Cryptography.Native.dylib
Continue reading...

Give Cryptopals a Try

Jul 15, 2016

Lately, I’ve been working through the challenges at Cryptopals.com. The problems are organized for learn-as-you-solve method supplying the groundwork for later challenges. Cryptography is relevant given increasing number of actors involved in data theft from business competition to overreaching government agents. Even if cryptography isn’t your field, the problems are good practice for beginners or advanced programmers keeping skills in shape. Solve problems in your preferred language, or to help learn a new language. I’ve been working through the challenges in C# to round out some areas I haven’t had as much practice with, and also in Swift since it’s still new to me. It’s a good bit of fun.

Go ahead, give Cryptopals a try.


Frostfall 3.1 Update for Skyrim

Jun 29, 2016

Chesko recently updated “Frostfall - Hypothermia Survival” mod for TES V: Skyrim to v3.1 along with required update, “Campfire - Complete Camping System” v1.8. If you’re using Chesko’s “Wearable Lanterns” then you’ll want to update that, too. The main new feature I’m excited about is the return (absent since legacy v2.6) of adjusting custom armors for more appropriate exposure protection so that those skimpy armors seem skimpy in Skyrim’s cold environment. Besides bug fixes, the update also includes the addition of a third vampire choice, immortal, along with mortal and supernatural. With SkyUI, warmth and coverage information shows up on the apparel menu.

SkyrimFrostfallApparel

This v3.1.1 (nearly?) completes the rewrite of legacy “Frostfall” v2.6 for improved stability and better player experience. Breaking out “Campfire” enables players to choose to camp without survival challenge and also makes things easier for the developer. The difference is huge. Big thanks to Chesko for the diligent, quality work. If you’ve been holding out with legacy edition, now is the time to update.

To me, TES V: Skyrim with “Frostfall” and “Campfire” complete Skyrim. Without these mods, Skyrim just doesn’t feel right.

Continue reading...

How-To: Substrings in Swift

Jun 28, 2016

Extracting a character or sub-string in the Swift programming language may seem less intuitive for programmers familiar with Java or C. One interesting difference is the CharacterView to access the length (count) of a string such as aString.characters.count. Swift String includes subscript notation by String.Index instead of an Integer, and the substring takes a Range or ClosedRange as argument. Let’s go over some code to see it in action.

updated for Swift 5

Swift 5: sub-string
import UIKit
let aString = "A classic string, \"Hello World!\""
// need to use String.Index
let fifthChar = aString[aString.index(aString.startIndex, offsetBy: 5)] // s
// substring deprecated
//let suffix = aString.substring(from: aString.index(aString.startIndex, offsetBy: 18))
let suffix = aString.firstIndex(of: "\"")!
let start = aString.index(aString.startIndex, offsetBy: 19)
var end = aString.index(aString.startIndex, offsetBy: 23)
// get a sub-string with a ClosedRange
let range = start...end
let substring = aString[range] // Hello
// replace by text matching is easy enough
let byeStr = aString.replacingOccurrences(of: substring, with: "Goodbye,").replacingOccurrences(of: "classic", with: "dire")
// replace by Range
end = aString.index(aString.startIndex, offsetBy: 24)
let bString = aString.replacingCharacters(in: Range(uncheckedBounds: (lower: start, upper: end)), with: "Hi,")
Continue reading...