HackerTrans
TopNewTrendsCommentsPastAskShowJobs

treetide

no profile record

comments

treetide
·4 years ago·discuss
Loose connection, but made me remember https://code.world/ uses a Haskell-like functional language to define still pictures, animations, or even games.
treetide
·4 years ago·discuss
...but maybe you don't need to go as far as Haskell. Any language with generics could work, like Java. (Or well, void pointers or anonymous interfaces..). Just make sure the user-written plan code doesn't get any meaningful info about the unknown values, only able to pass it around.
treetide
·4 years ago·discuss
I suspect you could implement this as a Haskell DSL.

The discussion part where you are not allowed (from Terraform lang) to create behavior dependent on the actual values of "Unknown" values (to prevent an ambiguous / non-deterministic plan), reminds of Applicatives vs Monads a bit.

(Sketchy potentially non-100% true illustration ahead)

For example, if you write a command-line parsing library using a Monad, then the set of command-line options is not an upfront fixed set easy to list with --help, but can change depending on previous command line options (here the command line parsing can peek into the upfront "Unknown" values, the options used and their values, to generate even more options).

While if you write it using Applicative, then peeking into the actual values is not possible, you can't create branching behaviour.
treetide
·5 years ago·discuss
For the grepping aspect, https://github.com/google/zoekt is a powerful one-stop-shop. For the navigating, I don't know. SourceGraph maybe, but the linking is somewhat heuristic I assume, not compilation-graph powered. But maybe that changes or depends per language.