Racket meet-up: Saturday, 2 May 2026 at 18:00 UTC

EVERYONE WELCOME 😁

Announcement, Jitsi Meet link & discussion at https://racket.discourse.group/t/racket-meet-up-saturday-2-may-2026-at-18-00-utc/4191
#lisp #scheme #Racket #functionalprogramming #metaprogramming

oof so as far as I can tell Racket has no way to get a field from an object based on a variable. like in Python you can do this:

class SomeClass: def __init__(self): self.foo = 666 obj = SomeClass() field_name = "foo" getattr(obj, field_name) # -> 666

but as far as I can tell #Racket literally will not let you do that T_T the field name basically has to be known at compile time or it won’t work. that is actually terrible because I’m trying to make a (get) form that is able to drill down into data structures given a list of keys:

(get some-data '(2 4 hash-key obj-field))

but I think it’s literally impossible for me to make it work with objects

RE: https://mastodon.social/@touaregtweet/116424032877746573

La France n'est plus une démocratie depuis l'élection de Macron et, comme toute tyrannie, elle est basée sur une mafia crapuleuse donc #corruption, #chantage, #racket, #crimes et #prostitution.

Pleurer aujourd'hui pour que son activité de prostitution soit examinée arrve "un rien" trop tard.

La proposition du sinistre de la justice d'enterrer les viols en 24 heures dĂ©montre que, d'une part il est lui-mĂȘme coutumier du fait, d'autre part que c'est bien une des activitĂ©s piliers des mafias crapuleuses qu'il cherche Ă  "Ă©tatiser" Ă  prĂ©sent.

En fait, le réseau de protitution bourgeois d'Epstein a gangrené depuis longtemps toute la classe politique française depuis les années Mitterrand au moins. L'affaire Jack Lang démontre clairement que les cadres du PS en sont des acteurs traditionnels.

#france #epsteinfiles #Epstein #mafia

@simon_brooke Racket has #Scribble, but #Racket is not exactly #Scheme.

I’ve decided that I want to give #Racket another chance, and see if I can work out solutions to the problems that I ran into when trying to use it. it’s definitely the #Lisp that feels most practical to me out of everything that I’ve tried, and I still love the contract system and its specific take on threading macros

I remember that the error tracebacks were often missing important info, so I want to wait until that happens and see if I can figure out what the specific problem is/was

I was also trying to get some kind of static function signature checking, to make sure I was calling things right, but I’ve decided that I’m okay with relying on runtime errors (from contract violations) instead, as long as I can read the error tracebacks easily enough

another problem that I ran into while using it is that it feels clumsy and awkward to work with complex data structures

with Python I’m used to being able to nest objects pretty much arbitrarily deep, and have my LSP autocomplete all of the fields/methods at each step so I know exactly what type of data I have, and what I can do with it. with Racket that isn’t really the case - I need to flip through my source code in another split to remember what data I have at each step and how to transform it. I don’t think there’s a solution for this - I think I’ll just have to deal with this unfortunately

another aspect of Racket handling complex data structures clumsily is just that the syntax for drilling into a data structure is pretty noisy and long:

(~> some-data-structure (get-field foo _) (hash-ref "some-key") (list-ref 0) some-struct$-field)

compare that to most other languages, which would let you just write:

some_data_structure.foo["some-key"][0].field

this problem gets so much worse when you need to actually mutate the data, and even worse than that when it’s immutable. here’s a real function that I wrote in Racket: (it’s for a really basic clicker game)

(define/contract (game-state$-buy-autoclicker state ac-name) (-> game-state$? string? game-state$?) (define-struct-lenses game-state$) (define-struct-lenses ac-slot$) (define &ac (lens-compose (&hash-ref ac-name) &game-state$-autoclickers)) (define ac-cost (~> (&ac state) ac-slot$-cost)) (printf "buying autoclicker ~a for cost ~a\n" (&ac state) ac-cost) (define &ac-num-owned (lens-compose &ac-slot$-num-owned &ac)) (define new-state (~> state (game-state$-clicks-update (-= ac-cost)) (lens-update &ac-num-owned _ (+= 1)))) (if (negative? (game-state$-clicks state)) (error "not enough clicks to buy this autoclicker") new-state))

pretty much all it’s doing is this:

class GameState: def buy_autoclicker(self, ac_name): ac = self.autoclickers[ac_name] cost = ac.get_cost() print(f"buying autoclicker {ac} for cost {cost}") if cost > self.clicks: raise Exception("not enough clicks to buy this autoclicker") ac.num_owned += 1 self.clicks -= cost

but the combination of nested data and immutability make it a huge mess in Racket

I’m definitely open to suggestions for how I can make this type of code shorter and easier to read, but for the moment here’s what I’m going to try:

I’m going to stop using structs completely in favor of classes, because classes are a great way to have mutability (which fixes the immutability problem) which is neatly contained in a way that can be easily unit-tested, and the syntax and semantics for dealing with classes are often shorter, simpler, and more consistent too

I’m also going to see if I can make a series of general-purpose “get/set/update the data in this nested data structure” forms:

(get-in some-data '(0 3 field-name "some-key")) ; returns some_data[0][3].field_name["some-key"] (set-in some-data '(0 3 field-name "some-key") "new-value") ; returns a version of some_data with the specific data changed ; etc.: (set!-in some-data '(0 3 field-name "some-key") "new-value") (update-in some-data '(0 3 field-name "some-key") (+= 1)) (update!-in some-data '(0 3 field-name "some-key") (+= 1))

that way, my very first example would look like this instead:

(get-in some-data-structure '(foo "some-key" 0 field))

and I could refactor my function into a method that looks like this:

(define (buy-autoclicker ac-name) (define ac (hash-ref autoclickers ac-name)) (define cost (send ac get-cost)) (printf "buying autoclicker ~a for cost ~a\n" ac cost) (when (> cost clicks) (error "not enough clicks to buy this autoclicker")) (set! clicks (- clicks cost)) (update-field! num-owned ac add1))

that’s dramatically shorter and nicer

Phase 2 took a step forward. Someone else fixed a threading issue and that made everything pass on the HEAD of the git repository for #Chez #scheme on my #haikuos build box. So I've just submitted the PR to the upstream project to re-establish Haiku support in Chez. Let's see how that goes.

Reminder, the #haikuports version of Chez Scheme is already available.

I've done a bit of experimenting getting #racket to build, but I'm not there yet. #Akku looks promising too.

Here's the vintage PLT TeachScheme coffee mug that Matthias Felleisen gave me. Featuring Texas-style lambda calculus iconography.

https://en.wikipedia.org/wiki/TeachScheme

I wasn't directly involved with TeachScheme, and am finishing up an extreme-minimalism spring cleaning, so if a TeachScheme person wants such a mug, lmk.

#scheme #racket

Blanc-bonnet et bonnet-blanc. #USA #Iran #racket
--
Donald Trump annonce un blocus naval "de tous les navires tentant d'entrer ou de sortir du détroit d'Ormuz" par les Etats-Unis

https://www.franceinfo.fr/monde/iran/guerre-entre-les-etats-unis-israel-et-l-iran/donald-trump-annonce-que-les-etats-unis-debutent-un-blocus-naval-de-tous-les-navires-tentant-d-entrer-ou-de-sortir-du-detroit-d-ormuz_7932770.html#xtor=RSS-3-%5Bgeneral%5D

> Cette annonce intervient alors que les négociations entre les Etats-Unis et l'Iran au Pakistan se sont achevées sur un échec dimanche matin, laissant planer un doute sur l'avenir du cessez-le-feu instauré pour deux semaines.

Donald Trump annonce un blocus naval "de tous les navires tentant d'entrer ou de sortir du détroit d'Ormuz" pa

Cette annonce intervient alors que les négociations entre les Etats-Unis et l'Iran au Pakistan se sont achevées sur un échec dimanche matin, laissant planer un doute sur l'avenir du cessez-le-feu instauré pour deux semaines.

franceinfo

Je ne cesserai de le rĂ©pĂ©ter, il faut Ă©radiquer le fisc par tous les moyens et l'empĂȘcher de repousser.

« Votre famille aurait pu le faire » : un ex-otage en Iran convoquĂ© par les impĂŽts pour n’avoir rien dĂ©clarĂ© pendant sa dĂ©tention https://www.lavoixdunord.fr/1692907/article/2026-04-09/votre-famille-aurait-pu-le-faire-un-ex-detenu-en-iran-convoque-par-les-impots
#fisc #ImpĂŽts #mafia #vol #racket #BenjaminBriere

« Votre famille aurait pu le faire Â» : un ex-otage en Iran convoquĂ© par les impĂŽts pour n’avoir rien dĂ©clarĂ©

DĂ©tenu en Iran de mai 2020 Ă  2023, Benjamin BriĂšre s’est longtemps battu, Ă  son retour en France, pour revenir Ă  une vie normale. Le TrĂ©sor Public lui a notamment reprochĂ© de ne pas avoir dĂ©clarĂ© ses impĂŽts pendant sa dĂ©tention.

La Voix du Nord
Next steps:
- Work on getting the new machine types into the upstream #Chez #Scheme project.
- Take this work and use it to get #Racket building on top of Chez for #HaikuOS