nivertech2 days ago
> Elixir and F# have |> but neither auto-traces.

Using dbg/2 [1]:

  # In dbg_pipes.exs
  __ENV__.file
  |> String.split("/", trim: true)
  |> List.last()
  |> File.exists?()
  |> dbg()
This code prints:

  [dbg_pipes.exs:5: (file)]
  __ENV__.file #=> "/home/myuser/dbg_pipes.exs"
  |> String.split("/", trim: true) #=> ["home", "myuser", "dbg_pipes.exs"]
  |> List.last() #=> "dbg_pipes.exs"
  |> File.exists?() #=> true
---

1. Debugging - dbg/2

https://hexdocs.pm/elixir/debugging.html#dbg-2

anonzzzies5 hours ago
I should have bet more on Elixir. I did work in F# but MS really didn't seem serious enough about it, but the Elixer community keeps going strong.
wavemode3 hours ago
> The Killer Feature: |> with Auto-Tracing. No other language has this combination

Of the languages listed, Elixir, Python and Rust can all achieve this combination. Elixir has a pipe operator built-in, and Python and Rust have operator overloading, so you could overload the bitwise | operator (or any other operator you want) to act as a pipeline operator. And Rust and Elixir have macros, and Python has decorators, which can be used to automatically add logging/tracing to functions.

It's not automatic for all functions, though having to be explicit/selective about what is logged/traced is generally considered a good thing. It's rare that real-world software wants to log/trace literally everything, since it's not only costly (and slow) but also a PII risk.

tyushk3 hours ago
In Rust, wouldn't implementing BitOr for Fn/FnOnce/FnMut violate the orphan rule?
wavemode2 hours ago
I'm envisioning that in Rust (and Python), the operator overload would be on a class/struct. It would be the macro/decorator (the same one that adds logging) which would turn the function definition into an object that implements Fn.
bb883 hours ago
This strikes me as cool to see someone build another language with python using lark, it's also possible to override the ">>" or "|" characters in python to achieve the same thing, and also you don't have to worry about the "lark" grammar.

I had a custom lark grammar I thought was cool to do something similar, but after a while I just discarded it and went back to straight python, and found it was faster my an order of magnitude.

nnnnico3 hours ago
Cool project. Could You expand on what is the use case for something like it compares to e.g. a python library? Maybe an example of more complex workflows or open ended loops/agents that can showcase the pros of using such a language compared to other solutions. Are these pipelines durable for example or how do they execute?
qrios4 hours ago
Very interesting! I'll definitely give it a try. However, the documentation link[1] isn't working at the moment (404).

[1] https://crux-ecosystem.github.io/MOL/

desireco422 hours ago
Kind of like Ruby... with pipes. Elixir has them, but this reminds me more like Ruby.