Trending

#macros

Latest posts tagged with #macros on Bluesky

Latest Top
Trending

Posts tagged #macros

why do protein bars and drinks have to taste like chalk

who hurt you

"food is fuel, not fun!"

I shouldnt have to eat a damn floor tile to get my macros, bub

#protein #macros

0 0 0 0
Preview
a man in a suit and tie is screaming and saying it was me ! ALT: a man in a suit and tie is screaming and saying it was me !

#ibefartin #protein #macros

according a macros calculator, I need 269 (nice) grams of protein

sooooo much

I'mma be like

0 0 0 0
Preview
GitHub - nguyenyou/circe-sanely-auto: Sanely-automatic Encoder/Decoder derivation for Circe on Scala 3 Sanely-automatic Encoder/Decoder derivation for Circe on Scala 3 - nguyenyou/circe-sanely-auto

One more proof by construction that we can improve derivation in #scala with #macros:

github.com/nguyenyou implemented sanely automatic derivation for Circe, and got some really nice numbers.

github.com/nguyenyou/ci...

1 0 0 0
Preview
Blue Lake Regional Park in Portland, Oregon is a great place for Nature Photography! β€” Joe's Notes Shot with Canon 80D Tamron 70-300 and Canon 100mm Macro Blue Lake Follow me on Instagram @g_grins and @fractalfocus.nature CLICK TO ENLARGE

Photo Journal 10/11/2021 (Blue Lake)

joesnotesblog.com/blog/photo-j...

#birds #blog #BlueLake #flowers #journal #nature #naturephotography #OR #Oregon #photoblog #photography #PNW #Portland #squirrel #ducks #ducks #parks #waterfowl #macros #macrophotography #mushrooms

10 0 0 0

Last night's bacon cheese fries are this morning's breakfast hash #health #protein #macros

2 0 0 0

Last week I went out for a Friday night beer with friends, and left Claude running. After recent batches of improvements I hoped that Hearth was finally at the stage when I would be able to write a whole type class derivation with no bugs in my macro utilities. #scala #macros

0 0 1 0
A close-up photograph showcases the vibrant pink blooms of a cactus, emphasizing their intricate details and lively yellow centers, symbolizing the beauty of desert flora.

A close-up photograph showcases the vibrant pink blooms of a cactus, emphasizing their intricate details and lively yellow centers, symbolizing the beauty of desert flora.

Barrel cactus bloom. Found in the White Tank hills in Arizona.

#photography #macros #macrophotography #flowers #cactus

20 0 0 0
Post image

Morning Two-spotted Longhorn #Bee on Cosmo #flower from my summer #Philly #garden. 🌞 #FlyDay #macros #pollinator #insects #nature #eastcoastkin #bugsky

47 2 1 0
Post image

Here comes the sun
#winter #frozen #bubbles #monday #sunrise #akron #ohio #macro #macrophotography #macros #macrophoto

4 0 0 0
Frozen soap bubble catching the light of the sunset - looks like a fiery ice ball

Frozen soap bubble catching the light of the sunset - looks like a fiery ice ball

Frozen sunrise
#winter #frozen #bubbles #fire #sunset #akron #ohio #macro #macrophotography #macros #macrophoto

7 2 0 0
Post image

#Makros #Insekten #Makrofotografie #Macros #Insects #Fotografie #Foto #Close-up #Macrophotographie #Photographie

7 0 0 0
Post image

#Makros #Insekten #Makrofotografie #Macros #Insects #Fotografie #Foto #Close-up #Macrophotographie #Photographie

4 0 0 0
Soap bubble freezing

Soap bubble freezing

Frozen sunrise
#winter #frozen #bubbles #rainbow #sunrise #akron #ohio #macro #macrophotography #macros

4 0 0 0
water droplet reflecting a Japanese maple

water droplet reflecting a Japanese maple

Water droplet and flower

Water droplet and flower

Experimenting with #macros of #water #droplets after some much needed #rain.

#macro #macrophotography #closeup #photography #reflections #waterIsLife #nikon #nature #naturePhotography

33 3 0 0

Saturday protein check: if your lunch had less than 25g of protein, that wasn't lunch. That was a snack with ambitions.

Track it. Fix it. Repeat.

#macros #protein #nutrition

