michael πŸ“ˆ πŸ‘¨β€πŸ’»'s Avatar

michael πŸ“ˆ πŸ‘¨β€πŸ’»

@mikedecr.computer.bsky.social

Quant finance researcher/developer. Former political scientist, sometimes bike rider. Long form mikedecr.computer

207 Followers  |  230 Following  |  321 Posts  |  Joined: 12.07.2023  |  2.2252

Latest posts by mikedecr.computer on Bluesky

editing the clip: "hard rule: no statistics... it isn't worth it"

30.11.2025 17:53 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

my worry is that this is good armor against slop only to the extent that people have collective energy to join hands and hate it together, which is a shaky foundation

09.11.2025 17:52 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

the work is never done, matt

09.11.2025 16:58 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image Post image

One bewildering piece of condescending Apple UI is that, while you *can* attach files to iMessage, you can't do it with the obvious UI element that should do it.

If you're audacious enough to realize that your computer has these things called "files" there's drag-and-drop or the menu bar?

28.10.2025 23:40 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

really excited for my gf's new iphone to arrive so I can finally rid our lives of lightning cables forever

28.10.2025 23:25 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

as a blog post @ mikedecr.computer/blog/map-as-...

26.10.2025 19:39 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

curious to try omarchy but i would need to buy a computer

26.10.2025 14:56 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

this has been a very nice trick so far actually. it's way easier to set prior expectations when the scale is like, multiples of the mean vs. the number of nanoseconds between things

15.10.2025 22:39 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

does it help in another way besides the prior for the mean e.g. better sampling or something? assuming you are doing a log link then it sounds like you can get the same algebra by centering the intercept on log of the mean right?

15.10.2025 16:33 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

anything helps me absorb little intuitions, thanks

15.10.2025 13:41 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

anybody got a good pragmatic blog post or paper on modern techniques for fitting gamma likelihood models? bayesian is ok / preferred actually

15.10.2025 13:29 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 1    πŸ“Œ 1

Are you guys street or vert

08.10.2025 20:32 β€” πŸ‘ 18    πŸ” 1    πŸ’¬ 3    πŸ“Œ 0

built a great model at work. beautiful really. has everything you think you need or want in it. sucks though. doesn't work at all

30.09.2025 02:21 β€” πŸ‘ 6    πŸ” 1    πŸ’¬ 1    πŸ“Œ 1
Preview
Open Social β€” overreacted The protocol is the API.

i wrote about atproto and why it matters

26.09.2025 15:33 β€” πŸ‘ 2721    πŸ” 491    πŸ’¬ 115    πŸ“Œ 141

this is the kind of stimulating content you can expect by following me at mikedecr dot computer

27.09.2025 19:03 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
screenshot of python code:

# this is the classical definition of map
def map(fn, xs: list):
    if len(xs) == 0:
        return []
    else:
        return [fn(xs[0]), *map(fn, xs[1:])]


# but you can implement as a reduce
from functools import reduce

def map(fn, xs: list):
    return reduce(_as_binary_op(fn), xs, list())

# casting func into a binary operation
def _as_binary_op(fn):
    def binary_op(accum: list, x):
        accum.append(fn(x))
        return accum
    return binary_op


map(str.upper, ["a", "b", "c"])
# ['A', 'B', 'C']

screenshot of python code: # this is the classical definition of map def map(fn, xs: list): if len(xs) == 0: return [] else: return [fn(xs[0]), *map(fn, xs[1:])] # but you can implement as a reduce from functools import reduce def map(fn, xs: list): return reduce(_as_binary_op(fn), xs, list()) # casting func into a binary operation def _as_binary_op(fn): def binary_op(accum: list, x): accum.append(fn(x)) return accum return binary_op map(str.upper, ["a", "b", "c"]) # ['A', 'B', 'C']

weird idea: map in terms of reduce

27.09.2025 18:59 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 2    πŸ“Œ 1

I really like riding a bike but sometimes it would be great if it could have four wheels so I could lug more stuff, an engine so I wouldn't have to pedal it all by myself myself, climate control because sometimes the weather is bad, and safety features to protect me in an accident

21.09.2025 19:38 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

mhm yeah I mean, watch a youtube video of people in amsterdam. it's pretty slow. can't safely go much faster

21.09.2025 19:33 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Look, I ride a bike and I want better bike infrastructure, but this is magical thinking. If every car disappeared there would be way more bikes, way more bikers who don't ride as fast as you want to go, so way more bike traffic

21.09.2025 19:16 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 1
text in the R console: 

R > by_sex = \(x) group_by(x, sex, .add = TRUE)
R > mean_mass = \(x) summarize(x, mass = mean(body_mass_g))
R > penguins |> by_sex() |> mean_mass()
# A tibble: 3 Γ— 2
  sex     mass
  <fct>  <dbl>
1 female 3862.
2 male   4546.
3 NA       NA

text in the R console: R > by_sex = \(x) group_by(x, sex, .add = TRUE) R > mean_mass = \(x) summarize(x, mass = mean(body_mass_g)) R > penguins |> by_sex() |> mean_mass() # A tibble: 3 Γ— 2 sex mass <fct> <dbl> 1 female 3862. 2 male 4546. 3 NA NA

will anybody ever want this? idk. a cheaper / better way might be to just define the fns with lambdas

21.09.2025 16:18 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Screenshot from the text of the blog post:

More abstractly, what I want is more separation of functions from data in the R pipeline style.
In some situation, I want to pass data `x` to functions `f`, `g`, and `h`.
But instead of writing this:

```{r}
#| eval: false
x |>
    f(...) |>
    g(...) |>
    h(...)
```

I want to write something like this:

```{r}
#| eval: false
# first argument omitted from each of these expressions
pipeline = compose(f(...), g(...), h(...))

# supply data to the ultimate function call
x |> pipeline()
```


`pipeline` is a function that captures unevaluated function calls on `f`, `g`, and `h` with their first arguments omitted.
Then I pass data `x` such that the data pass through the first argument of each function in the chain.

Why do I want this?
Because it should be easier to build a pipeline of expressions that can be re-used on different datasets.
I am thinking specically of examples like this:

```{r}
#| eval: false
# I could evaluate this function as-is
x |> pipeline()

# and I could also drop in extra steps j and k
x |> j() |> pipeline()
x |> k() |> pipeline()
```

Screenshot from the text of the blog post: More abstractly, what I want is more separation of functions from data in the R pipeline style. In some situation, I want to pass data `x` to functions `f`, `g`, and `h`. But instead of writing this: ```{r} #| eval: false x |> f(...) |> g(...) |> h(...) ``` I want to write something like this: ```{r} #| eval: false # first argument omitted from each of these expressions pipeline = compose(f(...), g(...), h(...)) # supply data to the ultimate function call x |> pipeline() ``` `pipeline` is a function that captures unevaluated function calls on `f`, `g`, and `h` with their first arguments omitted. Then I pass data `x` such that the data pass through the first argument of each function in the chain. Why do I want this? Because it should be easier to build a pipeline of expressions that can be re-used on different datasets. I am thinking specically of examples like this: ```{r} #| eval: false # I could evaluate this function as-is x |> pipeline() # and I could also drop in extra steps j and k x |> j() |> pipeline() x |> k() |> pipeline() ```

I re-published this post about "lazy" pipeline functions: mikedecr.computer/blog/lazy-dp...

Basically, exploring how to make pipeline-style R code more re-usable and composable by abusing partial function application

21.09.2025 16:01 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

The trick to laundry is never stop. Don’t lose your momentum

21.09.2025 05:05 β€” πŸ‘ 90    πŸ” 9    πŸ’¬ 3    πŸ“Œ 0

I can see my hairline doing things that I do not regard as familiar

19.09.2025 00:25 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Screenshot of R code that reads:

library(dplyr)
library(palmerpenguins)

# how a normal pipeline looks
mass_stats <- penguins |>
    group_by(species, island) |>
    summarize(
        mean_body_mass = mean(body_mass_g, na.rm = TRUE),
        sd_body_mass = sd(body_mass_g, na.rm = TRUE),
    ) |>
    print()


# using lazy pipe
# create a function by composing partial expressions with %=>% operator
compute_mass_stats = 
    group_by(species, island, .add = TRUE) %=>%
    summarize(
        mean_body_mass = mean(body_mass_g, na.rm = TRUE),
        sd_body_mass = sd(body_mass_g, na.rm = TRUE)
    )

# then pass data
compute_mass_stats(penguins)

Screenshot of R code that reads: library(dplyr) library(palmerpenguins) # how a normal pipeline looks mass_stats <- penguins |> group_by(species, island) |> summarize( mean_body_mass = mean(body_mass_g, na.rm = TRUE), sd_body_mass = sd(body_mass_g, na.rm = TRUE), ) |> print() # using lazy pipe # create a function by composing partial expressions with %=>% operator compute_mass_stats = group_by(species, island, .add = TRUE) %=>% summarize( mean_body_mass = mean(body_mass_g, na.rm = TRUE), sd_body_mass = sd(body_mass_g, na.rm = TRUE) ) # then pass data compute_mass_stats(penguins)

Screenshot of R code that reads:

# by using .add = TRUE we can prepend extra groupings to our pipeline
# so we can re-use code more efficiency when we need to slice data more ways
by_sex = group_by(sex, .add = TRUE) |> as_partial()

penguins |> 
    by_sex() |>
    compute_mass_stats()

Screenshot of R code that reads: # by using .add = TRUE we can prepend extra groupings to our pipeline # so we can re-use code more efficiency when we need to slice data more ways by_sex = group_by(sex, .add = TRUE) |> as_partial() penguins |> by_sex() |> compute_mass_stats()

I wrote a "lazy pipe" operator %=>% that lets you build function compositions from partial function expressions in a linear way.

Instead of passing data up front, you define pipeline steps without reference to the data. You get reusable + composable pipeline steps w/out as much function boilerplate

14.09.2025 15:05 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

you really think someone would do that? go on linkedin and tell lies!?!?

09.09.2025 00:14 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I think this whole thread is good but this especially πŸ””πŸ””πŸ””.
Genuinely good ideas will attract even people you dislike. It's a sign of success. If you link every single issue to these character dramas that most people never think about, you won't know how to recognize good ideas, only tribes

06.09.2025 15:42 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Chicago, Baby! - by Feather Flores (Hardcover) Read reviews and buy Chicago, Baby! - by Feather Flores (Hardcover) at Target. Choose from contactless Same Day Delivery, Drive Up and more.

i got this book for some friends and their kid now announces things from the book when they go out in the city

www.target.com/p/chicago-ba...

04.09.2025 23:31 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0

the constant Calabrian chili-fication of gentrified Italian food is getting totally out of hand and must be stopped

03.09.2025 12:38 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
slide from a presentation that reads "Syntax don't solve your problems"

slide from a presentation that reads "Syntax don't solve your problems"

good slide from this talk: www.youtube.com/watch?v=EGLo...

01.09.2025 19:45 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I admit I may be misunderstanding something major about the CRAN model. It's my understanding that you can still install an "archived" pkg from CRAN if requested. is there a way to ensure that the rest of your deps work with that version? and if so is it easy for the user to declare those wishes?

24.08.2025 19:52 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

@mikedecr.computer is following 19 prominent accounts