Trending

#racket

Latest posts tagged with #racket on Bluesky

Latest Top
Trending

Posts tagged #racket

Preview
→ Go to article


#Court #Racket #Tournament

0 0 0 0
Preview
→ Go to article


#Comeback #Injury #Match #Racket

0 0 0 0

Doctors know that cannabis cures cancer and yet they consistently fail to recommend it, instead opting to prescribe other less indicated plants in heavily processed, more profitable form. #Racket

0 0 0 0

Personnellement j'adhère à la #dégooglelisation car je souhaite m'écarter du cartel des #bigtech qui cirent les pompes de Trump et lui assure l'impunité de ses actions. Entre outre, Google va bientôt fermer son propre #GoogleOS et appliquer un #racket en bonne et due forme pour ceux, moins avertis.

1 0 0 0

If this goes through, U.S. taxpayers will be on the hook for Trump's #protectionist #racket.

Trump wants to use government personnel and taxpayer funds to indemnify and escort tankers, vehicles, or products (especially energy-related) threatened by a war he's participating in and orchestrating.

0 0 0 0
Preview
→ Go to article


#Injury #Racket #Tournament

0 0 0 0
Preview
→ Go to article


#Amateur #Love #Racket #Record #Tennis

0 0 0 0

My personal #hypothesis is that #Trump didn't promise to make the #Epstein files public to please his #MAGA base: These promises were dog whistles to people who feared exposure; it's an #extortion #racket like all of his #mob style #coercion tactics. The names that were leaked did not pay (enough).

0 0 0 0
Preview
→ Go to article


#Australian Open #Coco Gauff #Court #Racket #Tennis #Tournament

1 0 0 0
Preview
→ Go to article


#Player #Racket #Sponsorship #Tennis

0 0 0 0
Post image

Pun of the day. #tennis #raquet #racket #quiet #pun #dadjokes

1 0 0 0

#DonaldTrump #Global #Pedofile #Racket #cabal #billionares #power
If only the #USA #courts had the Cajones to do this to Trump vs seize just his illegally stolen Presidential files LONG BEFORE the fking 2024 #ELECTIONS

1 0 2 0
Preview
London Racket meet-up Tuesday 17 Feb 2026 7:30pm Let's have a meet-up! London Racket meet-up Tuesday 17 Feb 2026 7:30pm 2026-02-17T19:30:00Z (UTC) No fixed agenda, and it is expected to be small numbers - there will be 5 to 10 of us at most. If you...

All welcome - join us😁

London Racket meet-up Tuesday 17 Feb 2026 7:30pm

The City Pride (it has pizza)
28 Farringdon Ln, London EC1R 3AU

racket.discourse.group/t/london-rac...
#racket #lisp #scheme #rhombus #qi

2 1 0 0
Preview
GitHub - Gabriella439/grace: A prompt engineering functional programming language A prompt engineering functional programming language - Gabriella439/grace

Speaking of which, developing DSLs specifically for working with LLMs also seem like an interesting area of investigation: github.com/Gabriella439...

Seems like a ripe target for something like #Racket or #Clojure

#llm #programming #dsl

3 0 0 0
Preview
→ Go to article


#Ball #Boxing #Climbing #Cup #Football #Pitch #Racket #Tennis #UFC

0 0 0 0
Preview
→ Go to article


#Australian Open #Coco Gauff #Racket

0 0 0 0
Preview
→ Go to article


#Comeback #Medal #Olympics #Racket #Retirement #Skiing

0 0 0 0
Preview
Friday essay: libertarian tech titan Peter Thiel helped make JD Vance. The Republican kingmaker’s influence is growing Peter Thiel has been described as the most influential right-wing intellectual of the past 20 years. He’s funded both JD Vance and Donald Trump. Who is he?

#MissKittyPolitics
​While you struggle, Thiel’s #Palantir netted $113M in government contracts from his political #buddies. It’s not a movement; it’s a billionaire’s #racket. #CronyCapitalism #PeterThiel

2 0 0 0
> Lexical Scoping refers to when the location of a function's definition determines which variables you have access to. On the other hand, Dynamic Scoping uses the location of the function's invocation to determine which variables are available.

```racket title=dyn-scope.rkt
#lang smol/dyn-scope-is-bad

(defvar y 2)
(deffun (times-2 x)
    (* y x))

(let ([y 3])
  (times-2 2))
(times-2 2)
```

Evaluation:

```racket
6
4
```

