This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+-----------------------------------------------------------------------------------------------------+ | |
| name | bits | bytes | min | actual min value | max | actual max value | | |
|---------+--------+--------+-------+----------------------------+--------+---------------------------| | |
| boolean | 1-bit | -- | false | | true | | | |
| byte | 8-bit | 1-byte | -2^7 | -128 | 2^7-1 | 127 | | |
| short | 16-bit | 2-byte | -2^15 | -32'768 | 2^15-1 | 32'767 | | |
| char | 16-bit | 2-byte | 0 | '\u0000' | 2^16-1 | '\uffff' (65535) | | |
| int | 32-bit | 4-byte | -2^31 | -2'147'483'648 | 2^31-1 | 2'147'483'647 | | |
| long | 64-bit | 8-byte | -2^63 | -9'223'372'036'854'775'808 | 2^63-1 | 9'223'372'036'854'775'807 | | |
| float | 32-bit | 4-byte | +/- -3.4028235 * 10^38 | +/- 3.4028235 * 10^38 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See commentary below this gist. | |
import Foundation | |
import QuartzCore | |
// Implementation from https://talk.objc.io/episodes/S01E90-concurrent-map | |
public final class ThreadSafe<A> { | |
var _value: A | |
let queue = DispatchQueue(label: "ThreadSafe") | |
init(_ value: A) { self._value = value } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import argparse | |
import re | |
class InstrTraceBreakpoint(gdb.Breakpoint): | |
def __init__(self, location, nb_args, *args, **kwargs): | |
super(InstrTraceBreakpoint, self).__init__(location, gdb.BP_BREAKPOINT, internal=True) | |
self.silent = True | |
self.nb_args = nb_args | |
return |
OlderNewer