HackerTrans
TopNewTrendsCommentsPastAskShowJobs

brandonbloom

no profile record

Submissions

Brex tests agents: by committing fraud

brex.com
3 points·by brandonbloom·vor 4 Monaten·0 comments

comments

brandonbloom
·vor 9 Monaten·discuss
If you watched the video closely, you'll have noticed that this design parameterizes the code by an `io` interface, which enables pluggable implementations. Correctly written code in this style can work transparently with evented or threaded runtimes.
brandonbloom
·vor 4 Jahren·discuss
> Internet doesn't help.

Just ask anyone who has moved to Seattle, but has conservative family back in their home state. Folks believe we live in an anarchist hellscape. Myself and several friends have had the experience of being called liars by family members who trust Fox News over the word of their blood relatives. It's absolutely maddening.
brandonbloom
·vor 13 Jahren·discuss
Clojure has provided an excellent model for how to do similar operations in a dynamically typed language with pervasive maps & vectors:

    (update-in player1 [:location :x] + 10)
This works especially nicely with the threading macros. Here's some random example I'll make up:

    (-> player1
        (update-in [:location :x] + 10)
        (assoc-in [:inventory 3 :equipped] true))
The general idea is that a tree of associative data structures (which include integer-indexed vectors) can have a path to a location in the tree reified as normal data. Then, you can run any ordinary function on a deep position in the tree without any of the applicative functors machinery.