This week's topic is quite programming heavy, sorry to all non programmers doggirl-gloom

https://xkcd.com/312/

yap

LISP stands for LISt Processing and was invented by John McCarthy, who was looking computation with symbols and recursive functions in the 1960s.

John McCarthy was the son of immigrant Communists (members of the CPUSA), but after witnessing the failed counter-revolution in Prague in 1968, he himself became a Republican lenin-dont-laugh.

A Lisp program consist of a few basic building blocks:

  • Symbols - basically text without whitespace, for example: +, hello123, if, nil, etc.
  • Numbers, Strings, etc.
  • Cons cells - a Pair, denoted as (cons 1 2) or dotted (1 . 2)
  • Lists - a linked list of Cons cells with the final element being the symbol nil.
    • (list 1 2 3) is the same as (1 . (2 . (3 . nil))).

As you may have noticed, cons and list are inside the parentheses, thats because a function call like f(x,y) is written instead as (f x y). This is called a Symbolic expression and all Lisp code looks like this.

(+ 1 (* 2 3) 4)
;; multiply 2 times 3 => (+ 1 6 4)
;; add 1 6 and 4      => 11

;; the names 'car' and 'cdr' are ancient relics from some assembly instructions
;; basically first and second element of a cons cell
;; or head and tail of a list
(car (cons 1 2)) ;; => 1
(cdr (cons 1 2)) ;; => 2

This in turn means that any code can be turned into a list, so that it can be modified like data. I think thats quite neat and unique among programming languages (it even has a fancy word: this property is called homoiconicity).

Functions that operate on code are called macros.

;; generate a function 'name' that adds 'value' to the input
(defmacro defun-adder (name value) 
  (list 'defun name (list 'x) (list '+ 'x value)))
 
(defun-adder plus5 5)
;; define the function plus5(x) as x + 5 
;; => (defun plus5 (x) (+ x 5)))

(plus5 10) ;; => 15

To make sure the interpreter does not try to evaluate a symbol, it needs to be "quoted". Since this comes up quite often, it gets the shortcut of ' at the beginning.

Theyre much nicer to work with than for example macros in C:

#define PI 3.14159265

this C macro just searches and replaces the string PI in the C source code before compilation and theres lots of ways to mess up, for example

#define DOUBLE(x) x + x

if x is a function call that does something else, like printing, then that message will appear twice. Operator prescedence is also not considered: DOUBLE(1) * 3 will expand to 1 + 1 * 3, so 4 not 6 like one would expect.

The last thing I want to yap about is Lisp1 vs Lisp2. This refers to the amount of namespaces any programming language has. if functions and variables are allowed have same names, then there needs to be a namespace for each.

for example in CL:

(defvar x 1)
(defun x () (+ 1 1))

x   ;; variable      => 1
(x) ;; function call => 2

is perfectly fine, while in other languages like Python or C or Scheme this wouldnt work.

Shoutout to respected comrades lilypad and sodium_nitride who are also true Lisp patriots.


___ Join our public Matrix server! https://rentry.co/tracha#tracha-rooms ___

As a reminder, please do not discuss current struggle sessions in the mega. We want this to be a little oasis for all of us and the best way to do that is not to feed into existing conflict on the site. Also, be sure to properly give content warnings and put sensitive subjects behind proper spoiler tags. It's for the mental health of not just your comrades, but yourself as well.

Here is a screenshot of where to find the spoiler button.

spoiler

Common Lisp Logo, an alien holding a flag with the word LISP on it
you are viewing a single comment's thread
view the rest of the comments
[โ€“] 12 points 1 day ago* (last edited 1 day ago) (8 children)

In my continued series rambling on Gender, I was thinking about that tumblr post by a galaxy brained person suggesting that the gender "boy" and "girl" are different from "man" and "woman". And I think it hits on a weirdly true thing. Sex and gender are social constructs, and I would say there's no reason that "child" couldn't be a different precursor gender/sex to "man" and "woman". In that outside of some minor functional stuff (like UTI with vulvas, balanitis with penises) the difference between the incidences of most health conditions is very similar in kids, because before puberty there is essentially no difference in hormone levels. Both boy and girl children have tiny amount of tesosterone and oestrogen, but it's mostly growth hormone driving stuff until puberty. Stuff like height and weight only really differentiates in puberty as well.

Also just little kids generally look the same regardless of if they are boys or girls, it's just we make one have short hair and the other have dresses. Heck the thing were parents put a bow on a bald baby girl to make sure everyone knows they're a girl, because it's not obvious. Reactionaries love to make fun of "woke" parents raising kids without gender, but I think that would actually be cool as fuck for society. I'm not a big fan of abolishing gender, I love being a woman, but I do think abolishing gender in kids would make sense. Letting kids pick and choose to grow into a man, woman, neither, both etc. Make everyone go through a gender transition if you will, just some might need a bit more help or to do it more than once.

