News for hackers. Stuff that matters.

treetide

Loose connection, but made me remember https://code.world/ uses a Haskell-like functional language to define still pictures, animations, or even games.
Re:Unknown Values: The Secret to Terraform Plan on Thursday April 28, 2022 @03:10AM (#31189584)
...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.
Re:Unknown Values: The Secret to Terraform Plan on Thursday April 28, 2022 @03:06AM (#31189557)
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.

Re:Improving GitHub Code Search on Thursday December 09, 2021 @02:03AM (#29494669)
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.
Re:Motivation – Keli Language on Monday August 31, 2020 @05:50PM (#24336267)
I just wrote about some possible pitfalls down the ADT route: https://treetide.com/posts/domain-model-pitfalls-oop-fp.html

> As more operations are demanded, it is more likely that the existing partitioning of the world into the nice distinct cases won’t suit that operation anymore. Then, as a fix, we can introduce more specific cases, or make existing ones more general - leading to ambiguity, bloat and mental load for the existing operations.

Just an aspect.

Re:Show HN: Coding Career Handbook on Wednesday July 01, 2020 @06:19PM (#23707451)
About the $40+ for the advice part - seriously, that is a few hours of developer salary. Compared to the few days it would take reading, it is essentially nothing.

Now the question is, investing those few days total saves you more worries. And doesn't derail you. That's hard to evaluate, and I don't attempt to. But for information, $40 is cheap.

Re:Show HN: Coding Career Handbook on Wednesday July 01, 2020 @01:59PM (#23704453)
Shameless plug: my work-in-progress book Programming Without Anxiety [0] might be interesting for you. It got a bit of scope creep which I'll have to cut back on, but I'm pretty enthusiastic about the content so far.

[0]: https://treetide.com/book/programming-without-anxiety.html