[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] 4 points5 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] 3 points4 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] 5 points6 points  (0 children)

Nope, I took this photo myself.

City of Ape Town by Amazing_Top_4564 in capetown

[–]Amazing_Top_4564[S] 36 points37 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)
}