Well, this is bad.

<References>
<ReferenceLink href="https://youtu.be/b1MvKYHCdno?si=O6qEgfY2QtH_HtqG&t=2330">Programming Languages Lectures</ReferenceLink>
<ReferenceLink href="https://www.plai.org/3/2/PLAI%20Version%203.2.2%20printing.pdf"><KB>Ctrl+f</KB> for 'dynamic scope'</ReferenceLink>
</References>

> Lexical Scoping refers to when the location of a function's definition determines which variables you have access to. On the other hand, Dynamic Scoping uses the location of the function's invocation to determine which variables are available. ```racket title=dyn-scope.rkt #lang smol/dyn-scope-is-bad (defvar y 2) (deffun (times-2 x) (* y x)) (let ([y 3]) (times-2 2)) (times-2 2) ``` Evaluation: ```racket 6 4 ``` Well, this is bad. <References> <ReferenceLink href="https://youtu.be/b1MvKYHCdno?si=O6qEgfY2QtH_HtqG&t=2330">Programming Languages Lectures</ReferenceLink> <ReferenceLink href="https://www.plai.org/3/2/PLAI%20Version%203.2.2%20printing.pdf"><KB>Ctrl+f</KB> for 'dynamic scope'</ReferenceLink> </References>

Which brought me to write about Dynamic Scoping, too :)

#Racket #Lisp #ProgrammingLanguages #LexicalScoping

0 0 1 0
The idea is pretty simple:

We write code, and sometimes we repeat ourselves there. So why not write code that abstracts over this repetition?

That is what _Macros_ are.

# C Macros

The lowest sophistication level (and the worst to work with) is something like C preprocessor macros. There, you do the easiest thing possible: A string replacement over the full following program text, irrespective of anything else.

So a Macro in C has this type signature:

```haskell
CMacro :: String -> String
```

---

```c title=simple.c
#define LALA "hohohoho"

char laugh[] = LALA
```

->

```c title=simple.c
char laugh[] = "hohohoho"
```

A standard C Macro usage looks like this:

```c title=min.c
#define min(X, Y)  ((X) < (Y) ? (X) : (Y))
  x = min(a, b);          →  x = ((a) < (b) ? (a) : (b));
  y = min(1, 2);          →  y = ((1) < (2) ? (1) : (2));
  z = min(a + 28, *p);    →  z = ((a + 28) < (*p) ? (a + 28) : (*p));
```

But since this is just doing straight string replacement, anything can happen (There's just no rules whatsoever for the expansion, so you can have unbalanced parentheses and other weird stuff).

They're still powerful, and you probably want to use them in C, but we can do better.

# Lisp Macros

Lisp Macros do better: They're not doing string replacement, but operate on the _syntax tree_.

```haskell
LispMacro :: Syntax -> Syntax
```

The also have a second pretty helpful property: They use _the same syntax as the base language_.
So their type is actually this:

```haskell
LispMacro :: LispSyntax -> LispSyntax
```

This is what they look like:

```lisp
> (defmacro the-macro (a b)
  `(+ ,a (* ,b 3)))

