Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关注你这个很久了,是否考虑过弄个群? #31

Open
425776024 opened this issue Jul 22, 2020 · 5 comments
Open

关注你这个很久了,是否考虑过弄个群? #31

425776024 opened this issue Jul 22, 2020 · 5 comments

Comments

@425776024
Copy link

是否考虑过弄个群?让大家一起交流,分享资料,这方面的教太少好的更少。

@Aprilming
Copy link

Aprilming commented Jul 22, 2020 via email

@zpoint
Copy link
Owner

zpoint commented Jul 22, 2020

你好, 目前时间精力不是很充足, 这个 issue 先留着, 等后面建一个再在这里回复(挖个坑)

@rodeone2
Copy link

rodeone2 commented Aug 2, 2020

I will explain how Python works. Cpython was ported over from the ABC Language to C language. It works by running a TTY C language Shell that can both read in clicked file type extensions to read and or to scan live line by line inputs. The file read line type is a passed "int main(argv, char **argc)" that informs Python of the clicked files path.

This file is then read into a buffer and processed. As it is being processed it Lexes and tokenizes everything into tokens with several paths as (tok), (s), (t), (e) and a few others. The Variables are all stored into a C struct with a nested type and value struct inside of it. We call these C Tuple's or you may know them as "Linked Lists".

It also has several other struct C Tuples. One for struct Objects, one for struct Class and one for struct Def(for functions). All of them are tied to the Object struct Tuple so that all of them can be passed by references using the Variable struct. Here is a sample of how it works---

typedef struct _node { // USED AS TYPE BELOW and keeps a constant running list of references...
int k;
struct _node *next;
} node;

struct Var {
struct *name {
const char *vname;
}
struct Type {
char *type;
}
struct Value {
const *reference_value;
}
}

struct Object {
const char *objname; //A Live Name Instance
struct reference {
char *CHAR;
int INT;
double DBL;
}
}

There is absolutely No _ASM Opt-code or Assembly used in Python. It works by simply matching variable, object, class and function names with char strings either as constant struct stored references or actual string names. All other variable types use either atoi() or strtof() to convert variable assigned values and store them into the values lists C Tuples. Python began by Guido Implementing Sets which were the foundations of the Linked Lists which all use structs as C Tuples for everything else making it dynamic Object Oriented and Reference powerful.

Pythons Interpreter makes heavy use of both Scanners and Calculators which are at the heart of Pythons Interpreter and its language. To understand them more, study the works of early 1980's SmallTalk and or read Tobias Shrieners works with Interpreters. Thank You,, It is nice to see younger generation interested in these studies.

@zpoint
Copy link
Owner

zpoint commented Aug 3, 2020

@rodeone2 Thanks for your sharing, it's an interesting perspective to learn from the history of Python😁🤝

@rodeone2
Copy link

rodeone2 commented Sep 8, 2020

Study Scanners and Calculators from the Book called Object Oriented Programming in Anci C BY Axil Tobias Shriegner. 1993 he explains allot about Sets and Objects in that book. These were in fact used in SmallTalk in 1980-1983 and everything in CPython uses them also to this day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants