Oleg Andreev

Software designer with focus on user experience and security.
You may start with my selection of articles on Bitcoin.
Переводы некоторых статей на русский.
Product architect at Chain.
Author of Gitbox version control app.
Author of CoreBitcoin, a Bitcoin toolkit for Objective-C.
Author of BTCRuby, a Bitcoin toolkit for Ruby.
Former lead dev of FunGolf GPS, the best golfer's personal assistant.
I am happy to give you an interview or provide you with a consultation.
I am very interested in innovative ways to secure property and personal interactions: all the way from cryptography to user interfaces. I am not interested in trading, mining or building exchanges.
This blog enlightens people thanks to your generous donations: 1TipsuQ7CSqfQsjA9KU5jarSB1AnrVLLo
“Giving every piece of data a fixed identity, is radically different from the relational model which deals only with sets of values and leaves the notion of identity up to the application. Working with identities as a first-class notion is essential if schema is to be flexible. Long before we can agree on the exact shape of the data used to represent a person or a building, we can agree that individual people or buildings exist and that they have certain obvious attributes that we might want to record: height, address, builder, etc.”
“The name, if you’re wondering, comes from the simplest sequence of operations which will thoroughly mix the bits of a value - "x *= m; x = rotate_left(x,r);” - multiply and rotate. Repeat that about 15 times using ‘good’ values of m and r, and x will end up pseudo-randomized"
Austin Appleby.
HFS+ also has a few specific optimizations. When a file is opened on an HFS+ volume, the following conditions are tested:
— The file is less than 20 MB in size
— The file is not already busy
— The file is not read only
— The file is fragmented (the eighth extent descriptor in its extend record has a non-zero block count)
— The system uptime is at least 3 minutes
If all the above are satisfied, the file is relocated (de-fragmented) - on-the-fly.
What Is Mac OS X?, Mac OS X Filesystems (Amit Singh)The Real Human Interface
Thanks to gotsyk for the link.
Thanks to julik for the link.
The encoding scheme is required to
— Be human readable and machine readable.
— Be compact. Humans have difficulty in manipulating long strings of arbitrary symbols.
— Be error resistant. Entering the symbols must not require keyboarding gymnastics.
— Be pronounceable. Humans should be able to accurately transmit the symbols to other humans using a telephone.
Recursive descent parser in JavaScript
The parser enables you to write BNF-like rules directly in JavaScript without need to compile the file (like with Ragel, YACC, Bison, ANTLR etc.)
The grammar is a JS function with 11 arguments (9 rules and 3 hooks). Each rule gets two arguments: text (string) and state (arbitrary value) and returns a tuple of new text and new state (or null if rule was not matched). Parser walks character by character from left to right. text is always a tail of the initial text. Generally, text is empty string when parser finishes.
All(rule1, rule2, …) — a sequence of rules. Example: All(Char(“[”), list, Char(“]”)) defines a JS array.
Any(rule1, rule2, …) — “OR” rule for any number of rules. Example: JSONValue = Any(StringRule, ObjectRule, ArrayRule, …)
Char(alphabet) — character matching rule. Example: digit = Char(“0123456789”)
NotChar(alphabet) — inverse of Char(). Any character — NotChar(“”).
Optional(rule) — tries to match rule and skips it if not matched. Example: optSpace = Optional(Char(“ \t\r\n”))
EOF — matches the end of the text. Fails if text != “”.
Terminator — terminates parser. That is, always returns empty text.
Y — Y-combinator for defining recursive rules. Example: X = Y(function(x) { return abc(x) } ), where x is equal to X. Google for more info on Y-combinator.
Hooks enable you to actually build some structures using your grammars. Every hook returns a new state value to use in further rules. You should avoid mutable state values because some rules may be thrown away if not matched later (remember: this is a recursive parser!). For example, use array.concat([value]) instead of array.push(value).
Capture(rule, function(buffer, state1){ return state2 }) — captures raw string buffer to store in the state2.
Before(rule, function(state1){ return state2 }) — creates a new state for the rule (e.g. creates empty array for array syntax).
After(rule, function(beforeState, afterState){ return newState }) — creates a new state after successful match. You can put nested values to the container if beforeState is a container before rule parsing, afterState is a nested value (after rule match) and newState is a new container with this value.
See usage examples in JSONGrammar.js
See the parser source code in Parser.js
How to use Natural Order
Drop Natural Order into the System Folder and Restart your Mac.
NaturalOrderSort.org