0 0 0 0
A fierce predator with venomous front legs:  the Centipede, Lithobiidae sp
A fierce predator with venomous front legs: the Centipede, Lithobiidae sp YouTube video by Sylvia Meller

A fierce predator, it feeds on small invertebrates such as insects and spiders. It is nocturnal, using its venomous front legs (forcipules) to paralyze prey.
#UKWildlife, #UKNature, #Invertebrates, #Macros, #Wildlife, #Nature
youtu.be/Do4XqSveGH4

2 0 0 0
A striking close-up image of an Echinacea flower showcases its vibrant orange and yellow petals surrounded by a blurred natural background, highlighting the intricate details of its structure.

A striking close-up image of an Echinacea flower showcases its vibrant orange and yellow petals surrounded by a blurred natural background, highlighting the intricate details of its structure.

Very new prairie coneflower from spring of 25.

#photography #macrophotography #macros #flowers

21 0 0 0

Saturday morning protein check: if your breakfast had less than 25g of protein, that wasn't breakfast. That was a snack with ambition.

Track it. Know it. Fix it. chowdown.me is free forever 🍳

#macros #proteinintake #caloriecounting

0 0 0 0
Frozen bubble catching the morning sunrise

Frozen bubble catching the morning sunrise

Frozen sunrise
#winter #frozen #bubbles #rainbow #sunrise #akron #ohio #macro #macrophotography #macros

4 0 0 0

A Greggs sausage roll: 19g of protein.

A Β£3.50 "protein bar" from the gym: 20g of protein.

One costs 65p and brings genuine joy. The other tastes like chocolate-flavoured ambition.

Track your food for a week. Protein is hiding everywhere.

#macros #protein #sausageroll

0 0 0 0
Today I've been playing around with Immutable.js as a library that supplies immutable collection for JavaScript and TypeScript.

Something that's relatively annoying at first sight (cause _verbose_) is how they handle typed Objects (_Records_).

I'm not completely sure yet, but I _think_ in TypeScript you want to declare sums of products using those records something like this:

```js
import { Record } from 'immutable'

type IdleT = { kind: 'Idle' }
type Idle = Record<IdleT>
const Idle = Record<IdleT>({ kind: 'Idle' })

type TrackT = { id: string; url: string; title: string }
type Track = Record<TrackT>
const Track = Record<TrackT>({ id: '', url: '', title: '' })

type LoadingT = { kind: 'Loading'; track: Track }
type Loading = Record<LoadingT>
const Loading = Record<LoadingT>({ kind: 'Loading', track: Track() })
// ..

export type State = Idle | Loading // | ..
```

This is, compared to

```js
export type Track = { id: string; url: string; title: string }

type Idle = { kind: 'Idle' }
type Loading = { kind: 'Loading'; track: Track }
// ..


export type State = Idle | Loading // | ..
```

quite the feat syntax-wise.

It can be alleviated a bit by doing something like this:

```js

export const makeRecord = <T extends object>(defaults: T) => Record<T>(defaults)

const Idle = makeRecord({ kind: 'Idle' as const })
type Idle = RetureType<typeof Idle>
```

But even that is still double the code and more mental workload payed as a price for immutability.

So I wondered:

> Are there people writing Macros in TypeScript?

And as it turns out, there are:

- ts-macros
- macro-ts

But nope, I'm not gonna use them.

Today I've been playing around with Immutable.js as a library that supplies immutable collection for JavaScript and TypeScript. Something that's relatively annoying at first sight (cause _verbose_) is how they handle typed Objects (_Records_). I'm not completely sure yet, but I _think_ in TypeScript you want to declare sums of products using those records something like this: ```js import { Record } from 'immutable' type IdleT = { kind: 'Idle' } type Idle = Record<IdleT> const Idle = Record<IdleT>({ kind: 'Idle' }) type TrackT = { id: string; url: string; title: string } type Track = Record<TrackT> const Track = Record<TrackT>({ id: '', url: '', title: '' }) type LoadingT = { kind: 'Loading'; track: Track } type Loading = Record<LoadingT> const Loading = Record<LoadingT>({ kind: 'Loading', track: Track() }) // .. export type State = Idle | Loading // | .. ``` This is, compared to ```js export type Track = { id: string; url: string; title: string } type Idle = { kind: 'Idle' } type Loading = { kind: 'Loading'; track: Track } // .. export type State = Idle | Loading // | .. ``` quite the feat syntax-wise. It can be alleviated a bit by doing something like this: ```js export const makeRecord = <T extends object>(defaults: T) => Record<T>(defaults) const Idle = makeRecord({ kind: 'Idle' as const }) type Idle = RetureType<typeof Idle> ``` But even that is still double the code and more mental workload payed as a price for immutability. So I wondered: > Are there people writing Macros in TypeScript? And as it turns out, there are: - ts-macros - macro-ts But nope, I'm not gonna use them.

