Skip to content

Instantly share code, notes, and snippets.

View EpicEric's full-sized avatar

Eric Rodrigues Pires EpicEric

View GitHub Profile
// Library code
interface val SortFunction[B: Any #read]
new val create()
fun lt(first: B, second: B): Bool
primitive ComparableSortFunction[B: Comparable[B] #read]
fun lt(first: B, second: B): Bool => first < second
//iftype B <: Comparable[B] then first < second else false end
actor Main
new create(env: Env) =>
var y: String ref = "ABCD".string()
var x: String ref = "John".string()
let f: {(String ref, String ref): None ? } ref =
{(a: String ref, b: String ref)? => b(0)? = a(0)? = b(0)? } ref
let f' = f~apply(y)?
try f'(x)? end
env.out.print(x.string())
@EpicEric
EpicEric / diff
Last active January 14, 2019 20:47
ponyc-issue-2975
diff --git a/main.pony b/main.pony
index 47ffb28..4949756 100644
--- a/main.pony
+++ b/pony.pony
@@ -1,9 +1,10 @@
use "itertools"
use "collections"
use "promises"
+use "time"
@EpicEric
EpicEric / !results.txt
Last active November 19, 2018 19:43
pony-http-benchmarks
$ ./pony-bench
Benchmark results will have their mean and median adjusted for overhead.
You may disable this with --noadjust.
Benchmark mean median deviation iterations
Official HTTP library parser 7718 ns 7694 ns ±1.60% 20000
Shetland parser 4433 ns 4427 ns ±1.58% 30000
----------------------------------------------------------
@EpicEric
EpicEric / !configuration.yaml
Last active August 12, 2023 01:05
EpicEric's personal configuration
terminal:
emulator:
name: alacritty
url: https://github.com/alacritty/alacritty
shell:
name: zsh
url: https://sourceforge.net/projects/zsh/
framework:
name: oh-my-zsh
url: https://github.com/robbyrussell/oh-my-zsh

Keybase proof

I hereby claim:

  • I am epiceric on github.
  • I am epiceric (https://keybase.io/epiceric) on keybase.
  • I have a public key ASBBG82EuUvXe3QcWOimC6OTjeitIa8d_7veNTmu0Fwv5go

To claim this, I am signing this object: