I hereby claim:
- I am rklaehn on github.
- I am rklaehn (https://keybase.io/rklaehn) on keybase.
- I have a public key ASD7KkefWWOcjAZuq_IdyTzpXYnoZAdKoouzRSU_Ul25qwo
To claim this, I am signing this object:
use std::iter::{Iterator, Peekable}; | |
pub struct MergeSorted<A: Iterator, B: Iterator> { | |
a: Peekable<A>, | |
b: Peekable<B>, | |
} | |
impl<A: Iterator, B: Iterator> MergeSorted<A, B> { | |
fn new(a: A, b: B) -> MergeSorted<A, B> { | |
MergeSorted { |
let msgpackLite = require('msgpack-lite'); | |
let borc = require('borc'); | |
let _ = require('lodash'); | |
let { performance } = require('perf_hooks') | |
let arrays = _.times(100, (n) => { | |
return _.times(n, i => ({ i, a: [String(i * 1234), String(i * 1234), String(i * 1234), String(i * 1234)] })) | |
}); | |
let encodedBORC = arrays.map(array => borc.encode(array)); |
$ node benchmark2.js | |
= Encoding Time (ms) = | |
msgp.encode 9172.339491000399 | |
borc.encode 20400.477496000007 | |
json.stringify 9445.365290999413 | |
= Decoding Time (ms) = | |
msgp.decode 121.99922000057995 | |
borc.decodeFirst 383.22095499932766 | |
json.parse 48.20755399949849 |
const enum Test { a = 'a' } | |
type Protocol = { | |
foo: { x: string }; | |
bar: { y: number }; | |
} | |
type WithTag<T> = { | |
[TKey in keyof T]: { type: TKey } & T[TKey] | |
} | |
type ToDiscriminatedUnion<P> = WithTag<P>[keyof P] | |
type Constructor<T> = { |
type Protocol = { | |
foo: { x: string }; | |
bar: { y: number }; | |
} | |
type Fold<T, U> = { | |
readonly [P in keyof T]: (value: T[P]) => U | |
} | |
type WithTag<T> = { | |
[TKey in keyof T]: { type: TKey } & T[TKey] | |
} |
#!/bin/bash | |
if [ "$#" -ne 3 ]; then | |
echo "usage:" | |
echo " ipfs-publish-remote.sh <keyname> <dir> <host>" | |
echo " example: ipfs-publish-remote.sh keyname output/rootdir user@ipfs.company.net" | |
exit 1 | |
fi | |
KEYNAME=$1 | |
DIR=$2 | |
HOST=$3 |
I hereby claim:
To claim this, I am signing this object:
package akkahttptest | |
import akka.actor.ActorSystem | |
import akka.http.scaladsl.Http | |
import akka.http.scaladsl.server.Route | |
import akka.stream.ActorMaterializer | |
import akka.http.scaladsl.server.Directives._ | |
object UploadHandler extends App { |
rklaehn@rklaehn-hp:~/projects_git/satmon3$ sbt satmonjavaservices/dependencyTree | |
[info] Loading project definition from /home/rklaehn/projects_git/satmon3/project | |
[info] Set current project to satmon3 (in build file:/home/rklaehn/projects_git/satmon3/) | |
[info] heavens-above:satmonjavaservices_2.11:3.1.75_33302eb [S] | |
[info] +-com.google.protobuf:protobuf-java:2.5.0 (evicted by: 2.6.1) | |
[info] +-com.google.protobuf:protobuf-java:2.6.1 | |
[info] +-com.jgoodies:jgoodies-looks:2.7.0 | |
[info] | +-com.jgoodies:jgoodies-common:1.8.1 | |
[info] | | |
[info] +-com.typesafe.akka:akka-actor_2.11:2.3.13 [S] |
// -Yno-predef | |
package collection | |
import scala.Predef.{???, println, implicitly} | |
trait Foreachable[T, U] { | |
def foreach(value: T, f: U ⇒ Any): Unit | |
} | |
trait Indexable[T, U] { | |
def apply(value: T, index: Int): U |