Racket’s contract system is so cool!
it kind of works like type annotations in a language like Python, except instead of providing information for static analysis from an LSP, these are checked at runtime and they’re much more granular than just checking types
for example in Python I could write a simple Collatz function like this:
def collatz(max_: int) -> list[int]:
...
and that would tell my LSP that max_ is an integer and this function should return a list of integers. but in Racket I can do:
(define/contract (collatz max)
(-> positive-integer? (listof positive-integer?))
;; ... code for the collatz function goes here
)
and what this means is that max must be a positive integer, and collatz must always return a list of positive integers. if anything else happens, that will cause a contract error at runtime
so you’re not just defining what types your functions take - you’re also defining what specific kinds of values you’re expecting! and you can even define your own contracts from scratch, almost like writing your own assert statements (except it’s also kind of like defining a new type of data)
the one downside to this is that the Racket LSP can’t statically check contracts - they have to be checked at runtime. but still, it’s so cool
a lot of advice for artists makes a lot more sense if you mentally add “if they want to survive under capitalism” at the end
like: “a writer should read as many novels as possible (if they want to survive under capitalism)”
now it’s not about the relationship that an artist “should” have with their art - it’s about the sacrifices that they need to make as people if they want to turn making art into their capitalism survival skill
there is no wrong way to make art, but the ice cold truth is that there are many wrong ways to survive under capitalism
how to tell if a language is compiled:
are there semicolons at the end of every line?
no: it’s interpreted
yes: it’s compiled
oh? I noticed that your matrix account uses the matrix.org homeserver. did you know that if you use a homeserver besides matrix.org you’ll be helping the network grow more robust and decentralized?
for example there’s transkitty.nyaan.si which I- oh that one’s gone
well I’ve seen a lot of folks using miau.dev which is run by- oop the server has been offline since a month ago
well there’s always homeserver.project.foxgirls.online which- ah, they’ve announced that the project will be shut down due to creative differences
anyway make sure not to use matrix.org or the network will be less robust!
I just had a realization about a point of confusion I’ve had with functional programming languages for a long time: sometimes, in functional programming, an entire value can represent an abstraction and you aren’t meant to know anything about its internals at all
in the languages that I’m used to:
but since functional programming doesn’t use classes, the abstractions go more like this:
so that explains a lot lol. I was talking to a functional programmer about why they were sadistically (from my perspective) asking the caller to do a bunch of very complex function composition in order to use their public API, but from their perspective the function composition was an implementation detail and what was actually happening is that functions were being used to manipulate abstractions in a way that was probably very intuitive to them. and this distinction was completely lost on me at the time so I just got confused and frustrated
stuff like this has me thinking that the cultural differences between functional programmers and {mixed paradigm or OOP} programmers might be so extreme that you’d need a translation layer between functional code and OOP code in order for programmers on each side to use each others’ APIs. because even very fundamental things like “how do I recognize a black box when I see one?” are very different between them, and in a way that’s so implicit that they aren’t even aware that it’s a cultural difference
okay the rogue questline in FFXIV is actually kinda good
like it’s extremely contrived, and you’re more like mercenaries than rogues (you actually help the cops, too :/), and the tone is pretty cartoony/goofy which comes off as flippant because the questline deals with some very heavy topics. also everyone talks in a weird, hard-to-follow mix between pirate-speak and thieves’ cant. and I have a lot of complaints about the rogue abilities and the overall design of the class. and overall everything feels rushed and sloppy as you’d expect from ARR
and yet it’s actually just fun to sneak around, gather information, steal stuff, spy on people, and stab guys idk
RE: https://infosec.exchange/@rebane2001/116123227412288110
This might genuinely be the most mind blowing thing I’ve ever seen.
People-first language is only suggested for things that are considered undesirable in our society. No one ever says we should use, for example, "a person with blondness” or "a person with overheight.”
The problem therefore isn't necessarily where we put certain words, but that those words (and the conditions associated with them) are seen negatively.
So no, saying “a person with obesity” will not solve weight stigma in our society.
id like to apologize to venite for complaining about its default dark mode
Am horni. A cute girl should use me and fix that. :3 / 🥺
#transnsfw #transporn #gock #girlcock #girldick #amateurporn
> LOOK
You are in a room. There are exits to the north and west. There is an armchair.
> SIT
You are sitting in an armchair in a room. There are exits to the north and west. A small black cat enters the room.
> TAKE CAT
You cannot take the cat.
> PET CAT
You pet the cat. It starts to purr.
> PET CAT
You pet the cat. It jumps onto the chair, purrs, and settles on your lap.
> N
You cannot go north. You are immobilised by a cat.
> STAND UP
You cannot stand up. You are immobilised by a cat.
> W
You cannot go west. You are immobilised by a cat.
> PET CAT
The cat purrs.
if any of y’all like the newer Resident Evil games (like RE2 Remake or Resident Evil Village) I’d highly recommend giving Crisol: Theater of Idols a try
in fact if you just like puzzle-solving, exploration, and slow tactical combat I’d still highly recommend trying Crisol lol because it has a fantastic balance of all three
it’s a horror game though and there are a lot of CWs, so I’m going to make a second post with a link to the game as well as a list of CWs
naturally shy person not realizing that their digital mask display has gone out
with it out, people naturally treat them more like a doll or drone — heck, some people probably don't realize they're /not/ a doll or drone.
all our wearer notices is that their interactions with other people seem to be a little more comfortable today…
who would win:
the transfemme urge to have long flowy beautiful hair
vs.
the autistic urge to not have a long flowy sensory nightmare attached to my head at all times
imagine a language like Lua except every table literal is actually a block of code that is run like a module. for example:
let someTable = {
export someValue = "foo"
let privateValue = "bar"
}
print(someTable.someValue)
# prints "foo"
print(someTable.privateValue)
# error
that would mean that when you require("someModule") you’re essentially wrapping the entire someModule file inside of { } and getting the result
it would make table literals more noisy but it would also let a Lua-like language have even fewer concepts that need to be learned in order to understand it
plus, you could define a whole class inside of one set of { } which would make the syntax mirror how most other languages do classes - and create a visual divide between the class and any unrelated stuff that might exist in the same file:
let SomeClass = {
export new = (value) -> {
let newInstance = {
let privateValue = value
}
setmetatable(newInstance, this)
return newInstance
}
export getValue = (this) -> {
return this.privateValue
}
export setValue = (this, value) -> {
this.privateValue = value
}
}
let instance = SomeClass.new("foo")
you could even make it so that if you return inside of { } then the whole { } block evaluates to whatever you returned, so you can have multiple statements inside of your expressions (and not just table expressions) just like in Lisp:
let fibonacciNums = {
let a, b = 0, 1
let nums = {}
for _ in range(100) do
a, b = b, a+b
list.push(nums, a)
end
return nums
}
print(fibonacciNums)
# {1, 1, 2, 3, 5, ...}