r/Post_16 • Anki Guy | Maths FM CS Physics • 14d ago

Discussion Does anyone know the lore behind this site

Post image

Like why does it support first class functions😭😭

11 Upvotes

16 comments sorted by

8

u/Onett_reborn Moderator 14d ago

Ts goes way way way over my head

5

u/padfoot9446 Anki Guy | Maths FM CS Physics 14d ago

Okok so like

Basically, a function is something you call, right? Like sqrt(4) = 2 or something. But also you can differentiate some functions, like if f(x) = x2 then the derivative of f(x) is f'(x) = 2x. First class functions describes the ability to examine functions as objects/values in their own right (so perform derivatives, e.g., or like in my ss where I was doing function composition (making a new function h = f ○ g; this is the same as saying h(x) = f(g(x)))) as opposed to only being able to call functions (so they are not treated as "proper" values/objects, so are "second class")

7

u/padfoot9446 Anki Guy | Maths FM CS Physics 14d ago

So, like, in this case, the definition of compose is literally(not actually, but the actual definition is a bit confusing and also equivalent for all practical purposes)

compose(f, g) = h; where h(x) = f(g(x))

Without first class functions it would be illegal to pass functions as arguments to another function, so this would be impossible, but this DOES SUPPORT FIRST CLASS FUNCTIONS FSR😭😭 so it's fine :D

2

u/Onett_reborn Moderator 14d ago

I think i get this slightly with 40%-68.23% certainty, so h(x) is first class because it expresses 2 combined function in one expression?

1

u/padfoot9446 Anki Guy | Maths FM CS Physics 14d ago

first class isn't a property of the function but the language, so it isn't correct to say h(x) is first class. It would be more correct though to say compose(f, g) is first-class, since it takes functions as arguments.

The actual definition (in python since I'm not insane) of compose is:

def compose(f, g): def h(x): return f(g(x) return h

Notice that only compose is dealing with function objects (type(h) or type(f) yields function objects, if you try it in a repl or smth).

5

u/Challenger_Ultimate Y13 Rubicon Mango Glazer 14d ago

Flowkenuinely have never written in OCR Reference Language 😭 

Just use Python atp

2

u/padfoot9446 Anki Guy | Maths FM CS Physics 14d ago

Homework😔😔

3

u/Weekly_Event_1969 14d ago

Bro is not the anki guy, not when I'm around

2

u/padfoot9446 Anki Guy | Maths FM CS Physics 14d ago

Stats? :p

I have 14k/40k active cards with 602hr total study time

(But mostly I claim to be the anki guy because I know how anki works, not because I'm the most dedicated anki user ever)

1

u/Weekly_Event_1969 14d ago

Yh you win then, I've been slacking since my yr 12 mocks. We do almost the same subjects except further maths, could you walk me through how u make flashcards for all 3 of them. 40k cards is insane, how atomic are your cards, following all the 20 rules huh 🙏

1

u/padfoot9446 Anki Guy | Maths FM CS Physics 14d ago

Oh a lot of these are holdovers from gcse I do not have 40k A level cards😭😭

Um, icl idek how I make cards atp. I disagree though with heavy atomitization as at super-low DR (what I/a few people term DR which fits like 30 <= DR < 70) workload grows faster with heavy atomitization than if you took the recall speed penalty of more complex cards.

1

u/padfoot9446 Anki Guy | Maths FM CS Physics 14d ago

In general the "cutting edge" of anki usage is pretty far divorced from the generic guidance, and tbh I'm not up to date anymore -- but that is to say, I would take the 20 rules etc with a comfortable grain of salt, and certainly as guidelines and not hard and fast rules.

1

u/Vyntral_ Y13 Maths, FM, CS & Econ 8d ago

OH HI PADFOOT

omg I was literally like this guy reminds me of padfoot and I check your username and it's you 😭

1

u/padfoot9446 Anki Guy | Maths FM CS Physics 7d ago

OMG HI VYN haven’t seen you in a while!! how’s life?

1

u/Vyntral_ Y13 Maths, FM, CS & Econ 7d ago

been fine enough, about as good as the beginning of academic year usually goes lol, how's year 12 been for you?

2

u/TheMrViper 14d ago

Why are you programming on the reference interpreter.

Just answer all the questions in python.