> (the-macro 4 5) ;; => 19
```

This makes them way more generally useful (for example)

But they, too, have a problem: They're not _hygienic_.

That is, they're introducing variables into their target program that could be referenced both from the inside and outside.

This possibly couples the macro source code to the location it's being used in, which, if you squint, is the one unambigiously bad (default) feature in programming languages (again): Dynamic Scoping

There's an easy fix for this, however: gensym

But this makes for a relatively bad default, and we shouldn't rely on programmers knowing all the ways in which they could fuck up, and then having the mental workload left to fix them.

<Draft>

# Scheme Macros

Scheme was the first language that didn't have the problem of accidental scope leaking. They introduced _hygienic macros_.



# Racket Macros

Racket escalates this completely, and has facilities to define whole new languages.

</Draft>

# Notes

- I've skipped procedural macros#Procedural_macros) (never heard of them before)
- Damn, are those AI Memos badly scanned sometimes: https://dspace.mit.edu/bitstream/handle/1721.1/6111/AIM-057.pdf?sequence=2&isAllowed=y

The idea is pretty simple: We write code, and sometimes we repeat ourselves there. So why not write code that abstracts over this repetition? That is what _Macros_ are. # C Macros The lowest sophistication level (and the worst to work with) is something like C preprocessor macros. There, you do the easiest thing possible: A string replacement over the full following program text, irrespective of anything else. So a Macro in C has this type signature: ```haskell CMacro :: String -> String ``` --- ```c title=simple.c #define LALA "hohohoho" char laugh[] = LALA ``` -> ```c title=simple.c char laugh[] = "hohohoho" ``` A standard C Macro usage looks like this: ```c title=min.c #define min(X, Y) ((X) < (Y) ? (X) : (Y)) x = min(a, b); → x = ((a) < (b) ? (a) : (b)); y = min(1, 2); → y = ((1) < (2) ? (1) : (2)); z = min(a + 28, *p); → z = ((a + 28) < (*p) ? (a + 28) : (*p)); ``` But since this is just doing straight string replacement, anything can happen (There's just no rules whatsoever for the expansion, so you can have unbalanced parentheses and other weird stuff). They're still powerful, and you probably want to use them in C, but we can do better. # Lisp Macros Lisp Macros do better: They're not doing string replacement, but operate on the _syntax tree_. ```haskell LispMacro :: Syntax -> Syntax ``` The also have a second pretty helpful property: They use _the same syntax as the base language_. So their type is actually this: ```haskell LispMacro :: LispSyntax -> LispSyntax ``` This is what they look like: ```lisp > (defmacro the-macro (a b) `(+ ,a (* ,b 3))) > (the-macro 4 5) ;; => 19 ``` This makes them way more generally useful (for example) But they, too, have a problem: They're not _hygienic_. That is, they're introducing variables into their target program that could be referenced both from the inside and outside. This possibly couples the macro source code to the location it's being used in, which, if you squint, is the one unambigiously bad (default) feature in programming languages (again): Dynamic Scoping There's an easy fix for this, however: gensym But this makes for a relatively bad default, and we shouldn't rely on programmers knowing all the ways in which they could fuck up, and then having the mental workload left to fix them. <Draft> # Scheme Macros Scheme was the first language that didn't have the problem of accidental scope leaking. They introduced _hygienic macros_. # Racket Macros Racket escalates this completely, and has facilities to define whole new languages. </Draft> # Notes - I've skipped procedural macros#Procedural_macros) (never heard of them before) - Damn, are those AI Memos badly scanned sometimes: https://dspace.mit.edu/bitstream/handle/1721.1/6111/AIM-057.pdf?sequence=2&isAllowed=y

Inspired by my TypeScript macro finding yesterday, I started a note about Macros :)

#Lisp #Racket #Emacs #Clojure #DSLs #CommonLisp #Rust

2 0 1 0
Djokovic’s ’12 AO racket shatters auction record The racket Novak Djokovic used to win the 2012 Australian Open sold for $540,000, the most ever for a tennis racket and piece of tennis memorabilia.See What Happened →

Djokovic’s ’12 AO racket shatters auction record

#Tennis #Racket

0 0 0 0

#Racket #StaatAlsBeute #PolitikAlsRacket #Sexarbeit

11 3 0 0
Djokovic’s ’12 AO racket shatters auction record The racket Novak Djokovic used to win the 2012 Australian Open sold for $540,000, the most ever for a tennis racket and piece of tennis memorabilia.See What Happened →

Djokovic’s ’12 AO racket shatters auction record

#Tennis #Racket

0 0 0 0

Politik als #Racket
#StaatAlsBeute

13 3 0 0
Djokovic’s ’12 AO racket shatters auction record The racket Novak Djokovic used to win the 2012 Australian Open sold for $540,000, the most ever for a tennis racket and piece of tennis memorabilia.See What Happened →

Djokovic’s ’12 AO racket shatters auction record

#Tennis #Racket

0 0 0 0

github.com/soegaard/web...

#racket #wasm #plt

2 1 0 0

Vielen Dank!
Mehrdimensionalität wäre mMn wichtig, zeitlich u räumlich. Das Muster/die Blaupause des Imperialismus ist die Normandie, ein #Racket geht mit shock&awe-Taktik vor und geht danach Koalitionen mit lokalen (!) Eliten ein. So geht es via William weiter…

0 0 1 0
Preview
→ Go to article


#Coco Gauff #Finals #Racket #Smash #Tournament

0 0 0 0
Preview
The protection racket regime Bondi's letter puts the quiet part on paper.

The protection racket regime
Bondi's letter puts the quiet part on paper.
www.publicnotice.co/p/bondi-lett...

0 0 0 0

Politik als #Racket , Staat als Beute. #,Rackettheorie

40 13 1 0