Skip to content

Commit

Permalink
chore: Renamed macros. Seems to compile.
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitkulshreshtha committed Dec 20, 2024
1 parent 48dbc3a commit f96341b
Show file tree
Hide file tree
Showing 273 changed files with 745 additions and 745 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
--no-changelog-preview --allow-fully-generated-changelogs
--bump ${{ inputs.bump }} --bump-dependencies auto
${{ inputs.execute && '--execute' || '--no-publish' }}
hydroflow hydroflow_lang hydroflow_macro hydroflow_plus
hydroflow hydroflow_lang dfir_macro hydroflow_plus
hydroflow_plus_std hydroflow_datalog hydroflow_datalog_core
hydro_deploy hydro_cli hydroflow_deploy_integration
stageleft stageleft_macro stageleft_tool
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Hydroflow repo is set up as a monorepo and [Cargo workspace](https://doc.rus
Relative to the repository root:

* `hydroflow` is the main Hydroflow package, containing the Hydroflow runtime. It re-exports the
surface syntax macros in `hydroflow_macro` and `hydroflow_lang`. The runtime is the "scheduled
surface syntax macros in `dfir_macro` and `hydroflow_lang`. The runtime is the "scheduled
layer" while the surface syntax compiler is the "compiled layer".
* `hydro_lang` and related (hydro_*) packages contain Hydro, which is a functional syntax built on
top of `hydroflow`.
Expand Down
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ members = [
"hydroflow_datalog",
"hydroflow_datalog_core",
"hydroflow_lang",
"hydroflow_macro",
"dfir_macro",
"hydro_lang",
"hydro_std",
"hydro_test",
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ To (dry) run the command locally to spot-check for errors and warnings:
cargo smart-release --update-crates-index \
--no-changelog-preview --allow-fully-generated-changelogs \
--bump-dependencies auto --bump minor \ # or `patch`, `major`, `keep`, `auto`
hydroflow hydroflow_lang hydroflow_macro hydro_lang \
hydroflow hydroflow_lang dfir_macro hydro_lang \
hydroflow_datalog hydroflow_datalog_core \
hydro_deploy hydro_cli hydroflow_cli_integration \
hydroflow_plus_cli_integration \
Expand Down
4 changes: 2 additions & 2 deletions benches/benches/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::sync::mpsc::channel;
use std::thread;

use criterion::{black_box, criterion_group, criterion_main, Criterion};
use hydroflow::hydroflow_syntax;
use hydroflow::dfir_syntax;
use static_assertions::const_assert;
use timely::dataflow::operators::{Inspect, Map, ToStream};

Expand Down Expand Up @@ -172,7 +172,7 @@ fn benchmark_hydroflow_surface(c: &mut Criterion) {
c.bench_function("arithmetic/hydroflow/surface", |b| {
b.iter_batched(
|| {
hydroflow_syntax! {
dfir_syntax! {
source_iter(black_box(0..NUM_INTS))

-> map(|x| black_box(x + 1))
Expand Down
4 changes: 2 additions & 2 deletions benches/benches/fan_in.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use hydroflow::hydroflow_syntax;
use hydroflow::dfir_syntax;
use hydroflow::scheduled::handoff::Iter;
use hydroflow::scheduled::query::Query as Q;
use static_assertions::const_assert;
Expand Down Expand Up @@ -40,7 +40,7 @@ fn benchmark_hydroflow_surface(c: &mut Criterion) {
const_assert!(NUM_OPS == 20); // This benchmark is hardcoded for 20 ops, so assert that NUM_OPS is 20.
c.bench_function("fan_in/hydroflow/surface", |b| {
b.iter(|| {
let mut df = hydroflow_syntax! {
let mut df = dfir_syntax! {

my_union = union();

Expand Down
4 changes: 2 additions & 2 deletions benches/benches/fan_out.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use hydroflow::hydroflow_syntax;
use hydroflow::dfir_syntax;
use hydroflow::scheduled::handoff::Iter;
use hydroflow::scheduled::query::Query as Q;
use static_assertions::const_assert;
Expand Down Expand Up @@ -32,7 +32,7 @@ fn benchmark_hydroflow_surface(c: &mut Criterion) {
const_assert!(NUM_OPS == 20); // This benchmark is hardcoded for 20 ops, so assert that NUM_OPS is 20.
c.bench_function("fan_out/hydroflow/surface", |b| {
b.iter(|| {
let mut df = hydroflow_syntax! {
let mut df = dfir_syntax! {
my_tee = tee();

source_iter(black_box(0..NUM_INTS)) -> my_tee;
Expand Down
2 changes: 1 addition & 1 deletion benches/benches/fork_join.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use hydroflow::hydroflow_syntax;
use hydroflow::dfir_syntax;
use hydroflow::scheduled::graph::Hydroflow;
use hydroflow::scheduled::graph_ext::GraphExt;
use hydroflow::scheduled::handoff::{Iter, VecHandoff};
Expand Down
4 changes: 2 additions & 2 deletions benches/benches/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::sync::mpsc::channel;
use std::thread;

use criterion::{black_box, criterion_group, criterion_main, Criterion};
use hydroflow::hydroflow_syntax;
use hydroflow::dfir_syntax;
use hydroflow::scheduled::graph_ext::GraphExt;
use static_assertions::const_assert;
use timely::dataflow::operators::{Inspect, Map, ToStream};
Expand Down Expand Up @@ -190,7 +190,7 @@ fn benchmark_hydroflow_surface(c: &mut Criterion) {
const_assert!(NUM_OPS == 20); // This benchmark is hardcoded for 20 ops, so assert that NUM_OPS is 20.
c.bench_function("identity/hydroflow/surface", |b| {
b.iter(|| {
let mut df = hydroflow_syntax! {
let mut df = dfir_syntax! {
source_iter(black_box(0..NUM_INTS))

-> map(black_box)
Expand Down
32 changes: 16 additions & 16 deletions benches/benches/micro_ops.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use criterion::{black_box, criterion_group, criterion_main, BatchSize, Criterion};
use hydroflow::hydroflow_syntax;
use hydroflow::dfir_syntax;
use rand::distributions::{Distribution, Uniform};
use rand::rngs::StdRng;
use rand::SeedableRng;
Expand All @@ -14,7 +14,7 @@ fn ops(c: &mut Criterion) {
let dist = Uniform::new(0, 100);
let data: Vec<usize> = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect();

hydroflow_syntax! {
dfir_syntax! {
source_iter(black_box(data)) -> identity() -> for_each(|x| { black_box(x); });
}
},
Expand All @@ -32,7 +32,7 @@ fn ops(c: &mut Criterion) {
let dist = Uniform::new(0, 100);
let data: Vec<usize> = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect();

hydroflow_syntax! {
dfir_syntax! {
source_iter(data) -> unique() -> for_each(|x| { black_box(x); });
}
},
Expand All @@ -50,7 +50,7 @@ fn ops(c: &mut Criterion) {
let dist = Uniform::new(0, 100);
let data: Vec<usize> = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect();

hydroflow_syntax! {
dfir_syntax! {
source_iter(black_box(data)) -> map(|x| x + 1) -> for_each(|x| { black_box(x); });
}
},
Expand All @@ -68,7 +68,7 @@ fn ops(c: &mut Criterion) {
let dist = Uniform::new(0, 100);
let data: Vec<usize> = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect();

hydroflow_syntax! {
dfir_syntax! {
source_iter(black_box(data)) -> flat_map(|x| [x]) -> for_each(|x| { black_box(x); });
}
},
Expand All @@ -89,7 +89,7 @@ fn ops(c: &mut Criterion) {
let input1: Vec<(usize, ())> =
(0..NUM_INTS).map(|_| (dist.sample(&mut rng), ())).collect();

hydroflow_syntax! {
dfir_syntax! {
my_join = join();

source_iter(black_box(input0)) -> [0]my_join;
Expand All @@ -115,7 +115,7 @@ fn ops(c: &mut Criterion) {
let input1: Vec<(usize, ())> =
(0..NUM_INTS).map(|_| (dist.sample(&mut rng), ())).collect();

hydroflow_syntax! {
dfir_syntax! {
my_difference = difference();

source_iter(black_box(input0)) -> [pos]my_difference;
Expand All @@ -139,7 +139,7 @@ fn ops(c: &mut Criterion) {
let input0: Vec<usize> = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect();
let input1: Vec<usize> = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect();

hydroflow_syntax! {
dfir_syntax! {
my_union = union();

source_iter(black_box(input0)) -> my_union;
Expand All @@ -162,7 +162,7 @@ fn ops(c: &mut Criterion) {
let dist = Uniform::new(0, 100);
let input0: Vec<usize> = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect();

hydroflow_syntax! {
dfir_syntax! {
my_tee = tee();

source_iter(black_box(input0)) -> my_tee;
Expand All @@ -186,7 +186,7 @@ fn ops(c: &mut Criterion) {
let input0: Vec<usize> = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect();

{
hydroflow_syntax! {
dfir_syntax! {
source_iter(black_box(input0)) -> fold::<'tick>(|| 0, |accum: &mut _, elem| { *accum += elem }) -> for_each(|x| { black_box(x); });
}
}
Expand All @@ -205,7 +205,7 @@ fn ops(c: &mut Criterion) {
let dist = Uniform::new(0, 100);
let input0: Vec<usize> = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect();

hydroflow_syntax! {
dfir_syntax! {
source_iter(black_box(input0)) -> sort() -> for_each(|x| { black_box(x); });
}
},
Expand All @@ -227,7 +227,7 @@ fn ops(c: &mut Criterion) {
let input0: Vec<usize> = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect();
let input1: Vec<usize> = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect();

hydroflow_syntax! {
dfir_syntax! {
my_crossjoin = cross_join();

source_iter(black_box(input0)) -> [0]my_crossjoin;
Expand All @@ -252,7 +252,7 @@ fn ops(c: &mut Criterion) {
(0..NUM_INTS).map(|_| (dist.sample(&mut rng), ())).collect();
let input1: Vec<usize> = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect();

hydroflow_syntax! {
dfir_syntax! {
my_antijoin = anti_join();

source_iter(black_box(input0)) -> [pos]my_antijoin;
Expand All @@ -271,7 +271,7 @@ fn ops(c: &mut Criterion) {
c.bench_function("micro/ops/next_tick/small", |b| {
const DATA: [u64; 1024] = [0; 1024];

let mut df = hydroflow_syntax! {
let mut df = dfir_syntax! {
source_iter(black_box(DATA)) -> persist::<'static>()
-> map(black_box)
-> defer_tick()
Expand Down Expand Up @@ -305,7 +305,7 @@ fn ops(c: &mut Criterion) {
c.bench_function("micro/ops/next_tick/big", |b| {
const DATA: [[u8; 8192]; 1] = [[0; 8192]; 1];

let mut df = hydroflow_syntax! {
let mut df = dfir_syntax! {
source_iter(black_box(DATA)) -> persist::<'static>()
-> defer_tick()
-> map(black_box)
Expand Down Expand Up @@ -345,7 +345,7 @@ fn ops(c: &mut Criterion) {
.map(|_| (dist.sample(&mut rng), dist.sample(&mut rng)))
.collect();

hydroflow_syntax! {
dfir_syntax! {
source_iter(black_box(input0))
-> fold_keyed(|| 0, |x: &mut usize, n: usize| {
*x += n;
Expand Down
6 changes: 3 additions & 3 deletions benches/benches/reachability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::sync::LazyLock;
use criterion::{criterion_group, criterion_main, Criterion};
use differential_dataflow::input::Input;
use differential_dataflow::operators::{Iterate, Join, Threshold};
use hydroflow::hydroflow_syntax;
use hydroflow::dfir_syntax;
use hydroflow::scheduled::graph_ext::GraphExt;

static EDGES: LazyLock<HashMap<usize, Vec<usize>>> = LazyLock::new(|| {
Expand Down Expand Up @@ -298,7 +298,7 @@ fn benchmark_hydroflow_surface_cheating(c: &mut Criterion) {
let df = {
let reachable_inner = reachable_verts.clone();

hydroflow_syntax! {
dfir_syntax! {
origin = source_iter([1]);
reached_vertices = union();
origin -> reached_vertices;
Expand Down Expand Up @@ -334,7 +334,7 @@ fn benchmark_hydroflow_surface(c: &mut Criterion) {
let edges = edges.clone();
let reachable_inner = reachable_verts.clone();

hydroflow_syntax! {
dfir_syntax! {
origin = source_iter(vec![1]);
stream_of_edges = source_iter(edges);
reached_vertices = union();
Expand Down
4 changes: 2 additions & 2 deletions benches/benches/words_diamond.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::path::PathBuf;
use std::sync::LazyLock;

use criterion::{criterion_group, criterion_main, Criterion};
use hydroflow::hydroflow_syntax;
use hydroflow::dfir_syntax;
use hydroflow::itertools::Itertools;
use nameof::name_of;

Expand Down Expand Up @@ -35,7 +35,7 @@ fn hydroflow_diamond(c: &mut Criterion) {
c.bench_function(name_of!(hydroflow_diamond), |b| {
b.iter(|| {
let words = words();
let mut df = hydroflow_syntax! {
let mut df = dfir_syntax! {
my_tee = source_iter(words) -> tee();
my_tee -> flat_map(|s| [format!("hi {}", s), format!("bye {}", s)]) -> my_union;
my_tee -> filter(|s| 0 == s.len() % 5) -> my_union;
Expand Down
2 changes: 1 addition & 1 deletion benches/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn fork_join() -> std::io::Result<()> {
let file = File::create(path)?;
let mut write = BufWriter::new(file);

writeln!(write, "hydroflow_syntax! {{")?;
writeln!(write, "dfir_syntax! {{")?;
writeln!(write, "a0 = source_iter(0..NUM_INTS) -> tee();")?;
for i in 0..NUM_OPS {
if i > 0 {
Expand Down
4 changes: 2 additions & 2 deletions datastores/gossip_kv/cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::net::SocketAddr;
use clap::{CommandFactory, Parser, Subcommand};
use gossip_kv::{ClientRequest, ClientResponse, Key};
use hydroflow::util::{bind_udp_bytes, ipv4_resolve};
use hydroflow::{hydroflow_syntax, tokio, DemuxEnum};
use hydroflow::{dfir_syntax, tokio, DemuxEnum};
use tracing::error;

/// CLI program to interact with Layer 0 gossip store.
Expand Down Expand Up @@ -98,7 +98,7 @@ async fn main() {
// Setup UDP sockets for communication.
let (outbound, inbound, _) = bind_udp_bytes(address).await;

let mut cli = hydroflow_syntax! {
let mut cli = dfir_syntax! {
inbound_messages = source_stream_serde(inbound) -> map(Result::unwrap) -> for_each(|(response, _addr): (ClientResponse, SocketAddr)| println!("{:?}", response));

outbound_messages = union() -> dest_sink_serde(outbound);
Expand Down
Loading

0 comments on commit f96341b

Please sign in to comment.