TypeScript Macros

#TypeScript #Macros #FunctionalProgramming #Immutable.js

1 0 1 0
We found a (Pseudo) Scorpion!!!
We found a (Pseudo) Scorpion!!! YouTube video by Sylvia Meller

Looking through the leaf litter, under rocks and roots in the woods we found a scorpion!
Well, not a real one with a venomous sting , but a Pseudoscorpion.
#UKWildlife, #Wildlife, #Invertebrates , #Arachnophiles, #Macros
youtu.be/_qSg9c3FJA0

5 0 0 0
Post image Post image Post image Post image

High Calorie Nutrition without Junk Bulking πŸ₯—πŸ₯©

πŸ₯” Use β€œclean calorie density” staples

πŸ«’ Add calories through β€œmix-ins,” not extra meals

πŸ₯€ Lean on liquid calories when appetite is the bottleneck

#nutrition #diet #calories #protein #macros

0 0 0 0
Post image

Setting up button designs for my Elgato Stream Deck! I didn't save the old profile when I was updating my PC, but I think it's time to make a fresh profile anyways.

Got the first page sorted, now... what else to add?

#twitch #streamer #streaming #macros

0 0 0 0
Post image Post image Post image Post image

Training Day πŸ†š Rest Day Nutrition πŸ₯—

These points matter because they let you lose fat without sacrificing gym performance or muscle.

πŸ— Keep protein the same on both days.

🍞 Shift carbs toward training days.

πŸ«’ Let fats β€œfill the gap” on rest days.

#nutrition #diet #calories #macros

0 0 0 0
Post image Post image

#dinner and #macros for today!
I would have taken a picture of the delicious burger that my partner made for me, but I was so fat I inhaled it 😁 hopefully we can get some rest and not get called in. Sweet dreams, munchkins!

#weightlossjourney
#delicious
#meals

0 0 0 0
Post image Post image Post image Post image

πŸ₯© High Protein Snack Swaps πŸ—

Protein snack swaps matter because they let you increase muscle-building nutrition without β€œtrying harder.”

You keep the same snacking habit, but you change what that habit does for your body.

🎯 Aim for 15–30g Protein Per Snack

#highprotein #macros #snacks #diet

0 0 0 0

It always makes me apprehensive when I write #lisp #macros but when it comes together and works… there’s nothing quite like it!

1 0 0 0
Post image

#AlphabetChallenge #WeekCforCloseUp #EastCoastKin #Spider

#MobilePhotography #Arthropod #Macros

#Photography #PhotographersUnited #PhotographersOfBluesky

Conflicting IDs. Does anyone have a species for this one? New York City.

8 0 1 0
≺≻ Modeling Programs as Functions

In functional programming, we try to model our programs around the idea of functions that take in inputs and return outputs.

A webserver, for example, is just this:

```
HTTP request -webserver-> HTTP response
```

A compiler is this:

```
Source code -compiler-> Target Language Code
```

And a file browser window just this:
```
folder path -file browser-> folder view
```

When we go through with this, a big chunk (except for the part at ther boundary where effects should happen) of our program is just Function Composition.

When we apply this idea naively, our programs look like this:

```js title="main.ts"
export const main = (request) => {
    return formatResponse(validateRequest(parseHeaders(request)))
}
```

```elixir title="main.ex"
def main(request) do
  format_response(validate_request(parse_headers(request)))
end
```

```haskell title="main.hs"
main :: Request -> Response
main req = formatResponse(validateRequest(parseHeaders req))
```

```racket title="main.rkt"
(define (main request)
 (format-response (validate-request (parse-headers request))))
```