I think there's also something here in the way we treat post menopausal cis women and women with PCOS/PMOS. I think how Talia Bhatt talks about how in orthodox Hindu communities infertile cis women can be cast out and considered Hijra alongside trans women. And the way generally cis men of all ages aren't treated differently but there is the pervasive fear of castration or "low T" etc. That these are genders/sexes too. I've reflected that in the Stormlight Series by Brandon Sanderson (I know, I know), there's a species that has four gender, female, femalen, male, malen. With the n, denoting "neutered" or not capable of breeding at that moment. And like we kind of have those 4 genders already, just not as clearly described.

  • source
  • hideshow 8 child comments
  • [โ€“] 9 points 19 hours ago (2 children)

    I met a guy who didnt want to be a man but identified as a boy. He was very confident he was not non binary nor a woman nor anything else. Man to him came with too many stakes or too much baggage, or maybe twink death hit him hard decades ago?? I dunno. At the time I thought it was off, personally, I'd be open to hearing more but at the time it made me think of the MAP 4chan thing - this must have been 2018 or so. But he did seem sincere as identifying his gender as "boy"

    I think in our social context, broadly western - so apologies if that's not you, most post menopausal women would be a bit offended if one suggested theyre no longer Women (capital W) just because they can't reproduce anymore. I can see the archeology there that sex is way more than just a binary so there could be categories like post menopausal woman (femalen) that exist. But I certainly wouldn't call anyone else that unless they self ID'd as it. The anxiety around low T and demasculinzation to me reads more like patriarchy than anxiety around category confusion (i.e. as if theyre not really Men but some different sex or gender category and that comes with too much baggage in transphobic patriarchal society) - if anything, they are just bog standard men who want to be men hence the fear of losing that because, dubiously, of low T.

  • source
  • parent
  • hideshow 2 child comments
  • [โ€“] 6 points 18 hours ago*

    I think in our social context, broadly western - so apologies if that's not you, most post menopausal women would be a bit offended if one suggested theyre no longer Women (capital W) just because they can't reproduce anymore. I can see the archeology there that sex is way more than just a binary so there could be categories like post menopausal woman (femalen) that exist. But I certainly wouldn't call anyone else that unless they self ID'd as it. The anxiety around low T and demasculinzation to me reads more like patriarchy than anxiety around category confusion (i.e. as if theyre not really Men but some different sex or gender category and that comes with too much baggage in transphobic patriarchal society) - if anything, they are just bog standard men who want to be men hence the fear of losing that because, dubiously, of low T.

    I'm working in a broadly western context too, and I do agree a menopausal Woman would be rightly offended at the suggestion that they aren't Women anymore because they can't reproduce. With an equal amount of right, as you or I would have if someone were to suggest we were not Women because we might not be able to reproduce anymore.

    Apologies that last paragraph was more an appendix to my loose ramblings. I don't personally think we should have those categories, I just think we've kind of already worn them into society a bit, like footsteps on a grass path, not yet formalized by paving. It's just tied into the broader musings that perhaps sex and gender categories might already be kind of loosey-goosey. I've mentioned my work in the past to you. The largest population I work with in my job is cis menopausal woman, far more than trans people. And it's just...interesting, how much a lot of stuff post menopausal cis women go through overlaps a lot with trans women.

    The cis men stuff is interesting more just I think historically how common it has been through history to have enunachs and other third sexs that are basically men who are not men, more of those than the ocaisonal cool transfem ones that pop up. I've had a few people I've worked over the years who have been Cis Men without testicles due to Trauma or cancer, it's been interesting how much anxiety there is around the idea that people might find out.

    But thank you for your reply, this is just stream of consciousness stuff.

  • source
  • parent
  • [โ€“] 8 points 21 hours ago (1 child)

    Besides the reactionary, there's also a wierd genre of lib that engages in gender blindness (aka pretending that society is way more degendered than it actually is), who will basically accuse of trans people of reineventing gender binaries through their gender transition.

    Setting aside the fact that the gender binary is strictly enforced on people since birth even in "societies where woman are equal to men" (such societies scarecely exist btw), a binary trans woman/man is not a gender cop. They barely have the social power to keep themselves safe/employed yet a good chunk of liberals want to pretend as if trans people are some kind of huge power block.

    Of course, overall, I really fuck with gender abolition. I think gender should be abolished for everyone. You still have the option to be a woman in this or that way, because in a gender abolished society there ain't no gender cop to tell you no

  • source
  • parent
  • hideshow 1 child comment
  • [โ€“] 9 points 21 hours ago*

    Definitely even folks like Judith Butler have fallen into this at times.

    As a binary trans women I'd go further and say I'm not only not a cop, but my super clocky but high femme existence, delivered with extreme confidence, poses more of a challenge to masculinity than if I was more androgynous and ambiguous.

  • source
  • parent
  • [โ€“] 11 points 1 day ago (2 children)

    Actually maybe I am for abolishing gender, but in the way we abolish the state thought the oppressed genders seizing control of it and wielding it until it withers, while somethimg with perhaps superficial similarity but transformed by the dialectic remains.

  • source
  • parent
  • hideshow 2 child comments
  • [โ€“] 7 points 23 hours ago (1 child)

    in my ideal future gender is abolished but you have sub-cultures of gender havers. like how we have punks and goths etc.etc.

  • source
  • parent
  • hideshow 1 child comment