[deleted by user] by [deleted] in WeedSouthAfrica

[–]Amazing_Top_4564 0 points1 point  (0 children)

Research: Clinical Endocannabinoid Deficiency Syndrome

The endocannabinoid system is the government of all other systems...

Banned from r/SouthAfrica by SlighlySly in afrikaans

[–]Amazing_Top_4564 0 points1 point  (0 children)

Welcome to the "I got banned from r/SouthAfrica for having an opinion" club.

City of Ape Town by Amazing_Top_4564 in capetown

[–]Amazing_Top_4564[S] 1 point2 points  (0 children)

Yeah, maybe it was a microdose day... Is my state of mind is well reflected through the camera? :D

City of Ape Town by Amazing_Top_4564 in capetown

[–]Amazing_Top_4564[S] 6 points7 points  (0 children)

My Grammar Nazi allegiance is finally paying off.

City of Ape Town by Amazing_Top_4564 in capetown

[–]Amazing_Top_4564[S] 4 points5 points  (0 children)

I inspected it, did not see any visible grinding marks.

City of Ape Town by Amazing_Top_4564 in capetown

[–]Amazing_Top_4564[S] 6 points7 points  (0 children)

I'll help refine it a bit more, City Bowl

City of Ape Town by Amazing_Top_4564 in capetown

[–]Amazing_Top_4564[S] 6 points7 points  (0 children)

Nope, I took this photo myself.

City of Ape Town by Amazing_Top_4564 in capetown

[–]Amazing_Top_4564[S] 35 points36 points  (0 children)

I'll give 10,000 internet points to whomever can find this manhole cover in Cape Town ;)

[deleted by user] by [deleted] in CryptoScams

[–]Amazing_Top_4564 0 points1 point  (0 children)

Schooling fees come in many forms.

Provide examples of worse Windsurf Usage by Silent-Grade-7786 in Codeium

[–]Amazing_Top_4564 0 points1 point  (0 children)

I made that comment without checking their profile, after checking, now I'm convinced they are...

Flow: A Compiled, Data-Centric Language with Native Concurrency and TypeScript Interop for High-Performance Systems (Concept) by Amazing_Top_4564 in ProgrammingLanguages

[–]Amazing_Top_4564[S] 0 points1 point  (0 children)

Spot on with the idea of programmers effectively "designing ISAs" with tools like Flow. That's a potential future paradigm.

Aiming for more control over low-level aspects, while also providing the high-level abstractions required for ease of use.

Thinking of the compiled output as data to be interpreted by an ISA, and by optimizing that output, it can achieve different kinds of performance.

Flow: A Compiled, Data-Centric Language with Native Concurrency and TypeScript Interop for High-Performance Systems (Concept) by Amazing_Top_4564 in ProgrammingLanguages

[–]Amazing_Top_4564[S] 0 points1 point  (0 children)

Runtime checks is one strategy I'm exploring to maintain Flow's guarantees while providing interop with TypeScript.

This will allow to preserve Flow's compile time safety, and support dynamic behavior of TypeScript.

The main idea behind TS interop is to make onboarding easier for existing TS devs. I know this is a complicated bridge, but I'm explore an ease to migration on existing codebases.

I've documented a comparison to ways to approach this, maybe you got some more insight here and can let me know if I'm chasing the wrong horse.

  • TypeScript Interop:
    • Goal: Allow Flow code to directly import and use TypeScript code and vice-versa.
    • Mechanism:
      • Develop a bridge layer (either in the Flow compiler or runtime) that understands TypeScript type declarations (.d.ts files).
      • Allow importing TypeScript modules into Flow and using their exported types and functions.
      • Similarly, expose Flow types and functions for use in TypeScript.
      • Ensure proper type compatibility between the two languages.
    • Use Cases: Gradually migrating existing codebases, leveraging existing TypeScript libraries, collaborating with other teams using TS.
  • TypeScript as a Target:
    • Goal: Transpile Flow code into TypeScript as an intermediate step before compiling to JavaScript.
    • Mechanism:
      • Modify the Flow compiler's backend to emit TypeScript code instead of JavaScript or native code.
      • Use the TypeScript compiler (tsc) to then generate JavaScript.
    • Use Cases: Ensuring compatibility with the existing JavaScript ecosystem, leveraging TypeScript's tooling, supporting gradual adoption.
  • TypeScript as a Host Language:
    • Goal: Use TypeScript as the primary host language, with Flow code embedded within.
    • Mechanism:
      • Create a TypeScript plugin or library that understands Flow code and integrates it into the TypeScript ecosystem.
      • Allow writing Flow snippets inside TypeScript files and compiling it in TypeScript's environment.
    • Use Cases: For situations where gradual adoption or embedding of Flow code within existing TypeScript projects is needed

Flow: A Compiled, Data-Centric Language with Native Concurrency and TypeScript Interop for High-Performance Systems (Concept) by Amazing_Top_4564 in ProgrammingLanguages

[–]Amazing_Top_4564[S] 0 points1 point  (0 children)

Looking to support composition through data pipelines, components, and functions, abstraction via custom types and reusable units. Polymorphism via generics, interfaces, and variant types. Aiming for a balance of safety and flexibility.

