If you're thinking of checking out the Pony programming language, here's a list of things that I think are important to know. This list is based on a Tweet that I wrote.
There are Pony packages for several popular editors.
import z3 | |
def sym_xoroshiro128plus(solver, sym_s0, sym_s1, mask, result): | |
s0 = sym_s0 | |
s1 = sym_s1 | |
sym_r = (sym_s0 + sym_s1) | |
condition = z3.Bool('c0x%0.16x' % result) | |
solver.add(z3.Implies(condition, (sym_r & mask) == result & mask)) |
If you're thinking of checking out the Pony programming language, here's a list of things that I think are important to know. This list is based on a Tweet that I wrote.
There are Pony packages for several popular editors.
# LVDB - LLOOGG Memory DB | |
# Copyriht (C) 2009 Salvatore Sanfilippo <[email protected]> | |
# All Rights Reserved | |
# TODO | |
# - cron with cleanup of timedout clients, automatic dump | |
# - the dump should use array startsearch to write it line by line | |
# and may just use gets to read element by element and load the whole state. | |
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |
Here are all of the resources mentioned by Deconstruct 2017 speakers, along with who recommended what. Please post a comment if I missed something or have an error!
// Faster solution for: | |
// http://www.boyter.org/2017/03/golang-solution-faster-equivalent-java-solution/ | |
// With threading. | |
// g++ -std=c++11 -Wall -Wextra -O3 -pthread | |
// On my computer (i5-6600K 3.50 GHz 4 cores), takes about ~160 ms after the CPU | |
// has warmed up, or ~80 ms if the CPU is cold (due to Turbo Boost). | |
// How it works: Start by generating a list of losing states -- states where the | |
// game can end in one turn. Generate a new list of states by running the game |
There doesn't seem to be a good resource online describing the issues with protocol buffers and deterministic serialization (or lack thereof). This is a collection of links on the subject.
Protocol Buffers v3.0.0. release notes:
The deterministic serialization is, however, NOT canonical across languages; it is also unstable across different builds with schema changes due to unknown fields.
Wire format ordering and map iteration ordering of map values is undefined, so you cannot rely on your map items being in a particular order.
/* | |
* various methods to strip whitespace from text | |
* (aka. despace, leftpack, copy_if) | |
* | |
* 'whitespace' is considered the following bytes: | |
* 0x09 - tab | |
* 0x20 - space | |
* 0x0A - line feed | |
* 0x0D - carriage return | |
*/ |
using System; | |
using System.Collections.Generic; | |
using System.Collections; | |
using System.Diagnostics; | |
using System.Runtime.CompilerServices; | |
namespace IListPerformance | |
{ | |
public class Program | |
{ |