Show newer

@wallhackio @vaporeon_ Cling is also free software, dual licensed under a bespoke 3 clause BSD license and the LGPL

@wallhackio @vaporeon_ i was SO confused when he was explaining it to me

:aescling_0908:​ since when did C++ have a REPL???

:clodsire_head:‍:clodsire_tail: what’s a REPL?

:aescling_0908:​ ah,

@vaporeon_ the names are conventional but the only impurrtant part is the * and **. a * arg is basically variadic arguments:

def fun(a, *args):
...

takes one required argument and any number of optional arguments, available in fun as a list bound to args

understanding the ** argument requires furst understanding the notion of "keyword" arguments. it is allowed to invoke the above function as fun(a=1). if it took mulitple arguments, i could supply keyword arguments in arbitrary order:

def fun2(a, b):
return b

fun2(1, 2) # 2
fun2(b=1, a=2) # 1

normally, it is a TypeError to supply an unexpected keyword argument to a function, but if there is a ** argument to the function, it is bound to a dict available the ** argument`s name:

def fun(**kwargs)
return kwargs

fun(a=2, b=3) # {'a': 2, 'b': 3}

an extremely common pattern is to write a thin wrapper around another existing function that takes keyword arguments. python has convenient syntax for inserting keyword arguments into a function call from a dict:

import requests

BASE_URI = # ...

def get(path, **kwargs):
# the HTTP methods in the requests library take a large number of optional keyword arguments
return requests.get(f"{BASE_URI}{path}", **kwargs)

auth_headers = # ...
print(get("/api/records", headers=auth_headers).json())

:aescling_0471: it is very good that veevees

:aescling_0133:​ :aescling_0134:​ :aescling_0135:​ :aescling_0136:​ :aescling_0196:​ :aescling_0197:​ agreed

@vaporeon_ i didn't set out to be shiny, i think it's supposed to be a "normal" glaceon from the anime. but hey i wouldn't object either

@vaporeon_ :aescling_0134:​ you can’t tell me what to do!!!!!! *gets flattened willingly*

ÆSCLING ACTIVATES the TF MACHINE!

ÆSCLING TRANSFURMS from FLORAGATO to GLACEON!

ÆSCLING SWISCHES its big flattened $$$$-ing TAIL!

— :aescling_tf_machine:

Mommmmm I'm borrrrrrrred. Photo from my collection, no date/info.

@vaporeon_ art purrograms have gotten pretty good at imitating the look and feel of traditional art (if you’ve ever seen a digital artist talking about “brushes”, this is often what they mean (creating custom brushes that do weird and wild things is another related skill if you want to lean into the digitalness instead of imitate physically drawing))

that is a long way of saying “yeah”

@compufox anyway yeah i was originally doing this all with severals 2 as exa reccomend but i just got annoyed and all "i wish i could do this with make`. and, well, turned out to not be very hard to pull off. then i spent hours tweaking on a java file that i had already edited to my needs because i'm just like that

Show older
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.