This is okay (and still waay better that a ton of statements, I'd say), but not it loses the nice property of statements that it's not nested.  
Also, when we try to read/understand the code, we're probably going to read it from right to left (while mentally 'piping' through the arguments in our heads).

If we mentally parse the code like this either way, we can also just write it down like that:

```js title="main.ts"
import { pipe } from 'effect' // for example, but it's pretty easy to write yourself, too

export const main = (request) => {
    return pipe(request,
                parseHeaders,
                validateRequest,
                formatResponse)
}
```

```elixir title="main.ex"
def main(request) do
  request
  |> parse_headers
  |> validate_request
  |> format_response
end
```

```haskell title="main.hs"
main :: Request -> Response
main req = req & parseHeaders & validateRequest & formatResponse
```

```racket title="main.rkt"
(require threading)

(define (main request)
 (~> request
     parse-headers
     validate-request
     format-response))
```

Two more sidenotes:

- I think pipelines are especially useful when paired with something like Elixir's `IO.inspect()`, like this:

```elixir title="main.ex"
def main(request) do
  request
  |> parse_headers
  |> IO.inspect()
  |> validate_request
  |> format_response
end
```

- Pipelines need their functions to be functions of only one arg (in 'effect', for example), or they need to make a choice on where to splice the argument into the function call. Elixir always splices it into the first, while Lisps aren't decided that (decide per-case), and normally have both a `->` (inserts as the first argument), `->>` (inserts as the last argument), as well as `-as->`-variants, which you can call like this:

```elisp title="example.el"
(-as-> topic-string _
  (string-split _ "," t " ")
  (mapcar (lambda (topic) (concat "#" topic)) _)
  (string-join _ " "))
```

≺≻ Modeling Programs as Functions In functional programming, we try to model our programs around the idea of functions that take in inputs and return outputs. A webserver, for example, is just this: ``` HTTP request -webserver-> HTTP response ``` A compiler is this: ``` Source code -compiler-> Target Language Code ``` And a file browser window just this: ``` folder path -file browser-> folder view ``` When we go through with this, a big chunk (except for the part at ther boundary where effects should happen) of our program is just Function Composition. When we apply this idea naively, our programs look like this: ```js title="main.ts" export const main = (request) => { return formatResponse(validateRequest(parseHeaders(request))) } ``` ```elixir title="main.ex" def main(request) do format_response(validate_request(parse_headers(request))) end ``` ```haskell title="main.hs" main :: Request -> Response main req = formatResponse(validateRequest(parseHeaders req)) ``` ```racket title="main.rkt" (define (main request) (format-response (validate-request (parse-headers request)))) ``` This is okay (and still waay better that a ton of statements, I'd say), but not it loses the nice property of statements that it's not nested. Also, when we try to read/understand the code, we're probably going to read it from right to left (while mentally 'piping' through the arguments in our heads). If we mentally parse the code like this either way, we can also just write it down like that: ```js title="main.ts" import { pipe } from 'effect' // for example, but it's pretty easy to write yourself, too export const main = (request) => { return pipe(request, parseHeaders, validateRequest, formatResponse) } ``` ```elixir title="main.ex" def main(request) do request |> parse_headers |> validate_request |> format_response end ``` ```haskell title="main.hs" main :: Request -> Response main req = req & parseHeaders & validateRequest & formatResponse ``` ```racket title="main.rkt" (require threading) (define (main request) (~> request parse-headers validate-request format-response)) ``` Two more sidenotes: - I think pipelines are especially useful when paired with something like Elixir's `IO.inspect()`, like this: ```elixir title="main.ex" def main(request) do request |> parse_headers |> IO.inspect() |> validate_request |> format_response end ``` - Pipelines need their functions to be functions of only one arg (in 'effect', for example), or they need to make a choice on where to splice the argument into the function call. Elixir always splices it into the first, while Lisps aren't decided that (decide per-case), and normally have both a `->` (inserts as the first argument), `->>` (inserts as the last argument), as well as `-as->`-variants, which you can call like this: ```elisp title="example.el" (-as-> topic-string _ (string-split _ "," t " ") (mapcar (lambda (topic) (concat "#" topic)) _) (string-join _ " ")) ```

Threading Macros And Pipes

#Macros #Racket #Functional Programming #Simplicity #Declarative Programming

1 0 1 0