Draco Torre

David G Shrock

Give Cryptopals a Try

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

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.

How-To: Substrings in Swift

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.

Swift 3: sub-string
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Cocoa

let aString = "A classic string, \"Hello World!\""

// need to use String.Index
let fifthChar = aString[aString.index(aString.startIndex, offsetBy: 5)] // s
let suffix = aString.substring(from: aString.index(aString.startIndex, offsetBy: 18))

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,")

Skyrim Special Edition Announced

Bethesda Softworks announced a remastered “Skyrim Special Edition” coming 2016 October 28th for PC, Xbox One, and PlayStation 4. The edition includes updated art, better snow and water shaders, improved reflections, and dynamic depth of field along with support for mods on the console game systems. Check out this YouTube video at 3:17. This will be a free update for PC players with “Legendary Edition.” A 64-bit upgrade with more memory availability would be welcome on the PC, but would mean an update to SKSE for mods.

Besides taking advantage of the popularity of TES V: Skyrim, this indicates to me that the next chapter in The Elder Scrolls may still be two years away. In the mean time, it will be interesting to see how the updated visuals compare with the work the mod community has accomplished. For Xbox One and PS4 players, it should be nice being able to install new quests, armors, or homes built by the mod community.

For TES VI, I’d be happy to visit Summerset Isles or Valenwood, but I’d like to see Elsweyr the most.

Draco Calculation Update: No Ads

Update to Draco Calculation v1.05 removes ads and improves hint suggestion quality. Still free.

DracoCalcIcon 200

Since iAd will be closing down soon, and I have no intentions on using an alternative ad provider, I removed ads. The primary reason I implemented iAd was for the experience and secondarily to help pay license fees. The AI improvements for suggestions address several cases playing to the tableau that might block future play. My goal for the AI is to play better than a beginner, and not nearly as good as an expert. Suggestions should be learning opportunities for beginners without becoming a crutch or giving away advanced strategy. There’s room for more improvement, but I believe the AI has reached my goal.

Thanks for playing.