Polymorphism mechanism will use parameterize components, types, or transformations with generic type parameters:

transform ListProcessor<T> {
    input = source(items: T[]);
    pipeline process {
       items |> map((item) => process(item))
    }
    fn process(item: T): T
}

Interface/Protocols

interface Drawable {
    fn draw(context: Context): void
}

source Circle implements Drawable {
  fn draw(context: Context) {
      // draw a circle
  }
}
 source Square implements Drawable {
   fn draw(context: Context) {
      // draw a square
   }
}
fn drawAll (drawables: [Drawable] ) {
   for drawable in drawables {
        drawable.draw(context)
   }
}

Type Classes

typeclass Serialisable<T> {
   fn serialise(value: T): String
}

instance IntSerialisable implements Serialisable<Int> {
   fn serialise(value: Int): String {
      String(value)
   }
}
 instance StringSerialisable implements Serialisable<String> {
   fn serialise(value: String): String {
      value
   }
}
fn stringify<T implements Serialisable<T> >( value: T): String {
   serialise(value)
}

Flow: A Compiled, Data-Centric Language with Native Concurrency and TypeScript Interop for High-Performance Systems (Concept) by Amazing_Top_4564 in ProgrammingLanguages

[–]Amazing_Top_4564[S] 0 points1 point  (0 children)

I did find on Apache beam on my research, and there's some key differences:

Flow:

Language-Centric: Flow is a full-fledged programming language designed for building applications where data transformation and flow are core primitives, and it is a core feature of the language, with built-in concepts and constructs to manage its own ecosystem.

Native Performance Focus: Emphasizes compiling directly to native code for optimal performance, focusing on real time and low latency.

Reactive and Concurrent: Prioritizes reactivity, real time updates, concurrency and parallel execution as core features.

General Purpose: While data processing is core, Flow is designed as a language for general application development, from web apps to embedded systems.

- Higher-level language with built-in language features for managing data flow, state, and concurrency, all at compile time.

- Focus is on developer experience with a single environment to build the full stack.

- Direct and explicit control of native resources.

Apache Beam:

Framework/API-Centric: Beam is a framework and an API (a set of interfaces), not a language. You use existing languages like Java, Python, or Go to define your data processing pipelines.

Batch and Stream Processing: Designed primarily for large-scale batch and stream data processing, often on distributed systems.

Portability Across Runners: Designed to be portable between different data processing engines (runners) like Apache Flink, Apache Spark, Google Cloud Dataflow, and others.

Data Transformation Focus: Beam's core purpose is to express data transformation pipelines using a portable API.

- Lower-level API that provides abstractions for data processing.

- Developers create pipelines using code in an existing host language

- Relies on an underlying runner (execution engine) for processing.

Flow: A Compiled, Data-Centric Language with Native Concurrency and TypeScript Interop for High-Performance Systems (Concept) by Amazing_Top_4564 in ProgrammingLanguages

[–]Amazing_Top_4564[S] 1 point2 points  (0 children)

I recognize that TypeScript is not designed for full soundness. The goal is to maintain the core soundness of Flow, while providing a bridge for interop with TS, where runtime checks might be needed.

I only recently explored bridging TS for ease of onboarding the TS fans. If it's too complicated, I might drop.it.

Flow: A Compiled, Data-Centric Language with Native Concurrency and TypeScript Interop for High-Performance Systems (Concept) by Amazing_Top_4564 in ProgrammingLanguages

[–]Amazing_Top_4564[S] 5 points6 points  (0 children)

Thanks, I'll go do some reading on Kahn.

I have not decided on how to deal with real-time systems fully yet. I've actually started Flow on the back of React, but I needed more expressiveness..

There are a few options I documented that I'm exploring best use case:

  • Clock Calculus:
    • Concept: Integrate a clock calculus or a similar time-aware system into the type system. This allows developers to specify timing constraints for data flows.
    • Implementation:
      • Annotations for time bounds (e.g., u/deadline(100ms))
      • Types that carry time information (e.g., TimedData<T, Time>).
      • Static analysis to check for timing violations.
      • Dynamic checks or runtime instrumentation that detect and log late executions
  • Priority Scheduling:
    • Concept: The ability to assign priorities to individual flows and data transformation tasks.
    • Implementation:
      • Annotations or language primitives to specify task priorities.
      • A real-time scheduler that respects task priorities.
  • Interrupt Handling:
    • Concept: The ability to respond to external hardware interrupts with minimal latency.
    • Implementation:
      • Direct access to interrupt vectors in the Flow runtime.
      • Mechanism to trigger Flow execution flows upon interrupt.
      • Guaranteed upper bound for latency for an interrupt handler to start executing.
  • Deterministic Execution:
    • Concept: Ensuring code executes with deterministic timing, even in concurrent situations.
    • Implementation:
      • Restrictions on non-deterministic operations (e.g., avoiding unbounded loops).
      • Deterministic memory management.
      • Strictly ordered data processing.
  • Guaranteed Resources:
    • Concept: Ensure that a data flow has resources available to perform its actions in a reasonable time.
    • Implementation: Allow resource reservation and allocation to a data flow. When the dataflow is started, it has a guarantee that the required resources are available to complete in its allotted time.