Skip to content

Instantly share code, notes, and snippets.

actor Main
new create(env: Env) =>
env.out.print("Hello, world!")
actor Main
new create(env: Env) =>
env.out.print("Hello, world!")
actor Main
new create(env: Env) =>
env.out.print("Hello, world!")
actor Main
new create(env: Env) =>
env.out.print("Hello, world!")
env.err.print("Hello, world!")
@mfelsche
mfelsche / tremor_redpanda.log
Created December 10, 2021 15:22
Tremor Redpanda Logs
104_redpanda_elastic_correlation-tremor_out-1 | 2021-12-10T15:17:01.828694200+00:00 INFO tremor_runtime::system - Binding onramp tremor://localhost/onramp/redpanda-in/01/out
104_redpanda_elastic_correlation-tremor_out-1 | 2021-12-10T15:17:01.830056300+00:00 INFO tremor_runtime::source::kafka - [Source::tremor://localhost/onramp/redpanda-in/01/out] Starting kafka onramp
104_redpanda_elastic_correlation-tremor_out-1 | 2021-12-10T15:17:01.831848100+00:00 INFO tremor_runtime::source::kafka - [Source::tremor://localhost/onramp/redpanda-in/01/out] Subscribing to: ["tremor"]
104_redpanda_elastic_correlation-tremor_out-1 | 2021-12-10T15:17:01.832735600+00:00 INFO tremor_runtime::source::kafka - [Source::tremor://localhost/onramp/redpanda-in/01/out] Subscription initiated...
104_redpanda_elastic_correlation-tremor_out-1 | 2021-12-10T15:17:01.833342+00:00 INFO tremor_runtime::onramp - Onramp tremor://localhost/onramp/redpanda-in/01/out started.
104_redpanda_elastic_correlation-tremor_out-1 | 202
@mfelsche
mfelsche / config.yaml
Created September 9, 2021 12:49
Tremor Config to consume json documents from udp and forward them to kafka while applying backpressure in case of error or timeout after > 1s
onramp:
- id: udp_in
type: udp
codec: json
config:
host: localhost
port: 65535
offramp:
- id: kafka_out
type: kafka
@mfelsche
mfelsche / sled_experiment.rs
Created May 4, 2021 07:16
Sled Experiment for watching the consumed disk_space
use sled;
fn main() {
let db = sled::open("/path/to/sled").unwrap();
//let db = sled::Config::default().temporary(true).open().unwrap();
let tree = db.open_tree("events").unwrap();
let mut cnt = 0_u64;
let mut size = 0_u64;
let mut last_id: Option<u64> = None;
@mfelsche
mfelsche / hashing_bench.pony
Created September 7, 2020 22:02
ponylang benchmark for checking performance of hashing in general and some hashmap ops between master and hashing_builtin branch
use "ponybench"
use "collections"
use "random"
actor Main is BenchmarkList
new create(env: Env) =>
PonyBench(env, this)
fun tag benchmarks(bench: PonyBench) =>
@mfelsche
mfelsche / pony_hkt_checklist.md
Last active February 1, 2019 13:00
Ponylang HKT implementation checklist: https://github.com/ponylang/rfcs/pull/134
  • how to handle reification of types with a HKT type-param?
    • if the hkt-type-param is not used: class Foo[F[_]]
    • if the hkt-type-param is used in method signatures:
      trait Foo[F[_]]
        def map[A](a: A): F[A]
      
    • if the hkt-type-param is used in the body of a function with a concrete type (is that even possible? where should it get that type from?):

trait Foo[F[_]]

@mfelsche
mfelsche / gist:ef4dd9e104a8127e820b6e4e20c88b2c
Created January 25, 2019 05:04
Setup pony debugging with vscode
The basic steps are here
```
install https://marketplace.visualstudio.com/items?itemName=npruehs.pony <- for syntax colors
install https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb <- for debugging
#vscode settings should have :
"debug.allowBreakpointsEverywhere": true
#(for example ) create an ./examples/.vscode/launch.json file under the pony examples directory with:
{