that's it folks i have literally discovered the most cursed thing in racket

and yeah this is actually empty name variable

Welcome to Racket v7.9 [bc].
> (namespace-set-variable-value! (string->symbol "") "meow")
> (eval '||)

Show thread

so you've heard of naming your variables weird unicode or emojis or whatever well yeah racket supports that obviously, identifiers are any UTF-8 string
(define 🦈 "sharks")

you can even define a variable as a number as long as you escape the parser with ||, pipe is kind of a "quote" that makes anything inside it be a literal symbol instead of being parsed as other data
(define |10| 10) defines a variable _named_ 10 with the value 10
(define |"| "lol") defines a variable named double quote

you can name a variable _empty string_
> (define || "shonks")
> ||

Show thread

you can't have category theory
cat 🐈

yeah i'm a racket main but i'm also leveling up my haskell

agdq looks rly similar to agda and i'm like why is everyone talking abt agda

also VSCode is a broken mess and I hate it but don't get me started on that

Show thread

ice cold take:

LSP is a good idea but why is it HTTP oh my god
Microsoft stop trying to make every editor VSCode challenge

embrace-extend-extinguish is still at work, but it's being coated by "❤️​ open source"

ok hecK there is not nearly enough contrast on the compose box against the background

userstyle time

damn i logged in with and it still looks exactly the same


I once read a very pro-anarchosocialist book that made a sort of thing about a scientist participating in cleaning duty because that's how the society was run, and thought "pff so I clean our bathroom every week.".

Then I discovered that some of my colleagues have servants that come around one or twice a week to clean, or even every day to clean and prepare food.

Now, when I clean my bathroom, I feel like a anarchosocialist freedom fighter. "Take that, mildew! This alcohol is the pure socialist thought that will clean the capitalist-scum from my bathroom tiles!"

Cleaning the bathroom is much more exciting this way.

it's not exactly what i wanted but i made a weak hash where the keys are threads and the values are ephemerons of thread to thread + extra data and to dispatch a message we iterate every ephemeron and if it's still present and the message matches the filter, send it
this is linear on the number of registered filters but it'll be fine tbh

Show thread

currently stuck on a racket design problem
i have a channel which gets various messages and i want to have threads be able to register filters on that channel, to get notified whenever a message matching that filter arrives. the threads can also die at any time, and i want to be able to handle that without holding a bunch of dead thread references everywhere

so i'm looking for like, a weak hash except instead of the keys being weak the values are weak.... is there such a thing?
do i have to implement this myself with a will executor

the most common error i make in prefix notation is swapping the arguments to > and <


Show older

A Mastodon instance for users who like the study of programming languages, formal semantics, types, or linguistics.