Skip to content

Instantly share code, notes, and snippets.

View dwaite's full-sized avatar
💭
Wondering what status is for

David Waite dwaite

💭
Wondering what status is for
View GitHub Profile
@dwaite
dwaite / gen.swift
Last active November 17, 2017 14:03 — forked from blainerothrock/gen.swift
A Very Simple Genetic Algorithm Written in Swift 3
#!/usr/bin/env xcrun swift -O
/*
gen.swift is a direct port of cfdrake's helloevolve.py from Python 2.7 to Swift 3
-------------------- https://gist.github.com/cfdrake/973505 ---------------------
gen.swift implements a genetic algorithm that starts with a base
population of randomly generated strings, iterates over a certain number of
generations while implementing 'natural selection', and prints out the most fit
string.
The parameters of the simulation can be changed by modifying one of the many
____ ____
| |
|__ \ / __|
| / \ |
|____ ____|
Filtering out the data I think is irrelevant, it looks like CoreData is being used for synchronizing bookmarks (rss feeds?) into sqllite, and has some internal error fetching. SIGBUS normally indicates a misaligned memory problem, but it looks like it is using an index as a pointer, or using an index against a null pointer (failure at 0x10).
Based on method names, I would guess this is an error accessing ~/Library/Mail/AvailableFeeds
I have seen a few issues with Mail when safari 4 betas are installed, the older webkit bundled with these has issues that are fixed with newer releases. However, your version string makes me think you are still using the shipping webkit.
-DW
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000010